1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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
29 List of mesh modifiers defining the mesh dynamics.
34 \*---------------------------------------------------------------------------*/
36 #ifndef polyTopoChanger_H
37 #define polyTopoChanger_H
39 #include "regIOobject.H"
41 #include "polyMeshModifier.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 class polyBoundaryMesh;
54 /*---------------------------------------------------------------------------*\
55 Class polyTopoChanger Declaration
56 \*---------------------------------------------------------------------------*/
60 public PtrList<polyMeshModifier>,
63 // Private Member Functions
65 //- Disallow default bitwise copy construct
66 polyTopoChanger(const polyTopoChanger&);
68 //- Disallow default bitwise assignment
69 void operator=(const polyTopoChanger&);
83 //- Runtime type information
84 TypeName("polyTopoChanger");
89 //- Read constructor given IOobject and a polyMesh
90 polyTopoChanger(const IOobject&, polyMesh&);
92 //- Read constructor for given polyMesh
93 explicit polyTopoChanger(polyMesh&);
98 virtual ~polyTopoChanger()
104 //- Return the mesh reference
105 const polyMesh& mesh() const
110 //- Return a list of patch types
111 wordList types() const;
113 //- Return a list of patch names
114 wordList names() const;
116 //- Is topology change required
117 bool changeTopology() const;
119 //- Return topology change request
120 autoPtr<polyTopoChange> topoChangeRequest() const;
122 //- Modify point motion
123 void modifyMotionPoints(pointField&) const;
125 autoPtr<mapPolyMesh> changeMesh
128 const bool syncParallel = true,
129 const bool orderCells = false,
130 const bool orderPoints = false
133 //- Force recalculation of locally stored data on topological change
134 void update(const mapPolyMesh& m);
136 //- Add given set of topology modifiers to the topoChanger
137 void addTopologyModifiers(const List<polyMeshModifier*>& tm);
139 //- Find modifier given a name
140 label findModifierID(const word& modName) const;
143 //- writeData member function required by regIOobject
144 bool writeData(Ostream&) const;
149 bool operator!=(const polyTopoChanger&) const;
150 bool operator==(const polyTopoChanger&) const;
155 friend Ostream& operator<<(Ostream&, const polyTopoChanger&);
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 // ************************************************************************* //