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;
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].topoChange(m);
254 instance() = mesh_.time().name();
261 const bool syncParallel,
262 const bool orderCells,
263 const bool orderPoints
266 if (changeTopology())
279 update(topoChangeMap());
280 mesh_.topoChange(topoChangeMap());
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.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
readOption readOpt() const
bool good() const
Return true if next operation might succeed.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label size() const
Return the number of elements in the UPtrList.
Virtual base class for mesh modifiers.
static autoPtr< polyMeshModifier > New(const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme)
Select constructed from dictionary.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Direct mesh changes based on v1.3 polyTopoChange syntax.
List of mesh modifiers defining the mesh dynamics.
bool operator==(const polyTopoChanger &) const
void update(const polyTopoChangeMap &m)
Force recalculation of locally stored data on topological change.
bool writeData(Ostream &) const
writeData member function required by regIOobject
label findModifierID(const word &modName) const
Find modifier given a name.
autoPtr< polyTopoChange > topoChangeRequest() const
Return topology change request.
void addTopologyModifiers(const List< polyMeshModifier * > &tm)
Add given set of topology modifiers to the topoChanger.
wordList types() const
Return a list of patch types.
autoPtr< polyTopoChangeMap > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
bool changeTopology() const
Is topology change required.
bool operator!=(const polyTopoChanger &) const
wordList names() const
Return a list of patch names.
void modifyMotionPoints(pointField &) const
Modify point motion.
polyTopoChanger(const IOobject &, polyMesh &)
Read constructor given IOobject and a polyMesh.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
void close()
Close Istream.
bool headerOk()
Read and check header info.
Istream & readStream(const word &, const bool read=true)
Return Istream and check object type against that given.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar me
Electron mass.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
defineTypeNameAndDebug(combustionModel, 0)
Ostream & operator<<(Ostream &, const ensightPart &)
word name(const complex &)
Return a string representation of a complex.
points setSize(newPointi)