45 bool Foam::polyTopoChanger::readIOcontents()
49 PtrList<polyMeshModifier>& modifiers = *
this;
54 PtrList<entry> entries(is);
55 modifiers.resize_null(entries.size());
57 forAll(modifiers, modifieri)
64 entries[modifieri].keyword(),
65 entries[modifieri].
dict(),
83 Foam::polyTopoChanger::polyTopoChanger
94 warnNoRereading<polyTopoChanger>();
100 Foam::polyTopoChanger::polyTopoChanger
111 mesh.time().findInstance
155 bool triggerChange =
false;
157 forAll(topoChanges, morphI)
159 if (topoChanges[morphI].active())
161 bool curTriggerChange = topoChanges[morphI].changeTopology();
165 Info<<
"Modifier " << morphI <<
" named " 166 << topoChanges[morphI].name();
168 if (curTriggerChange)
178 triggerChange = triggerChange || curTriggerChange;
184 Info<<
"Modifier " << morphI <<
" named " 185 << topoChanges[morphI].name() <<
" inactive" <<
endl;
191 return triggerChange;
199 const PtrList<polyMeshModifier>& topoChanges = *
this;
202 polyTopoChange&
ref = ptr.ref();
204 forAll(topoChanges, morphI)
206 if (topoChanges[morphI].active())
208 topoChanges[morphI].setRefinement(
ref);
218 const PtrList<polyMeshModifier>& topoChanges = *
this;
220 forAll(topoChanges, morphI)
222 if (topoChanges[morphI].active())
224 topoChanges[morphI].modifyMotionPoints(
p);
233 PtrList<polyMeshModifier>& topoChanges = *
this;
235 forAll(topoChanges, morphI)
237 topoChanges[morphI].updateMesh(m);
244 instance() = mesh_.time().timeName();
251 const bool syncParallel,
252 const bool orderCells,
253 const bool orderPoints
256 if (changeTopology())
270 mesh_.updateMesh(topoChangeMap());
271 return topoChangeMap;
274 mesh_.topoChanging(
false);
289 if (tm[tmI]->topoChanger() != *
this)
292 <<
"Mesh modifier created with different mesh reference." 307 const PtrList<polyMeshModifier>& topoChanges = *
this;
309 forAll(topoChanges, morphI)
311 if (topoChanges[morphI].
name() == modName)
321 <<
"List of available modifier names: " <<
names() <<
endl;
358 mme[mmeI].writeDict(
os);
void size(const label n)
Older name for setAddressableSize.
autoPtr< polyTopoChange > topoChangeRequest() const
Return topology change request.
void update(const mapPolyMesh &m)
Force recalculation of locally stored data on topological change.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool headerOk()
Read and check header info. Does not check the headerClassName.
Begin list [isseparator].
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.
Functions to operate on Pointer Lists.
label findModifierID(const word &modName) const
Find modifier given a name.
const dimensionedScalar me
Electron mass.
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
bool isReadOptional() const noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
bool changeTopology() const
Is topology change required.
#define forAll(list, i)
Loop across all elements in list.
points setSize(newPointi)
vectorField pointField
pointField is a vectorField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void close()
Close Istream.
List of mesh modifiers defining the mesh dynamics.
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.
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
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
#define WarningInFunction
Report a warning using Foam::Warning.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
bool good() const noexcept
True if next operation might succeed.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Automatically write from objectRegistry::writeObject()
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
bool operator==(const polyTopoChanger &) const
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
void addTopologyModifiers(const List< polyMeshModifier *> &tm)
Add given set of topology modifiers to the topoChanger.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Istream & readStream(const word &, const bool readOnProc=true)
Return Istream and check object type against that given.
Extract type (as a word) from an object, typically using its type() method.
wordList names() const
Return a list of patch names.
readOption
Enumeration defining read preferences.