Go to the documentation of this file.
44 void Foam::polyTopoChanger::readModifiers()
54 warnNoRereading<polyTopoChanger>();
56 PtrList<polyMeshModifier>& modifiers = *
this;
61 PtrList<entry> patchEntries(is);
62 modifiers.setSize(patchEntries.size());
64 forAll(modifiers, modifierI)
71 patchEntries[modifierI].keyword(),
72 patchEntries[modifierI].
dict(),
88 Foam::polyTopoChanger::polyTopoChanger
102 Foam::polyTopoChanger::polyTopoChanger
144 lst[i] = modifiers[i].type();
159 lst[i] = modifiers[i].name();
171 bool triggerChange =
false;
173 forAll(topoChanges, morphI)
175 if (topoChanges[morphI].active())
177 bool curTriggerChange = topoChanges[morphI].changeTopology();
181 Info<<
"Modifier " << morphI <<
" named "
182 << topoChanges[morphI].name();
184 if (curTriggerChange)
194 triggerChange = triggerChange || curTriggerChange;
200 Info<<
"Modifier " << morphI <<
" named "
201 << topoChanges[morphI].name() <<
" inactive" <<
endl;
207 return triggerChange;
220 forAll(topoChanges, morphI)
222 if (topoChanges[morphI].active())
224 topoChanges[morphI].setRefinement(
ref);
236 forAll(topoChanges, morphI)
238 if (topoChanges[morphI].active())
240 topoChanges[morphI].modifyMotionPoints(
p);
251 forAll(topoChanges, morphI)
253 topoChanges[morphI].updateMesh(m);
260 instance() = mesh_.time().timeName();
267 const bool syncParallel,
268 const bool orderCells,
269 const bool orderPoints
272 if (changeTopology())
286 mesh_.updateMesh(topoChangeMap());
287 return topoChangeMap;
290 mesh_.topoChanging(
false);
305 if (tm[tmI]->topoChanger() != *
this)
308 <<
"Mesh modifier created with different mesh reference."
325 forAll(topoChanges, morphI)
327 if (topoChanges[morphI].
name() == modName)
337 <<
"List of available modifier names: " << names() <<
endl;
374 mme[mmeI].writeDict(os);
int debug
Static debugging option.
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
points setSize(newPointi)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
A class for handling words, derived from Foam::string.
label findModifierID(const word &modName) const
Find modifier given a name.
List of mesh modifiers defining the mesh dynamics.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Direct mesh changes based on v1.3 polyTopoChange syntax.
bool changeTopology() const
Is topology change required.
autoPtr< polyTopoChange > topoChangeRequest() const
Return topology change request.
void update(const mapPolyMesh &m)
Force recalculation of locally stored data on topological change.
wordList names() const
Return a list of patch names.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void addTopologyModifiers(const List< polyMeshModifier * > &tm)
Add given set of topology modifiers to the topoChanger.
const dimensionedScalar me
Electron mass.
Mesh consisting of general polyhedral cells.
void modifyMotionPoints(pointField &) const
Modify point motion.
wordList types() const
Return a list of patch types.
#define forAll(list, i)
Loop across all elements in list.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
bool operator!=(const polyTopoChanger &) const
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
bool writeData(Ostream &) const
writeData member function required by regIOobject
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
errorManip< error > abort(error &err)
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
static autoPtr< polyMeshModifier > New(const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme)
Select constructed from dictionary.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool operator==(const polyTopoChanger &) const
void close()
Close Istream.
readOption readOpt() const
The read option.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const Time & time() const
Return the top-level database.
readOption
Enumeration defining the read options.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Istream & readStream(const word &, const bool valid=true)
Return Istream and check object type against that given.
bool good() const
Return true if next operation might succeed.
Begin list [isseparator].
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
bool headerOk()
Read and check header info.