71 #ifndef refinementHistory_H 72 #define refinementHistory_H 88 class mapDistributePolyMesh;
130 FatalErrorIn(
"splitCell8::operator=(const Foam::splitCell8&)")
131 <<
"Attempted assignment to self" 155 else if (addedCellsPtr_.
valid())
192 static void writeEntry
205 void checkIndices()
const;
211 void freeSplitCell(
const label index);
224 const label newProcNo,
266 return visibleCells_;
278 return freeSplitCells_;
286 return visibleCells_.
size() > 0;
292 label index = visibleCells_[cellI];
296 FatalErrorIn(
"refinementHistory::parentIndex(const label)")
297 <<
"Cell " << cellI <<
" is not visible" 300 return splitCells_[index].parent_;
313 const label masterCellI,
friend Istream & operator>>(Istream &, splitCell8 &)
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 ))
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
autoPtr< FixedList< label, 8 > > addedCellsPtr_
Cells this cell was refined into.
bool operator==(const splitCell8 &s) const
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void reset(T *=0)
If object pointer already set, delete object and set to given.
void writeDebug() const
Debug write.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set).
void operator=(const splitCell8 &s)
Copy operator since autoPtr otherwise 'steals' storage.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void storeSplit(const label cellI, const labelList &addedCells)
Store splitting of cell into 8.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const labelList & visibleCells() const
Per cell in the current mesh (i.e. visible) either -1 (unrefined)
void size(const label)
Override size to be inconsistent with allocated storage.
All refinement history. Used in unrefinement.
void resize(const label nCells)
Extend/shrink storage. additional visibleCells_ elements get.
void distribute(const mapDistributePolyMesh &)
Update local numbering for mesh redistribution.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
TypeName("refinementHistory")
bool operator!=(const splitCell8 &s) const
const DynamicList< label > & freeSplitCells() const
Cache of unused indices in splitCells.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
splitCell8()
Construct null (parent = -1)
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
errorManip< error > abort(error &err)
void updateMesh(const mapPolyMesh &)
Update numbering for mesh changes.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void compact()
Compact splitCells_. Removes all freeSplitCells_ elements.
void combineCells(const label masterCellI, const labelList &combinedCells)
Store combining 8 cells into master.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
refinementHistory(const IOobject &)
Construct (read) given an IOobject.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
friend Ostream & operator<<(Ostream &, const splitCell8 &)
const DynamicList< splitCell8 > & splitCells() const
Storage for splitCell8s.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
bool active() const
Is there unrefinement history. Note that this will fall over if.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void subset(const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
Update numbering for subsetting.
label parentIndex(const label cellI) const
Get parent of cell.