initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / meshes / pointMesh / pointPatches / pointPatch / pointPatch.H
blobbdf67c879bece7bb2aa4519909b0396193b5dc1e
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 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
19     for more details.
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
25 Class
26     Foam::pointPatch
28 Description
29     Basic pointPatch represents a set of points from the mesh.
31 SourceFiles
32     pointPatch.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef pointPatch_H
37 #define pointPatch_H
39 #include "labelList.H"
40 #include "vectorField.H"
41 #include "triFaceList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward declaration of classes
50 class pointBoundaryMesh;
51 class pointConstraint;
53 /*---------------------------------------------------------------------------*\
54                       Class pointPatch Declaration
55 \*---------------------------------------------------------------------------*/
57 class pointPatch
59     // Private data
61         //- Reference to boundary mesh
62         const pointBoundaryMesh& boundaryMesh_;
65     // Private Member Functions
67         //- Disallow default bitwise copy construct
68         pointPatch(const pointPatch&);
70         //- Disallow default bitwise assignment
71         void operator=(const pointPatch&);
74 protected:
76     // Protected Member Functions
78         // The pointPatch geometry initialisation is called by pointBoundaryMesh
79         friend class pointBoundaryMesh;
81         //- Initialise the calculation of the patch geometry
82         virtual void initGeometry()
83         {}
85         //- Calculate the patch geometry
86         virtual void calcGeometry()
87         {}
89         //- Initialise the patches for moving points
90         virtual void initMovePoints(const pointField&)
91         {}
93         //- Correct patches after moving points
94         virtual void movePoints(const pointField&)
95         {}
97         //- Initialise the update of the patch topology
98         virtual void initUpdateMesh()
99         {}
101         //- Update of the patch topology
102         virtual void updateMesh()
103         {}
106 public:
108     //- Runtime type information
109     TypeName("basePatch");
112     // Constructor
114         pointPatch
115         (
116             const pointBoundaryMesh& bm
117         )
118         :
119             boundaryMesh_(bm)
120         {}
123     // Destructor
125         virtual ~pointPatch()
126         {}
129     // Member Functions
131         //- Return name
132         virtual const word& name() const = 0;
134         //- Return size
135         virtual label size() const = 0;
137         //- Return the index of this patch in the pointBoundaryMesh
138         virtual label index() const = 0;
140         //- Return boundaryMesh reference
141         const pointBoundaryMesh& boundaryMesh() const
142         {
143             return boundaryMesh_;
144         }
146         //- Return true if this patch field is coupled
147         virtual bool coupled() const
148         {
149             return false;
150         }
152         //- Return mesh points
153         virtual const labelList& meshPoints() const = 0;
155         //- Return mesh points
156         virtual const vectorField& localPoints() const = 0;
158         //- Return  point normals
159         virtual const vectorField& pointNormals() const = 0;
161         //- Accumulate the effect of constraint direction of this patch
162         virtual void applyConstraint
163         (
164             const label pointi,
165             pointConstraint&
166         ) const
167         {}
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 } // End namespace Foam
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 #endif
179 // ************************************************************************* //