1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::genericPolyPatch
28 Determines a mapping between patch face centres and mesh cell centres and
29 processors they're on.
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 and return a clone, resetting the boundary mesh
109 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
111 return autoPtr<polyPatch>(new genericPolyPatch(*this, bm));
114 //- Construct and return a clone, resetting the face list
116 virtual autoPtr<polyPatch> clone
118 const polyBoundaryMesh& bm,
124 return autoPtr<polyPatch>
126 new genericPolyPatch(*this, bm, index, newSize, newStart)
138 //- Write the polyPatch data as a dictionary
139 virtual void write(Ostream&) const;
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace Foam
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 // ************************************************************************* //