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::globalPointPatch
29 Foam::globalPointPatch
34 \*---------------------------------------------------------------------------*/
36 #ifndef globalPointPatch_H
37 #define globalPointPatch_H
39 #include "pointPatch.H"
40 #include "coupledPointPatch.H"
41 #include "globalMeshData.H"
42 #include "pointMesh.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class globalPointPatch Declaration
51 \*---------------------------------------------------------------------------*/
53 class globalPointPatch
56 public coupledPointPatch
60 // //- Reference to the basic globalMeshData
61 // const globalMeshData& globalMeshData_;
63 //- Index in the boundary mesh
67 // Protected Member Functions
69 //- Initialise the calculation of the patch geometry
70 virtual void initGeometry()
73 //- Calculate the patch geometry
74 virtual void calcGeometry()
77 //- Initialise the patches for moving points
78 virtual void initMovePoints(const pointField&)
81 //- Correct patches after moving points
82 virtual void movePoints(const pointField&)
85 //- Initialise the update of the patch topology
86 virtual void initUpdateMesh()
89 //- Update of the patch topology
90 virtual void updateMesh()
94 // Private Member Functions
96 //- Disallow default construct as copy
99 const globalPointPatch&
102 //- Disallow default assignment
103 void operator=(const globalPointPatch&);
108 //- Runtime type information
113 //- Construct from components
116 const pointBoundaryMesh&,
123 virtual ~globalPointPatch();
129 virtual const word& name() const
131 // There can only be a single patch of this type - therefore
132 // its name is hard-coded.
137 virtual label size() const
139 return meshPoints().size();
142 //- Return true if running parallel
143 virtual bool coupled() const
145 if (Pstream::parRun())
155 //- Return number of faces
156 virtual label nFaces() const
161 //- Return the index of this patch in the pointBoundaryMesh
162 virtual label index() const
167 //- Return mesh points
168 virtual const labelList& meshPoints() const
170 return boundaryMesh().mesh().globalData().sharedPointLabels();
173 //- Return local points. Not implemented
174 virtual const pointField& localPoints() const
176 notImplemented("globalPointPatch::localPoints() const");
177 return pointField::null();
180 //- Return point normals. Not implemented
181 virtual const vectorField& pointNormals() const
183 notImplemented("globalPointPatch::pointNormals() const");
184 return vectorField::null();
187 //- Return total number of shared points
188 virtual label globalPointSize() const
190 return boundaryMesh().mesh().globalData().nGlobalPoints();
193 //- Return addressing into the global points list
194 const labelList& sharedPointAddr() const
196 return boundaryMesh().mesh().globalData().sharedPointAddr();
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 } // End namespace Foam
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 // ************************************************************************* //