1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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
26 Foam::polyMeshModifier
29 Virtual base class for mesh modifiers.
34 \*---------------------------------------------------------------------------*/
36 #ifndef polyMeshModifier_H
37 #define polyMeshModifier_H
43 #include "runTimeSelectionTables.H"
45 #include "pointField.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 // Forward declaration of classes
55 class polyTopoChanger;
59 /*---------------------------------------------------------------------------*\
60 Class polyMeshModifier Declaration
61 \*---------------------------------------------------------------------------*/
63 class polyMeshModifier
73 //- Reference to morph engine
74 const polyTopoChanger& topoChanger_;
77 mutable Switch active_;
80 // Private Member Functions
82 //- Disallow default bitwise copy construct
83 polyMeshModifier(const polyMeshModifier&);
85 //- Disallow default bitwise assignment
86 void operator=(const polyMeshModifier&);
91 // Static data members
93 //- Runtime type information
94 TypeName("meshModifier");
97 // Declare run-time constructor selection tables
99 declareRunTimeSelectionTable
106 const dictionary& dict,
108 const polyTopoChanger& mme
110 (name, dict, index, mme)
116 //- Construct from components
121 const polyTopoChanger& mme,
128 //- Select constructed from dictionary
129 static autoPtr<polyMeshModifier> New
132 const dictionary& dict,
134 const polyTopoChanger& mme
140 virtual ~polyMeshModifier();
146 const word& name() const
151 //- Return the index of this patch in the boundaryMesh
157 //- Return reference to morph engine
158 const polyTopoChanger& topoChanger() const;
160 //- Check for topology change
161 virtual bool changeTopology() const = 0;
163 //- Insert the topological change instructions
164 virtual void setRefinement(polyTopoChange&) const = 0;
166 //- Modify motion points to comply with the topological change
167 virtual void modifyMotionPoints(pointField& motionPoints) const = 0;
169 //- Force recalculation of locally stored data on topological change
170 virtual void updateMesh(const mapPolyMesh&) = 0;
173 // Activation and deactivation
175 const Switch& active() const
180 //- Activate mesh modifier
186 //- Activate mesh modifier
194 virtual void write(Ostream&) const = 0;
197 virtual void writeDict(Ostream&) const = 0;
202 friend Ostream& operator<<(Ostream&, const polyMeshModifier&);
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 } // End namespace Foam
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 // ************************************************************************* //