Go to the documentation of this file.
42 Foam::hexRef8Data::hexRef8Data(
const IOobject& io)
88 rio.
rename(
"refinementHistory");
103 Foam::hexRef8Data::hexRef8Data
111 if (
data.cellLevelPtr_.valid())
125 if (
data.pointLevelPtr_.valid())
139 if (
data.level0EdgePtr_.valid())
149 if (
data.refHistoryPtr_.valid())
154 refHistoryPtr_ =
data.refHistoryPtr_().
clone(rio, cellMap);
159 Foam::hexRef8Data::hexRef8Data
171 if (procDatas[0].cellLevelPtr_.valid())
174 rio.
rename(procDatas[0].cellLevelPtr_().
name());
181 const labelList& procCellLevel = procDatas[procI].cellLevelPtr_();
189 if (procDatas[0].pointLevelPtr_.valid())
192 rio.
rename(procDatas[0].pointLevelPtr_().
name());
195 labelList& pointLevel = pointLevelPtr_();
199 const labelList& procPointLevel = procDatas[procI].pointLevelPtr_();
200 labelUIndList(pointLevel, pointMaps[procI]) = procPointLevel;
207 if (procDatas[0].level0EdgePtr_.valid())
210 rio.
rename(procDatas[0].level0EdgePtr_().
name());
217 procDatas[0].level0EdgePtr_()
225 if (procDatas[0].refHistoryPtr_.valid())
228 rio.
rename(procDatas[0].refHistoryPtr_().
name());
233 procRefs.set(i, &procDatas[i].refHistoryPtr_());
262 if (hasCellLevel && !cellLevelPtr_.valid())
274 if (hasPointLevel && !pointLevelPtr_.valid())
291 if (!level0EdgePtr_.valid())
308 if (hasHistory && !refHistoryPtr_.valid())
311 rio.
rename(
"refinementHistory");
323 (cellLevelPtr_.valid() && cellLevelPtr_().size() != map.
nOldCells())
324 || (pointLevelPtr_.valid() && pointLevelPtr_().size() != map.
nOldPoints())
327 cellLevelPtr_.clear();
328 pointLevelPtr_.clear();
329 level0EdgePtr_.clear();
330 refHistoryPtr_.clear();
335 if (cellLevelPtr_.valid())
343 label oldCelli = cellMap[newCelli];
347 newCellLevel[newCelli] = 0;
351 newCellLevel[newCelli] = cellLevel[oldCelli];
357 if (pointLevelPtr_.valid())
360 labelList& pointLevel = pointLevelPtr_();
362 labelList newPointLevel(pointMap.size());
373 newPointLevel[
newPointi] = pointLevel[oldPointi];
381 if (refHistoryPtr_.valid() && refHistoryPtr_().active())
383 refHistoryPtr_().updateMesh(map);
391 if (cellLevelPtr_.valid())
395 if (pointLevelPtr_.valid())
402 if (refHistoryPtr_.valid() && refHistoryPtr_().active())
404 refHistoryPtr_().distribute(map);
412 if (cellLevelPtr_.valid())
414 ok = ok && cellLevelPtr_().write();
416 if (pointLevelPtr_.valid())
418 ok = ok && pointLevelPtr_().write();
420 if (level0EdgePtr_.valid())
422 ok = ok && level0EdgePtr_().write();
424 if (refHistoryPtr_.valid())
426 ok = ok && refHistoryPtr_().write();
List< label > labelList
A List of labels.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
label size() const noexcept
The number of elements in the list.
const word & name() const
Return name.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero.
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (uses typeFilePath to find file) and check its info.
const fileName & facesInstance() const
Return the current instance directory for faces.
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const word & name() const
Name function is needed to disambiguate those inherited.
IOList< label > labelIOList
Label container classes.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
const mapDistribute & cellMap() const
Cell distribute map.
const objectRegistry & db() const
Return the local objectRegistry.
All refinement history. Used in unrefinement.
label nCells() const
Number of mesh cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
messageStream Info
Information stream (uses stdout - output is on the master only)
label nOldPoints() const
Number of old points.
word name(const complex &c)
Return string representation of complex.
UniformDimensionedField< scalar > uniformDimensionedScalarField
void transfer(List< T > &list)
void updateMesh(const mapPolyMesh &)
Update local numbering for changed mesh.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void distribute(const mapDistributePolyMesh &)
In-place distribute.
Various for reading/decomposing/reconstructing/distributing refinement data.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
virtual void rename(const word &newName)
Rename.
void sync(const IOobject &io)
Parallel synchronise. This enforces valid objects on all processors.
static bool master(const label communicator=0)
Am I the master process.
const labelList & pointMap() const
Old point map.
readOption readOpt() const
The read option.
label nOldCells() const
Number of old cells.
autoPtr< dictionary > clone() const
Construct and return clone.
label nPoints() const
Number of mesh points.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
~hexRef8Data()
Destructor.
const mapDistribute & pointMap() const
Point distribute map.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const polyMesh & mesh() const
Return polyMesh.
Database for solution data, solver performance and other reduced data.
const labelList & cellMap() const
Old cell map.
UIndirectList< label > labelUIndList
UIndirectList of labels.