1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
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
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/>.
28 List of mesh modifiers defining the mesh dynamics.
33 \*---------------------------------------------------------------------------*/
35 #ifndef polyTopoChanger_H
36 #define polyTopoChanger_H
38 #include "regIOobject.H"
40 #include "polyMeshModifier.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 class polyBoundaryMesh;
53 /*---------------------------------------------------------------------------*\
54 Class polyTopoChanger Declaration
55 \*---------------------------------------------------------------------------*/
59 public PtrList<polyMeshModifier>,
62 // Private Member Functions
64 //- Disallow default bitwise copy construct
65 polyTopoChanger(const polyTopoChanger&);
67 //- Disallow default bitwise assignment
68 void operator=(const polyTopoChanger&);
82 //- Runtime type information
83 TypeName("polyTopoChanger");
88 //- Read constructor given IOobject and a polyMesh
89 polyTopoChanger(const IOobject&, polyMesh&);
91 //- Read constructor for given polyMesh
92 explicit polyTopoChanger(polyMesh&);
96 virtual ~polyTopoChanger()
102 //- Return the mesh reference
103 const polyMesh& mesh() const
108 //- Return a list of patch types
109 wordList types() const;
111 //- Return a list of patch names
112 wordList names() const;
114 //- Is topology change required
115 bool changeTopology() const;
117 //- Return topology change request
118 autoPtr<polyTopoChange> topoChangeRequest() const;
120 //- Modify point motion
121 void modifyMotionPoints(pointField&) const;
123 autoPtr<mapPolyMesh> changeMesh
126 const bool syncParallel = true,
127 const bool orderCells = false,
128 const bool orderPoints = false
131 //- Force recalculation of locally stored data on topological change
132 void update(const mapPolyMesh& m);
134 //- Add given set of topology modifiers to the topoChanger
135 void addTopologyModifiers(const List<polyMeshModifier*>& tm);
137 //- Find modifier given a name
138 label findModifierID(const word& modName) const;
141 //- writeData member function required by regIOobject
142 bool writeData(Ostream&) const;
147 bool operator!=(const polyTopoChanger&) const;
148 bool operator==(const polyTopoChanger&) const;
153 friend Ostream& operator<<(Ostream&, const polyTopoChanger&);
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 // ************************************************************************* //