FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

directMappedPolyPatch.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 #include "directMappedPolyPatch.H"
00027 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00028 
00029 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00030 
00031 namespace Foam
00032 {
00033     defineTypeNameAndDebug(directMappedPolyPatch, 0);
00034 
00035     addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, word);
00036     addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, dictionary);
00037 }
00038 
00039 
00040 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
00041 
00042 
00043 // * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * * * * //
00044 
00045 Foam::directMappedPolyPatch::directMappedPolyPatch
00046 (
00047     const word& name,
00048     const label size,
00049     const label start,
00050     const label index,
00051     const polyBoundaryMesh& bm
00052 )
00053 :
00054     polyPatch(name, size, start, index, bm),
00055     directMappedPatchBase(static_cast<const polyPatch&>(*this))
00056 {}
00057 
00058 
00059 Foam::directMappedPolyPatch::directMappedPolyPatch
00060 (
00061     const word& name,
00062     const label size,
00063     const label start,
00064     const label index,
00065     const word& sampleRegion,
00066     const directMappedPatchBase::sampleMode mode,
00067     const word& samplePatch,
00068     const vectorField& offset,
00069     const polyBoundaryMesh& bm
00070 )
00071 :
00072     polyPatch(name, size, start, index, bm),
00073     directMappedPatchBase
00074     (
00075         static_cast<const polyPatch&>(*this),
00076         sampleRegion,
00077         mode,
00078         samplePatch,
00079         offset
00080     )
00081 {}
00082 
00083 
00084 Foam::directMappedPolyPatch::directMappedPolyPatch
00085 (
00086     const word& name,
00087     const label size,
00088     const label start,
00089     const label index,
00090     const word& sampleRegion,
00091     const directMappedPatchBase::sampleMode mode,
00092     const word& samplePatch,
00093     const vector& offset,
00094     const polyBoundaryMesh& bm
00095 )
00096 :
00097     polyPatch(name, size, start, index, bm),
00098     directMappedPatchBase
00099     (
00100         static_cast<const polyPatch&>(*this),
00101         sampleRegion,
00102         mode,
00103         samplePatch,
00104         offset
00105     )
00106 {}
00107 
00108 
00109 Foam::directMappedPolyPatch::directMappedPolyPatch
00110 (
00111     const word& name,
00112     const dictionary& dict,
00113     const label index,
00114     const polyBoundaryMesh& bm
00115 )
00116 :
00117     polyPatch(name, dict, index, bm),
00118     directMappedPatchBase(*this, dict)
00119 {}
00120 
00121 
00122 Foam::directMappedPolyPatch::directMappedPolyPatch
00123 (
00124     const directMappedPolyPatch& pp,
00125     const polyBoundaryMesh& bm
00126 )
00127 :
00128     polyPatch(pp, bm),
00129     directMappedPatchBase(*this, pp)
00130 {}
00131 
00132 
00133 Foam::directMappedPolyPatch::directMappedPolyPatch
00134 (
00135     const directMappedPolyPatch& pp,
00136     const polyBoundaryMesh& bm,
00137     const label index,
00138     const label newSize,
00139     const label newStart
00140 )
00141 :
00142     polyPatch(pp, bm, index, newSize, newStart),
00143     directMappedPatchBase(*this, pp)
00144 {}
00145 
00146 
00147 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00148 
00149 Foam::directMappedPolyPatch::~directMappedPolyPatch()
00150 {
00151     directMappedPatchBase::clearOut();
00152 }
00153 
00154 
00155 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00156 
00157 //- Initialise the calculation of the patch geometry
00158 void Foam::directMappedPolyPatch::initGeometry()
00159 {
00160     polyPatch::initGeometry();
00161     directMappedPatchBase::clearOut();
00162 }
00163 
00164 //- Calculate the patch geometry
00165 void Foam::directMappedPolyPatch::calcGeometry()
00166 {
00167     polyPatch::calcGeometry();
00168     directMappedPatchBase::clearOut();
00169 }
00170 
00171 //- Initialise the patches for moving points
00172 void Foam::directMappedPolyPatch::initMovePoints(const pointField& p)
00173 {
00174     polyPatch::initMovePoints(p);
00175     directMappedPatchBase::clearOut();
00176 }
00177 
00178 //- Correct patches after moving points
00179 void Foam::directMappedPolyPatch::movePoints(const pointField& p)
00180 {
00181     polyPatch::movePoints(p);
00182     directMappedPatchBase::clearOut();
00183 }
00184 
00185 //- Initialise the update of the patch topology
00186 void Foam::directMappedPolyPatch::initUpdateMesh()
00187 {
00188     polyPatch::initUpdateMesh();
00189     directMappedPatchBase::clearOut();
00190 }
00191 
00192 //- Update of the patch topology
00193 void Foam::directMappedPolyPatch::updateMesh()
00194 {
00195     polyPatch::updateMesh();
00196     directMappedPatchBase::clearOut();
00197 }
00198 
00199 
00200 void Foam::directMappedPolyPatch::write(Ostream& os) const
00201 {
00202     polyPatch::write(os);
00203     directMappedPatchBase::write(os);
00204 }
00205 
00206 
00207 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines