Go to the documentation of this file.
45 void Foam::polyTopoChanger::readModifiers()
55 warnNoRereading<polyTopoChanger>();
57 PtrList<polyMeshModifier>& modifiers = *
this;
62 PtrList<entry> patchEntries(is);
63 modifiers.setSize(patchEntries.size());
65 forAll(modifiers, modifierI)
72 patchEntries[modifierI].keyword(),
73 patchEntries[modifierI].
dict(),
89 Foam::polyTopoChanger::polyTopoChanger
103 Foam::polyTopoChanger::polyTopoChanger
154 bool triggerChange =
false;
156 forAll(topoChanges, morphI)
158 if (topoChanges[morphI].active())
160 bool curTriggerChange = topoChanges[morphI].changeTopology();
164 Info<<
"Modifier " << morphI <<
" named "
165 << topoChanges[morphI].name();
167 if (curTriggerChange)
177 triggerChange = triggerChange || curTriggerChange;
183 Info<<
"Modifier " << morphI <<
" named "
184 << topoChanges[morphI].name() <<
" inactive" <<
endl;
190 return triggerChange;
203 forAll(topoChanges, morphI)
205 if (topoChanges[morphI].active())
207 topoChanges[morphI].setRefinement(
ref);
219 forAll(topoChanges, morphI)
221 if (topoChanges[morphI].active())
223 topoChanges[morphI].modifyMotionPoints(
p);
234 forAll(topoChanges, morphI)
236 topoChanges[morphI].updateMesh(m);
243 instance() = mesh_.time().timeName();
250 const bool syncParallel,
251 const bool orderCells,
252 const bool orderPoints
255 if (changeTopology())
269 mesh_.updateMesh(topoChangeMap());
270 return topoChangeMap;
273 mesh_.topoChanging(
false);
288 if (tm[tmI]->topoChanger() != *
this)
291 <<
"Mesh modifier created with different mesh reference."
308 forAll(topoChanges, morphI)
310 if (topoChanges[morphI].
name() == modName)
320 <<
"List of available modifier names: " <<
names() <<
endl;
357 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.
Functions to operate on Pointer Lists.
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.
bool good() const noexcept
True if next operation might succeed.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
bool operator!=(const polyTopoChanger &) const
messageStream Info
Information stream (stdout output on master, null elsewhere)
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)
OBJstream os(runTime.globalPath()/outputName)
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.
readOption readOpt() const noexcept
The read option.
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.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
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.
Begin list [isseparator].
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
defineTypeNameAndDebug(combustionModel, 0)
Extract type (as a word) from an object, typically using its type() method.
#define WarningInFunction
Report a warning using Foam::Warning.
bool headerOk()
Read and check header info.