Go to the documentation of this file.
71 #ifndef refinementHistory_H
72 #define refinementHistory_H
90 class mapDistributePolyMesh;
96 class refinementHistory
185 DynamicList<splitCell8>&
191 const label newProcNo,
248 const UPtrList<const labelList>& cellMaps,
249 const UPtrList<const refinementHistory>&
299 <<
"Cell " << cellI <<
" is not visible"
315 const label masterCellI,
const labelList & visibleCells() const
Per cell in the current mesh (i.e. visible) either -1 (unrefined)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
refinementHistory(const IOobject &)
Construct (read) given an IOobject. If global number of visible.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
void apply(const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections, labelList &decomposition) const
Apply any additional post-decomposition constraints.
List< label > labelList
A List of labels.
virtual bool read()
Read object. If global number of visible cells > 0 becomes active.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void compact()
Compact splitCells_. Removes all freeSplitCells_ elements.
void markSplit(const label, labelList &oldToNew, DynamicList< splitCell8 > &) const
Mark entry in splitCells. Recursively mark its parent and subs.
DynamicList< splitCell8 > splitCells_
Storage for splitCells.
label parentIndex(const label cellI) const
Get parent of cell.
bool active() const
Is there unrefinement history?
static void writeEntry(const List< splitCell8 > &, const splitCell8 &)
Debug write.
friend Ostream & operator<<(Ostream &, const refinementHistory &)
void storeSplit(const label cellI, const labelList &addedCells)
Store splitting of cell into 8.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
bool operator==(const splitCell8 &s) const
void countProc(const label index, const label newProcNo, labelList &splitCellProc, labelList &splitCellNum) const
const DynamicList< label > & freeSplitCells() const
Cache of unused indices in splitCells.
void checkIndices() const
Check consistency of structure, i.e. indices into splitCells_.
void mark(const label, const label, labelList &) const
Mark index and all its descendants.
All refinement history. Used in unrefinement.
splitCell8()
Construct null (parent = -1)
void writeDebug() const
Debug write.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
TypeName("refinementHistory")
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool operator!=(const splitCell8 &s) const
friend Istream & operator>>(Istream &, splitCell8 &)
void resize(const label nCells)
Extend/shrink storage. additional visibleCells_ elements get.
errorManip< error > abort(error &err)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
friend Istream & operator>>(Istream &, refinementHistory &)
Istream operator. Note: does not do a reduction - does not set.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation. Note:
label markCommonCells(labelList &cellToCluster) const
Mark cells according to top parent. Return number of clusters.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
DynamicList< label > freeSplitCells_
Unused indices in splitCells.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< FixedList< label, 8 > > addedCellsPtr_
Cells this cell was refined into.
void add(boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my decomposition constraints.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Foam::autoPtr< IOobject > clone() const
Clone.
void combineCells(const label masterCellI, const labelList &combinedCells)
Store combining 8 cells into master.
void subset(const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
Update numbering for subsetting.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void operator=(const splitCell8 &s)
Copy operator since autoPtr otherwise 'steals' storage.
const DynamicList< splitCell8 > & splitCells() const
Storage for splitCell8s.
void distribute(const mapDistributePolyMesh &)
Update local numbering for mesh redistribution.
void updateMesh(const mapPolyMesh &)
Update numbering for mesh changes.
label allocateSplitCell(const label parent, const label i)
Allocate a splitCell. Return index in splitCells_.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
bool & active()
Is there unrefinement history?
labelList visibleCells_
Currently visible cells. Indices into splitCells.
void freeSplitCell(const label index)
Free a splitCell.
friend Ostream & operator<<(Ostream &, const splitCell8 &)