52 if (polyTopoChange::debug)
70 if (polyTopoChange::debug)
88 if (polyTopoChange::debug)
95 new localUniformDimensionedScalarField(rio,
dimLength)
101 rio.
rename(
"refinementHistory");
109 if (polyTopoChange::debug)
128 if (data.cellLevelPtr_.valid())
131 rio.
rename(data.cellLevelPtr_().name());
142 if (data.pointLevelPtr_.valid())
145 rio.
rename(data.pointLevelPtr_().name());
156 if (data.level0EdgePtr_.
valid())
159 rio.
rename(data.level0EdgePtr_().name());
163 new localUniformDimensionedScalarField(rio, data.level0EdgePtr_())
166 if (data.refHistoryPtr_.valid())
169 rio.
rename(data.refHistoryPtr_().name());
171 refHistoryPtr_ = data.refHistoryPtr_().clone(rio, cellMap);
188 if (procDatas[0].cellLevelPtr_.valid())
191 rio.
rename(procDatas[0].cellLevelPtr_().
name());
198 const labelList& procCellLevel = procDatas[procI].cellLevelPtr_();
206 if (procDatas[0].pointLevelPtr_.valid())
209 rio.
rename(procDatas[0].pointLevelPtr_().
name());
212 labelList& pointLevel = pointLevelPtr_();
216 const labelList& procPointLevel = procDatas[procI].pointLevelPtr_();
224 if (procDatas[0].level0EdgePtr_.valid())
227 rio.
rename(procDatas[0].level0EdgePtr_().
name());
231 new localUniformDimensionedScalarField
234 procDatas[0].level0EdgePtr_()
242 if (procDatas[0].refHistoryPtr_.valid())
245 rio.
rename(procDatas[0].refHistoryPtr_().
name());
250 procRefs.
set(i, &procDatas[i].refHistoryPtr_());
279 if (hasCellLevel && !cellLevelPtr_.valid())
288 if (hasPointLevel && !pointLevelPtr_.valid())
303 scalar masterLen = level0EdgePtr_().value();
305 if (!level0EdgePtr_.valid())
312 new localUniformDimensionedScalarField
322 if (hasHistory && !refHistoryPtr_.valid())
325 rio.
rename(
"refinementHistory");
334 if (cellLevelPtr_.valid())
339 if (pointLevelPtr_.valid())
347 if (refHistoryPtr_.valid() && refHistoryPtr_().active())
349 refHistoryPtr_().topoChange(map);
357 if (cellLevelPtr_.valid())
361 if (pointLevelPtr_.valid())
368 if (refHistoryPtr_.valid() && refHistoryPtr_().active())
370 refHistoryPtr_().distribute(map);
378 if (cellLevelPtr_.valid())
380 ok = ok && cellLevelPtr_().write();
382 if (pointLevelPtr_.valid())
384 ok = ok && pointLevelPtr_().write();
386 if (level0EdgePtr_.valid())
388 ok = ok && level0EdgePtr_().write();
390 if (refHistoryPtr_.valid())
392 ok = ok && refHistoryPtr_().write();
#define forAll(list, i)
Loop across all elements in list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const objectRegistry & db() const
Return the local objectRegistry.
readOption readOpt() const
virtual void rename(const word &newName)
Rename.
const word & name() const
Return name.
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
A List with indirect addressing.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
label size() const
Return the number of elements in the UPtrList.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
Various for reading/decomposing/reconstructing/distributing refinement data.
void topoChange(const polyTopoChangeMap &)
In-place update for topology changes.
void distribute(const polyDistributionMap &)
In-place distribute.
void sync(const IOobject &io)
Parallel synchronise. This enforces valid objects on all processors.
~hexRef8Data()
Destructor.
hexRef8Data(const IOobject &io)
Construct read. Has special provision for only some processors.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const distributionMap & cellMap() const
Cell distribute map.
const distributionMap & pointMap() const
Point distribute map.
Mesh consisting of general polyhedral cells.
const fileName & facesInstance() const
Return the current instance directory for faces.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelList & cellMap() const
Old cell map.
const labelList & pointMap() const
Old point map.
const polyMesh & mesh() const
Return polyMesh.
All refinement history. Used in unrefinement.
Templated form of IOobject providing type information for file reading and header type checking.
bool headerOk()
Read header (uses typeGlobalFile to find file) and check.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimLength
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
IOList< label > labelIOList
Label container classes.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.