1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
31 \*---------------------------------------------------------------------------*/
36 #include "patchIdentifier.H"
37 #include "labelList.H"
38 #include "pointField.H"
41 #include "runTimeSelectionTables.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class ePatch Declaration
52 \*---------------------------------------------------------------------------*/
56 public patchIdentifier
62 //- Reference to boundary mesh
63 const eBoundaryMesh& boundaryMesh_;
65 //- Start index of the patch
73 // The ePatch geometry initialisation is called by eBoundaryMesh
74 friend class eBoundaryMesh;
76 //- Initialise the calculation of the patch geometry
77 virtual void initGeometry()
80 //- Calculate the patch geometry
81 virtual void calcGeometry()
84 //- Initialise the patches for moving points
85 virtual void initMovePoints(const pointField&)
88 //- Correct patch after moving points
89 virtual void movePoints(const pointField&)
92 //- Initialise the update of the patch topology
93 virtual void initUpdateMesh()
96 //- Update of the patch topology
97 virtual void updateMesh()
103 typedef eBoundaryMesh BoundaryMesh;
106 //- Runtime type information
109 // Declare run-time constructor selection tables
111 declareRunTimeSelectionTable
121 const eBoundaryMesh& bm
123 (name, size, start, index, bm)
127 declareRunTimeSelectionTable
134 const dictionary& dict,
136 const eBoundaryMesh& bm
138 (name, dict, index, bm)
144 //- Construct from components
151 const eBoundaryMesh& bm
154 //- Construct from dictionary
158 const dictionary& dict,
160 const eBoundaryMesh& bm
163 //- Construct as copy, resetting the boundary mesh
164 ePatch(const ePatch&, const eBoundaryMesh&);
166 //- Construct as copy
167 ePatch(const ePatch&);
172 //- Return a pointer to a new patch created on freestore from
174 static autoPtr<ePatch> New
176 const word& patchType,
181 const eBoundaryMesh& bm
185 //- Return a pointer to a new patch created
186 // on freestore from dictionary
187 static autoPtr<ePatch> New
190 const dictionary& dict,
192 const eBoundaryMesh& bm
203 //- Return the index of this patch in the boundaryMesh
206 return patchIdentifier::index();
209 //- Return boundaryMesh reference
210 const eBoundaryMesh& boundaryMesh() const;
212 //- Return true if this patch is coupled
213 virtual bool coupled() const
218 //- Patch start in edge list
225 virtual label size() const
230 //- Slice list to patch
232 typename List<T>::subList patchSlice(const List<T>& l) const
234 return typename List<T>::subList(l, size(), start());
238 virtual void write(Ostream&) const;
240 //- Assignment operator
241 void operator=(const ePatch&);
246 friend Ostream& operator<<(Ostream&, const ePatch&);
250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
252 } // End namespace Foam
254 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
258 // ************************************************************************* //