73#ifndef refinementHistory_H
74#define refinementHistory_H
165 static void writeEntry
179 bool readIOcontents();
182 void checkIndices()
const;
185 label allocateSplitCell(
const label parent,
const label i);
188 void freeSplitCell(
const label index);
201 const label newProcNo,
209 void mark(
const label,
const label,
labelList&)
const;
213 label markCommonCells(
labelList& cellToCluster)
const;
274 return visibleCells_;
286 return freeSplitCells_;
304 label index = visibleCells_[celli];
309 <<
"Cell " << celli <<
" is not visible"
312 return splitCells_[index].parent_;
325 const label masterCelli,
368 void resize(
const label nCells);
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
autoPtr< IOobject > clone() const
Clone.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Mesh consisting of general polyhedral cells.
splitCell8()
Default construct (parent = -1).
bool operator==(const splitCell8 &rhs) const
autoPtr< FixedList< label, 8 > > addedCellsPtr_
Cells this cell was refined into.
friend Istream & operator>>(Istream &, splitCell8 &)
bool operator!=(const splitCell8 &rhs) const
friend Ostream & operator<<(Ostream &, const splitCell8 &)
void operator=(const splitCell8 &rhs)
Copy assignment (no autoPtr stealing).
All refinement history. Used in unrefinement.
void compact()
Compact splitCells_. Removes all freeSplitCells_ elements.
friend Ostream & operator<<(Ostream &, const refinementHistory &)
label parentIndex(const label celli) const
Get parent of cell.
friend Istream & operator>>(Istream &, refinementHistory &)
Istream operator. Note: does not do a reduction - does not set.
void writeDebug() const
Debug write.
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
void storeSplit(const label celli, const labelList &addedCells)
Store splitting of cell into 8.
TypeName("refinementHistory")
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.
void add(boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my decomposition constraints.
const DynamicList< splitCell8 > & splitCells() const
Storage for splitCell8s.
void distribute(const mapDistributePolyMesh &)
Update local numbering for mesh redistribution.
const DynamicList< label > & freeSplitCells() const
Cache of unused indices in splitCells.
void resize(const label nCells)
Extend/shrink storage. additional visibleCells_ elements get.
refinementHistory(const IOobject &)
Construct (read) given an IOobject.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation. Note:
void updateMesh(const mapPolyMesh &)
Update numbering for mesh changes.
const labelList & visibleCells() const
Per cell in the current mesh (i.e. visible) either -1 (unrefined) or an index into splitCells.
bool active() const
Is there unrefinement history?
bool & active()
Is there unrefinement history?
void subset(const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
Update numbering for subsetting.
virtual bool read()
Read object. If global number of visible cells > 0 becomes active.
void combineCells(const label masterCelli, const labelList &combinedCells)
Store combining 8 cells into master.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< label > labelList
A List of labels.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
errorManip< error > abort(error &err)
List< bool > boolList
A List of bools.
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
UList< label > labelUList
A UList of labels.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.