1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::genericPolyPatch
28 Substitute for unknown patches. Used for postprocessing when only
29 basic polyPatch info is needed.
32 Storage is not optimal. It stores all face centres and cells on all
33 processors to keep the addressing calculation simple.
38 \*---------------------------------------------------------------------------*/
40 #ifndef genericPolyPatch_H
41 #define genericPolyPatch_H
43 #include "polyPatch.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class genericPolyPatch Declaration
52 \*---------------------------------------------------------------------------*/
54 class genericPolyPatch
65 //- Runtime type information
66 TypeName("genericPatch");
71 //- Construct from components
78 const polyBoundaryMesh& bm
81 //- Construct from dictionary
85 const dictionary& dict,
87 const polyBoundaryMesh& bm
90 //- Construct as copy, resetting the boundary mesh
93 const genericPolyPatch&,
94 const polyBoundaryMesh&
97 //- Construct given the original patch and resetting the
98 // face list and boundary mesh information
101 const genericPolyPatch& pp,
102 const polyBoundaryMesh& bm,
108 //- Construct given the original patch and a map
111 const genericPolyPatch& pp,
112 const polyBoundaryMesh& bm,
114 const labelUList& mapAddressing,
118 //- Construct and return a clone, resetting the boundary mesh
119 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
121 return autoPtr<polyPatch>(new genericPolyPatch(*this, bm));
124 //- Construct and return a clone, resetting the face list
126 virtual autoPtr<polyPatch> clone
128 const polyBoundaryMesh& bm,
134 return autoPtr<polyPatch>
136 new genericPolyPatch(*this, bm, index, newSize, newStart)
140 //- Construct and return a clone, resetting the face list
142 virtual autoPtr<polyPatch> clone
144 const polyBoundaryMesh& bm,
146 const labelUList& mapAddressing,
150 return autoPtr<polyPatch>
152 new genericPolyPatch(*this, bm, index, mapAddressing, newStart)
163 //- Write the polyPatch data as a dictionary
164 virtual void write(Ostream&) const;
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 } // End namespace Foam
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 // ************************************************************************* //