39 Foam::hexRef8Data::hexRef8Data(
const IOobject& io)
73 rio.
rename(
"refinementHistory");
84 Foam::hexRef8Data::hexRef8Data
92 if (data.cellLevelPtr_.valid())
95 rio.
rename(data.cellLevelPtr_().name());
106 if (data.pointLevelPtr_.valid())
109 rio.
rename(data.pointLevelPtr_().name());
120 if (data.level0EdgePtr_.valid())
123 rio.
rename(data.level0EdgePtr_().name());
130 if (data.refHistoryPtr_.valid())
133 rio.
rename(data.refHistoryPtr_().name());
135 refHistoryPtr_ = data.refHistoryPtr_().clone(rio, cellMap);
140 Foam::hexRef8Data::hexRef8Data
152 if (procDatas[0].cellLevelPtr_.valid())
155 rio.
rename(procDatas[0].cellLevelPtr_().
name());
162 const labelList& procCellLevel = procDatas[procI].cellLevelPtr_();
170 if (procDatas[0].pointLevelPtr_.valid())
173 rio.
rename(procDatas[0].pointLevelPtr_().
name());
176 labelList& pointLevel = pointLevelPtr_();
180 const labelList& procPointLevel = procDatas[procI].pointLevelPtr_();
188 if (procDatas[0].level0EdgePtr_.valid())
191 rio.
rename(procDatas[0].level0EdgePtr_().
name());
198 procDatas[0].level0EdgePtr_()
206 if (procDatas[0].refHistoryPtr_.valid())
209 rio.
rename(procDatas[0].refHistoryPtr_().
name());
214 procRefs.set(i, &procDatas[i].refHistoryPtr_());
243 if (hasCellLevel && !cellLevelPtr_.valid())
252 if (hasPointLevel && !pointLevelPtr_.valid())
267 scalar masterLen = level0EdgePtr_().value();
269 if (!level0EdgePtr_.valid())
286 if (hasHistory && !refHistoryPtr_.valid())
289 rio.
rename(
"refinementHistory");
298 if (cellLevelPtr_.valid())
302 if (pointLevelPtr_.valid())
309 if (refHistoryPtr_.valid() && refHistoryPtr_().active())
311 refHistoryPtr_().distribute(map);
319 if (cellLevelPtr_.valid())
321 ok = ok && cellLevelPtr_().write();
323 if (pointLevelPtr_.valid())
325 ok = ok && pointLevelPtr_().write();
327 if (level0EdgePtr_.valid())
329 ok = ok && level0EdgePtr_().write();
331 if (refHistoryPtr_.valid())
333 ok = ok && refHistoryPtr_().write();
#define forAll(list, i)
Loop across all elements in list.
const objectRegistry & db() const
Return the local objectRegistry.
void sync(const IOobject &io)
Parallel synchronise. This enforces valid objects on all processors.
bool write() const
Write.
virtual void rename(const word &newName)
Rename.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
UniformDimensionedField< scalar > uniformDimensionedScalarField
List< label > labelList
A List of labels.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
const mapDistribute & pointMap() const
Point distribute map.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
word name(const complex &)
Return a string representation of a complex.
const mapDistribute & cellMap() const
Cell distribute map.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A List with indirect addressing.
readOption readOpt() const
bool headerOk()
Read and check header info.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
void distribute(const mapDistributePolyMesh &)
In-place distribute.
Various for reading/decomposing/reconstructing/distributing refinement data.
Mesh consisting of general polyhedral cells.
All refinement history. Used in unrefinement.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
~hexRef8Data()
Destructor.
const word & name() const
Return name.
IOList< label > labelIOList
Label container classes.
label size() const
Return the number of elements in the UPtrList.