41 void Foam::polyTopoChanger::readModifiers()
53 <<
"Specified IOobject::MUST_READ_IF_MODIFIED but class" 54 <<
" does not support automatic re-reading." 59 PtrList<polyMeshModifier>& modifiers = *
this;
62 Istream& is = readStream(typeName);
64 PtrList<entry> patchEntries(is);
65 modifiers.setSize(patchEntries.size());
67 forAll(modifiers, modifierI)
74 patchEntries[modifierI].keyword(),
75 patchEntries[modifierI].
dict(),
83 is.check(
"polyTopoChanger::readModifiers()");
90 Foam::polyTopoChanger::polyTopoChanger
104 Foam::polyTopoChanger::polyTopoChanger(
polyMesh& mesh)
112 mesh.time().findInstance
136 forAll(modifiers, modifierI)
138 t[modifierI] = modifiers[modifierI].type();
151 forAll(modifiers, modifierI)
153 t[modifierI] = modifiers[modifierI].name();
165 bool triggerChange =
false;
167 forAll(topoChanges, morphI)
169 if (topoChanges[morphI].active())
171 bool curTriggerChange = topoChanges[morphI].changeTopology();
175 Info<<
"Modifier " << morphI <<
" named " 176 << topoChanges[morphI].name();
178 if (curTriggerChange)
188 triggerChange = triggerChange || curTriggerChange;
194 Info<<
"Modifier " << morphI <<
" named " 195 << topoChanges[morphI].name() <<
" inactive" <<
endl;
201 return triggerChange;
214 forAll(topoChanges, morphI)
216 if (topoChanges[morphI].active())
218 topoChanges[morphI].setRefinement(ref);
230 forAll(topoChanges, morphI)
232 if (topoChanges[morphI].active())
234 topoChanges[morphI].modifyMotionPoints(p);
245 forAll(topoChanges, morphI)
247 topoChanges[morphI].updateMesh(m);
261 const bool syncParallel,
262 const bool orderCells,
263 const bool orderPoints
281 return topoChangeMap;
300 if (tm[tmI]->topoChanger() != *
this)
303 <<
"Mesh modifier created with different mesh reference." 320 forAll(topoChanges, morphI)
322 if (topoChanges[morphI].
name() == modName)
332 <<
"List of available modifier names: " <<
names() <<
endl;
369 mme[mmeI].writeDict(os);
const Time & time() const
Return time.
#define forAll(list, i)
Loop across all elements in list.
void update(const mapPolyMesh &m)
Force recalculation of locally stored data on topological change.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool changeTopology() const
Is topology change required.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool operator!=(const polyTopoChanger &) const
void size(const label)
Override size to be inconsistent with allocated storage.
bool good() const
Return true if next operation might succeed.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static autoPtr< polyMeshModifier > New(const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme)
Select constructed from dictionary.
polyMesh & mesh_
Reference to mesh.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const dimensionedScalar me
Electron mass.
writeOption writeOpt() const
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const polyMesh & mesh() const
Return the mesh reference.
bool writeData(Ostream &) const
writeData member function required by regIOobject
virtual void updateMesh(const mapPolyMesh &mpm)
Update the mesh corresponding to given map.
List of mesh modifiers defining the mesh dynamics.
A class for handling words, derived from string.
bool operator==(const polyTopoChanger &) const
wordList types() const
Return a list of patch types.
void addTopologyModifiers(const List< polyMeshModifier * > &tm)
Add given set of topology modifiers to the topoChanger.
void modifyMotionPoints(pointField &) const
Modify point motion.
Virtual base class for mesh modifiers.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
defineTypeNameAndDebug(combustionModel, 0)
label findModifierID(const word &modName) const
Find modifier given a name.
#define WarningInFunction
Report a warning using Foam::Warning.
Direct mesh changes based on v1.3 polyTopoChange syntax.
Ostream & operator<<(Ostream &, const ensightPart &)
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Mesh consisting of general polyhedral cells.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const fileName & instance() const
const word & name() const
Return name.
autoPtr< polyTopoChange > topoChangeRequest() const
Return topology change request.
label size() const
Return the number of elements in the UPtrList.
wordList names() const
Return a list of patch names.