1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 faceTetPolyPatchCellDecomp
29 A tetPolyPatch based on a polyPatch
32 faceTetPolyPatchCellDecomp.C
33 faceTetPolyPatchCellDecompM.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef faceTetPolyPatchCellDecomp_H
39 #define faceTetPolyPatchCellDecomp_H
41 #include "tetPolyPatchCellDecomp.H"
42 #include "polyPatch.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class faceTetPolyPatchCellDecomp Declaration
52 \*---------------------------------------------------------------------------*/
54 class faceTetPolyPatchCellDecomp
56 public tetPolyPatchCellDecomp
60 //- Index of polyPatch in boundary
61 // Needs to be stored as faceTetPolyPatch does not hold a reference to
62 // a polyPatch in order to enable topological changes
63 const label boundaryIndex_;
66 // Private Member Functions
68 //- Disallow default bitwise copy construct
69 faceTetPolyPatchCellDecomp(const faceTetPolyPatchCellDecomp&);
71 //- Disallow default bitwise assignment
72 void operator=(const faceTetPolyPatchCellDecomp&);
77 typedef tetPolyBoundaryMeshCellDecomp BoundaryMesh;
80 //- Runtime type information
81 TypeName(polyPatch::typeName_());
83 // Declare run-time constructor selection tables
85 declareRunTimeSelectionTable
88 faceTetPolyPatchCellDecomp,
90 (const polyPatch& patch, const tetPolyBoundaryMeshCellDecomp& bm),
97 //- Construct from polyPatch
98 faceTetPolyPatchCellDecomp
101 const tetPolyBoundaryMeshCellDecomp&
107 //- Return a pointer to a new patch created on freestore from polyPatch
108 static autoPtr<faceTetPolyPatchCellDecomp> New
111 const tetPolyBoundaryMeshCellDecomp&
117 virtual ~faceTetPolyPatchCellDecomp()
123 //- Return the polyPatch
124 const polyPatch& patch() const;
127 virtual const word& name() const
129 return patch().name();
133 virtual label size() const
135 return patch().nPoints();
138 //- Return number of faces
139 virtual label nFaces() const
141 return patch().size();
144 //- Return the index of this patch in the tetPolyBoundaryMeshCellDecomp
145 virtual label index() const
147 return boundaryIndex_;
151 // Access functions for demand driven data
153 //- Return mesh points
154 virtual const labelList& meshPoints() const
156 return patch().meshPoints();
159 //- Return pointField of points in patch
160 virtual const pointField& localPoints() const
162 return patch().localPoints();
165 //- Return point unit normals
166 virtual const vectorField& pointNormals() const
168 return patch().pointNormals();
171 //- Face decomposition into triangle
172 // Used for implementation of FEM boundary conditions
173 virtual triFaceList faceTriangles(const label faceID) const;
175 //- Return complete list of faces. All are triangles
176 virtual faceList triFaces() const;
179 // Update topology - not required
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 // ************************************************************************* //