1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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/>.
28 A pointPatch based on a polyPatch
34 \*---------------------------------------------------------------------------*/
36 #ifndef facePointPatch_H
37 #define facePointPatch_H
39 #include "pointPatch.H"
40 #include "polyPatch.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 class processorPointPatch;
49 class cyclicPointPatch;
51 /*---------------------------------------------------------------------------*\
52 Class facePointPatch Declaration
53 \*---------------------------------------------------------------------------*/
63 //- Reference to the underlying polyPatch
64 const polyPatch& polyPatch_;
67 // Protected Member Functions
69 //- Initialise the calculation of the patch geometry
70 virtual void initGeometry(PstreamBuffers&);
72 //- Calculate the patch geometry
73 virtual void calcGeometry(PstreamBuffers&);
75 //- Initialise the patches for moving points
76 virtual void initMovePoints(PstreamBuffers&, const pointField&);
78 //- Correct patches after moving points
79 virtual void movePoints(PstreamBuffers&, const pointField&);
81 //- Initialise the update of the patch topology
82 virtual void initUpdateMesh(PstreamBuffers&);
84 //- Update of the patch topology
85 virtual void updateMesh(PstreamBuffers&);
90 // Private Member Functions
92 //- Disallow default bitwise copy construct
93 facePointPatch(const facePointPatch&);
95 //- Disallow default bitwise assignment
96 void operator=(const facePointPatch&);
101 // Declare friendship with the coupledPointPatches to allow them to extend
102 // the set of points with those not associated with faces
103 friend class processorPointPatch;
104 friend class cyclicPointPatch;
107 //- Runtime type information
108 TypeName(polyPatch::typeName_());
111 // Declare run-time constructor selection tables
113 declareRunTimeSelectionTable
118 (const polyPatch& patch, const pointBoundaryMesh& bm),
125 //- Construct from polyPatch
129 const pointBoundaryMesh&
135 //- Return a pointer to a new patch created on freestore from polyPatch
136 static autoPtr<facePointPatch> New
139 const pointBoundaryMesh&
144 virtual ~facePointPatch()
150 //- Return the polyPatch
151 const polyPatch& patch() const
157 virtual const word& name() const
159 return polyPatch_.name();
163 virtual label size() const
165 return meshPoints().size();
168 //- Return the index of this patch in the pointBoundaryMesh
169 virtual label index() const
171 return polyPatch_.index();
174 //- Return mesh points
175 virtual const labelList& meshPoints() const
177 return polyPatch_.meshPoints();
181 //- Return pointField of points in patch
182 virtual const pointField& localPoints() const
184 return polyPatch_.localPoints();
188 //- Return point unit normals
189 virtual const vectorField& pointNormals() const
191 return polyPatch_.pointNormals();
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 } // End namespace Foam
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 // ************************************************************************* //