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. | |
Public Member Functions inherited from regIOobject | |
| TypeName ("regIOobject") | |
| Runtime type information. | |
| regIOobject (const IOobject &, const bool isTime=false) | |
| Construct from IOobject. Optional flag for if IOobject is the. | |
| regIOobject (const regIOobject &) | |
| Construct as copy. | |
| regIOobject (const regIOobject &, bool registerCopy) | |
| Construct as copy, and transferring registry registration to copy. | |
| virtual | ~regIOobject () |
| bool | checkIn () |
| Add object to registry. | |
| bool | checkOut () |
| Remove object from registry. | |
| bool | ownedByRegistry () const |
| Is this object owned by the registry? | |
| void | store () |
| Transfer ownership of this object to its registry. | |
| void | release () |
| Release ownership of this object from its registry. | |
| label | eventNo () const |
| Event number at last update. | |
| label & | eventNo () |
| Event number at last update. | |
| bool | upToDate (const word &) const |
| Am I uptodate with respect to other regIOobjects. | |
| bool | upToDate (const word &, const word &) const |
| bool | upToDate (const word &, const word &, const word &) const |
| bool | upToDate (const word &, const word &, const word &, const word &) const |
| void | setUpToDate () |
| Flag me as up to date. | |
| virtual void | rename (const word &newName) |
| Rename. | |
| Istream & | readStream (const word &) |
| Return Istream and check object type against that given. | |
| void | close () |
| Close Istream. | |
| virtual bool | read () |
| Read object. | |
| virtual bool | modified () const |
| Return true if the object's file has been modified. | |
| virtual bool | readIfModified () |
| Read object if modified. | |
| virtual bool | writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const |
| Write using given format, version and compression. | |
| virtual bool | write () const |
| Write using setting from DB. | |
| void | operator= (const IOobject &) |
Public Member Functions inherited from IOobject | |
| TypeName ("IOobject") | |
| Runtime type information. | |
| 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. | |
| IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
| Construct from name, instance, local, registry, io options. | |
| IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
| Construct from path, registry, io options. | |
| Foam::autoPtr< IOobject > | clone () const |
| Clone. | |
| virtual | ~IOobject () |
| const Time & | time () const |
| Return time. | |
| const objectRegistry & | db () const |
| Return the local objectRegistry. | |
| const word & | name () const |
| Return name. | |
| const word & | headerClassName () const |
| Return name of the class name read from header. | |
| string & | note () |
| Return non-constant access to the optional note. | |
| const string & | note () const |
| Return the optional note. | |
| bool | registerObject () const |
| Register object created from this IOobject with registry if true. | |
| readOption | readOpt () const |
| readOption & | readOpt () |
| writeOption | writeOpt () const |
| writeOption & | writeOpt () |
| const fileName & | rootPath () const |
| const fileName & | caseName () const |
| const fileName & | instance () const |
| fileName & | instance () |
| const fileName & | local () const |
| fileName | path () const |
| Return complete path. | |
| fileName | path (const word &instance, const fileName &local="") const |
| Return complete path with alternative instance and local. | |
| fileName | objectPath () const |
| Return complete path + object name. | |
| fileName | filePath () const |
| Return complete path + object name if the file exists. | |
| bool | readHeader (Istream &) |
| Read header. | |
| bool | headerOk () |
| Read and check header info. | |
| bool | writeHeader (Ostream &) const |
| Write header. | |
| bool | good () const |
| bool | bad () const |
| InfoProxy< IOobject > | info () const |
| Return info proxy. | |
Friends | |
| Istream & | operator>> (Istream &, refinementHistory &) |
| Ostream & | operator<< (Ostream &, const refinementHistory &) |
Additional Inherited Members | |
Static Public Member Functions inherited from regIOobject | |
| template<class Type > | |
| static Type & | store (Type *) |
| Transfer ownership of the given object pointer to its registry. | |
| template<class Type > | |
| static Type & | store (autoPtr< Type > &) |
| Transfer ownership of the given object pointer to its registry. | |
Static Public Member Functions inherited from IOobject | |
| static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
| Split path into instance, local, name components. | |
| template<class Stream > | |
| static Stream & | writeBanner (Stream &os, bool noHint=false) |
| Write the standard OpenFOAM file/dictionary banner. | |
| template<class Stream > | |
| static Stream & | writeDivider (Stream &os) |
| Write the standard file section divider. | |
| template<class Stream > | |
| static Stream & | writeEndDivider (Stream &os) |
| Write the standard end file divider. | |
Static Public Attributes inherited from regIOobject | |
| static int | fileModificationSkew |
| 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().
|
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().
|
inline |
Storage for splitCell8s.
Definition at line 268 of file refinementHistory.H.
|
inline |
Cache of unused indices in splitCells.
Definition at line 274 of file refinementHistory.H.
|
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().
|
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.
|
virtual |
ReadData function required for regIOobject read operation.
Reimplemented from regIOobject.
Definition at line 1124 of file refinementHistory.C.
References IOstream::bad().
|
virtual |
WriteData function required for regIOobject write operation.
Implements regIOobject.
Definition at line 1131 of file refinementHistory.C.
References IOstream::good().
|
friend |
|
friend |