45bool Foam::polyTopoChanger::readContents()
54 PtrList<polyMeshModifier>& modifiers = *
this;
57 Istream& is = readStream(typeName);
59 PtrList<entry> patchEntries(is);
60 modifiers.setSize(patchEntries.size());
62 forAll(modifiers, modifierI)
69 patchEntries[modifierI].keyword(),
70 patchEntries[modifierI].
dict(),
99 warnNoRereading<polyTopoChanger>();
117 mesh.time().findInstance
161 bool triggerChange =
false;
163 forAll(topoChanges, morphI)
165 if (topoChanges[morphI].active())
167 bool curTriggerChange = topoChanges[morphI].changeTopology();
171 Info<<
"Modifier " << morphI <<
" named "
172 << topoChanges[morphI].name();
174 if (curTriggerChange)
184 triggerChange = triggerChange || curTriggerChange;
190 Info<<
"Modifier " << morphI <<
" named "
191 << topoChanges[morphI].name() <<
" inactive" <<
endl;
197 return triggerChange;
210 forAll(topoChanges, morphI)
212 if (topoChanges[morphI].active())
214 topoChanges[morphI].setRefinement(
ref);
226 forAll(topoChanges, morphI)
228 if (topoChanges[morphI].active())
230 topoChanges[morphI].modifyMotionPoints(
p);
241 forAll(topoChanges, morphI)
243 topoChanges[morphI].updateMesh(m);
250 instance() = mesh_.time().timeName();
257 const bool syncParallel,
258 const bool orderCells,
259 const bool orderPoints
262 if (changeTopology())
276 mesh_.updateMesh(topoChangeMap());
277 return topoChangeMap;
280 mesh_.topoChanging(
false);
295 if (tm[tmI]->topoChanger() != *
this)
298 <<
"Mesh modifier created with different mesh reference."
315 forAll(topoChanges, morphI)
317 if (topoChanges[morphI].
name() == modName)
327 <<
"List of available modifier names: " << names() <<
endl;
364 mme[mmeI].writeDict(
os);
Functions to operate on Pointer Lists.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
readOption readOpt() const noexcept
The read option.
readOption
Enumeration defining the read options.
bool good() const noexcept
True if next operation might succeed.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of elements in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual bool update()
Update the mesh for both mesh motion and topology change.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Virtual base class for mesh modifiers.
Mesh consisting of general polyhedral cells.
Direct mesh changes based on v1.3 polyTopoChange syntax.
List of mesh modifiers defining the mesh dynamics.
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.
bool changeTopology() const
Is topology change required.
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
wordList names() const
Return a list of patch names.
void modifyMotionPoints(pointField &) const
Modify point motion.
friend bool operator!=(const refineCell &rc1, const refineCell &rc2)
friend bool operator==(const refineCell &rc1, const refineCell &rc2)
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. Does not check the headerClassName.
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
points setSize(newPointi)
#define forAll(list, i)
Loop across all elements in list.
Extract type (as a word) from an object, typically using its type() method.