41 void Foam::polyTopoChanger::readModifiers()
52 WarningIn(
"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)
304 "void polyTopoChanger::addTopologyModifiers" 306 "const List<polyMeshModifier*>&" 308 ) <<
"Mesh modifier created with different mesh reference." 325 forAll(topoChanges, morphI)
327 if (topoChanges[morphI].
name() == modName)
336 WarningIn(
"label polyTopoChanger::findModifierID(const word&) const")
337 <<
"Modifier named " << modName <<
" not found. " 338 <<
"List of available modifier names: " <<
names() <<
endl;
375 mme[mmeI].writeDict(os);
bool writeData(Ostream &) const
writeData member function required by regIOobject
virtual void updateMesh(const mapPolyMesh &mpm)
Update the mesh corresponding to given map.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
label size() const
Return the number of elements in the PtrList.
const dimensionedScalar me
Electron mass.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void update(const mapPolyMesh &m)
Force recalculation of locally stored data on topological change.
Virtual base class for mesh modifiers.
bool changeTopology() const
Is topology change required.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
void size(const label)
Override size to be inconsistent with allocated storage.
const fileName & instance() const
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
const polyMesh & mesh() const
Return the mesh reference.
Ostream & operator<<(Ostream &, const edgeMesh &)
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define WarningIn(functionName)
Report a warning using Foam::Warning.
bool operator!=(const polyTopoChanger &) const
writeOption writeOpt() const
bool good() const
Return true if next operation might succeed.
polyMesh & mesh_
Reference to mesh.
void modifyMotionPoints(pointField &) const
Modify point motion.
List of mesh modifiers defining the mesh dynamics.
autoPtr< polyTopoChange > topoChangeRequest() const
Return topology change request.
errorManip< error > abort(error &err)
const word & name() const
Return name.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Mesh consisting of general polyhedral cells.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Direct mesh changes based on v1.3 polyTopoChange syntax.
const Time & time() const
Return time.
static autoPtr< polyMeshModifier > New(const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme)
Select constructed from dictionary.
wordList names() const
Return a list of patch names.
defineTypeNameAndDebug(combustionModel, 0)
label findModifierID(const word &modName) const
Find modifier given a name.