All refinement history. Used in unrefinement. More...
#include <dynamicMesh/refinementHistory.H>
All refinement history. Used in unrefinement.
- visibleCells: valid for the current mesh and contains per cell -1 (cell unrefined) or an index into splitCells_.
E.g. 2 cells, cell 1 gets refined so end up with 9 cells:
// splitCells 9 ( -1 (1 2 3 4 5 6 7 8) 0 0() 0 0() 0 0() 0 0() 0 0() 0 0() 0 0() 0 0() ) // visibleCells 9(-1 1 2 3 4 5 6 7 8)
So cell0 (visibleCells=-1) is unrefined. Cells 1-8 have all valid splitCells entries which are:
The parent 0 refers back to the splitcell entries.
Definition at line 94 of file refinementHistory.H.
Inheritance diagram for refinementHistory:
Collaboration diagram for refinementHistory:Classes | |
| class | splitCell8 |
Public Member Functions | |
| refinementHistory (const IOobject &) | |
| Construct (read) given an IOobject.
| |
| refinementHistory (const IOobject &, const List< splitCell8 > &splitCells, const labelList &visibleCells) | |
| Construct (read) or construct null.
| |
| refinementHistory (const IOobject &, const label nCells) | |
| Construct (read) or construct from initial number of cells.
| |
| refinementHistory (const IOobject &, const refinementHistory &) | |
| Construct as copy.
| |
| refinementHistory (const IOobject &, Istream &) | |
| Construct from Istream.
| |
| const labelList & | visibleCells () const |
| Per cell in the current mesh (i.e. visible) either -1 (unrefined)
| |
| const DynamicList< splitCell8 > & | splitCells () const |
| Storage for splitCell8s.
| |
| const DynamicList< label > & | freeSplitCells () const |
| Cache of unused indices in splitCells.
| |
| bool | active () const |
| Is there unrefinement history. Note that this will fall over if.
| |
| label | parentIndex (const label cellI) const |
| Get parent of cell.
| |
| void | storeSplit (const label cellI, const labelList &addedCells) |
| Store splitting of cell into 8.
| |
| void | combineCells (const label masterCellI, const labelList &combinedCells) |
| Store combining 8 cells into master.
| |
| void | updateMesh (const mapPolyMesh &) |
| Update numbering for mesh changes.
| |
| void | subset (const labelList &pointMap, const labelList &faceMap, const labelList &cellMap) |
| Update numbering for subsetting.
| |
| void | distribute (const mapDistributePolyMesh &) |
| Update local numbering for mesh redistribution.
| |
| void | compact () |
| Compact splitCells_. Removes all freeSplitCells_ elements.
| |
| void | resize (const label nCells) |
| Extend/shrink storage. additional visibleCells_ elements get.
| |
| void | writeDebug () const |
| Debug write.
| |
| virtual bool | readData (Istream &) |
| ReadData function required for regIOobject read operation.
| |
| virtual bool | writeData (Ostream &) const |
| WriteData function required for regIOobject write operation.
| |
Friends | |
| Istream & | operator>> (Istream &, refinementHistory &) |
| Ostream & | operator<< (Ostream &, const refinementHistory &) |
| refinementHistory | ( | const IOobject & | io ) |
Construct (read) given an IOobject.
Definition at line 330 of file refinementHistory.C.
References regIOobject::close(), Foam::endl(), IOobject::headerOk(), IOobject::MUST_READ, Foam::Pout, IOobject::READ_IF_PRESENT, IOobject::readOpt(), regIOobject::readStream(), and List< T >::size().
| refinementHistory | ( | const IOobject & | io, |
| const List< splitCell8 > & | splitCells, | ||
| const labelList & | visibleCells | ||
| ) |
Construct (read) or construct null.
Read or construct.
Definition at line 357 of file refinementHistory.C.
References Foam::endl(), IOobject::MUST_READ, Foam::Pout, IOobject::READ_IF_PRESENT, and IOobject::readOpt().
| refinementHistory | ( | const IOobject & | io, |
| const label | nCells | ||
| ) |
Construct (read) or construct from initial number of cells.
(all visible)
Definition at line 394 of file refinementHistory.C.
References Foam::endl(), IOobject::MUST_READ, Foam::Pout, IOobject::READ_IF_PRESENT, and IOobject::readOpt().
| refinementHistory | ( | const IOobject & | io, |
| const refinementHistory & | rh | ||
| ) |
Construct as copy.
Definition at line 439 of file refinementHistory.C.
References Foam::endl(), and Foam::Pout.
| refinementHistory | ( | const IOobject & | io, |
| Istream & | is | ||
| ) |
Construct from Istream.
Definition at line 458 of file refinementHistory.C.
References Foam::endl(), Foam::Pout, and List< T >::size().
| const labelList& visibleCells | ( | ) | const [inline]
|
Per cell in the current mesh (i.e. visible) either -1 (unrefined)
or an index into splitCells.
Definition at line 262 of file refinementHistory.H.
Referenced by hexRef8::hexRef8().
| const DynamicList<splitCell8>& splitCells | ( | ) | const [inline]
|
Storage for splitCell8s.
Definition at line 268 of file refinementHistory.H.
| const DynamicList<label>& freeSplitCells | ( | ) | const [inline]
|
Cache of unused indices in splitCells.
Definition at line 274 of file refinementHistory.H.
| bool active | ( | ) | const [inline]
|
Is there unrefinement history. Note that this will fall over if.
there are 0 cells in the mesh. But this gives problems with lots of other programs anyway.
Definition at line 282 of file refinementHistory.H.
References List< T >::size().
Referenced by hexRef8::hexRef8().
| label parentIndex | ( | const label | cellI ) | const [inline]
|
Get parent of cell.
Definition at line 288 of file refinementHistory.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
| void storeSplit | ( | const label | cellI, |
| const labelList & | addedCells | ||
| ) |
Store splitting of cell into 8.
Definition at line 1063 of file refinementHistory.C.
References forAll.
| void combineCells | ( | const label | masterCellI, |
| const labelList & | combinedCells | ||
| ) |
Store combining 8 cells into master.
Definition at line 1101 of file refinementHistory.C.
References refinementHistory::splitCell8::addedCellsPtr_, forAll, and autoPtr< T >::reset().
| void updateMesh | ( | const mapPolyMesh & | map ) |
Update numbering for mesh changes.
Definition at line 501 of file refinementHistory.C.
References Foam::abort(), mapPolyMesh::cellMap(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::Pout, mapPolyMesh::reverseCellMap(), and List< T >::size().
Update numbering for subsetting.
Definition at line 550 of file refinementHistory.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::Pout, and List< T >::size().
| void distribute | ( | const mapDistributePolyMesh & | map ) |
Update local numbering for mesh redistribution.
Can only distribute clusters sent across in one go; cannot handle parts recombined in multiple passes.
Definition at line 636 of file refinementHistory.C.
References Foam::abort(), refinementHistory::splitCell8::addedCellsPtr_, PstreamBase::blocking, mapDistributePolyMesh::cellMap(), mapDistribute::constructMap(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, mapDistributePolyMesh::mesh(), primitiveMesh::nCells(), Foam::nl, Pstream::nProcs(), refinementHistory::splitCell8::parent_, Pstream::parRun(), Foam::Pout, List< T >::size(), mapDistribute::subMap(), and autoPtr< T >::valid().
| void compact | ( | ) |
Compact splitCells_. Removes all freeSplitCells_ elements.
Definition at line 900 of file refinementHistory.C.
References Foam::abort(), refinementHistory::splitCell8::addedCellsPtr_, Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, refinementHistory::splitCell8::parent_, Foam::Pout, and autoPtr< T >::valid().
| void resize | ( | const label | nCells ) |
Extend/shrink storage. additional visibleCells_ elements get.
set to -1.
Definition at line 481 of file refinementHistory.C.
References Foam::endl(), and Foam::Pout.
| void writeDebug | ( | ) | const |
Debug write.
Definition at line 1056 of file refinementHistory.C.
| bool readData | ( | Istream & | is ) | [virtual]
|
ReadData function required for regIOobject read operation.
Reimplemented from regIOobject.
Definition at line 1124 of file refinementHistory.C.
References IOstream::bad().
| bool writeData | ( | Ostream & | os ) | const [virtual]
|
WriteData function required for regIOobject write operation.
Implements regIOobject.
Definition at line 1131 of file refinementHistory.C.
References IOstream::good().
| Istream& operator>> | ( | Istream & | , |
| refinementHistory & | |||
| ) | [friend]
|
| Ostream& operator<< | ( | Ostream & | , |
| const refinementHistory & | |||
| ) | [friend]
|