1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::genericPolyPatch
29 Determines a mapping between patch face centres and mesh cell centres and
30 processors they're on.
33 Storage is not optimal. It stores all face centres and cells on all
34 processors to keep the addressing calculation simple.
39 \*---------------------------------------------------------------------------*/
41 #ifndef genericPolyPatch_H
42 #define genericPolyPatch_H
44 #include "polyPatch.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class genericPolyPatch Declaration
53 \*---------------------------------------------------------------------------*/
55 class genericPolyPatch
66 //- Runtime type information
67 TypeName("genericPatch");
72 //- Construct from components
79 const polyBoundaryMesh& bm
82 //- Construct from dictionary
86 const dictionary& dict,
88 const polyBoundaryMesh& bm
91 //- Construct as copy, resetting the boundary mesh
94 const genericPolyPatch&,
95 const polyBoundaryMesh&
98 //- Construct given the original patch and resetting the
99 // face list and boundary mesh information
102 const genericPolyPatch& pp,
103 const polyBoundaryMesh& bm,
109 //- Construct and return a clone, resetting the boundary mesh
110 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
112 return autoPtr<polyPatch>(new genericPolyPatch(*this, bm));
115 //- Construct and return a clone, resetting the face list
117 virtual autoPtr<polyPatch> clone
119 const polyBoundaryMesh& bm,
125 return autoPtr<polyPatch>
127 new genericPolyPatch(*this, bm, index, newSize, newStart)
139 //- Write the polyPatch data as a dictionary
140 virtual void write(Ostream&) const;
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 } // End namespace Foam
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 // ************************************************************************* //