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()");
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);
#define forAll(list, i)
Loop across all elements in list.
autoPtr< polyTopoChange > topoChangeRequest() const
Return topology change request.
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.
const word & name() const
Return name.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool operator!=(const polyTopoChanger &) const
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.
label findModifierID(const word &modName) const
Find modifier given a name.
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
bool good() const
Return true if next operation might succeed.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
bool changeTopology() const
Is topology change required.
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.
Virtual base class for mesh modifiers.
errorManip< error > abort(error &err)
void modifyMotionPoints(pointField &) const
Modify point motion.
wordList types() const
Return a list of patch types.
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...
bool writeData(Ostream &) const
writeData member function required by regIOobject
const Time & time() const
Return time.
defineTypeNameAndDebug(combustionModel, 0)
label size() const
Return the number of elements in the UPtrList.
writeOption writeOpt() const
const fileName & instance() const
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar me
Electron mass.
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...
polyTopoChanger(const IOobject &, polyMesh &)
Read constructor given IOobject and a polyMesh.
Mesh consisting of general polyhedral cells.
bool operator==(const polyTopoChanger &) const
const polyMesh & mesh() const
Return the mesh reference.
void addTopologyModifiers(const List< polyMeshModifier *> &tm)
Add given set of topology modifiers to the topoChanger.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
wordList names() const
Return a list of patch names.