ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / OpenFOAM / meshes / pointMesh / pointPatches / facePointPatch / facePointPatch.H
blobc59234c66c5d5143ba7a9db32d5dc191f0f6531a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::facePointPatch
27 Description
28     A pointPatch based on a polyPatch
30 SourceFiles
31     facePointPatch.C
32     newPointPatch.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef facePointPatch_H
37 #define facePointPatch_H
39 #include "pointPatch.H"
40 #include "polyPatch.H"
41 #include "autoPtr.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 class processorPointPatch;
49 class cyclicPointPatch;
51 /*---------------------------------------------------------------------------*\
52                   Class facePointPatch Declaration
53 \*---------------------------------------------------------------------------*/
55 class facePointPatch
57     public pointPatch
59 protected:
61     // Protected data
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&);
88 private:
90     // Private Member Functions
92         //- Disallow default bitwise copy construct
93         facePointPatch(const facePointPatch&);
95         //- Disallow default bitwise assignment
96         void operator=(const facePointPatch&);
99 public:
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
114         (
115             autoPtr,
116             facePointPatch,
117             polyPatch,
118             (const polyPatch& patch, const pointBoundaryMesh& bm),
119             (patch, bm)
120         );
123     // Constructors
125         //- Construct from polyPatch
126         facePointPatch
127         (
128             const polyPatch&,
129             const pointBoundaryMesh&
130         );
133     // Selectors
135         //- Return a pointer to a new patch created on freestore from polyPatch
136         static autoPtr<facePointPatch> New
137         (
138             const polyPatch&,
139             const pointBoundaryMesh&
140         );
143     //- Destructor
144     virtual ~facePointPatch()
145     {}
148     // Member Functions
150         //- Return the polyPatch
151         const polyPatch& patch() const
152         {
153             return polyPatch_;
154         }
156         //- Return name
157         virtual const word& name() const
158         {
159             return polyPatch_.name();
160         }
162         //- Return size
163         virtual label size() const
164         {
165             return meshPoints().size();
166         }
168         //- Return the index of this patch in the pointBoundaryMesh
169         virtual label index() const
170         {
171             return polyPatch_.index();
172         }
174         //- Return mesh points
175         virtual const labelList& meshPoints() const
176         {
177             return polyPatch_.meshPoints();
178         }
181         //- Return pointField of points in patch
182         virtual const pointField& localPoints() const
183         {
184             return polyPatch_.localPoints();
185         }
188         //- Return point unit normals
189         virtual const vectorField& pointNormals() const
190         {
191             return polyPatch_.pointNormals();
192         }
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 } // End namespace Foam
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 #endif
204 // ************************************************************************* //