OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

refinementHistory Class Reference

All refinement history. Used in unrefinement. More...

Inheritance diagram for refinementHistory:
Collaboration diagram for refinementHistory:

List of all members.


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 labelListvisibleCells () 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

Istreamoperator>> (Istream &, refinementHistory &)
Ostreamoperator<< (Ostream &, const refinementHistory &)

Detailed Description

All refinement history. Used in unrefinement.

  • visibleCells: valid for the current mesh and contains per cell -1 (cell unrefined) or an index into splitCells_.
  • splitCells: for every split contains the parent (also index into splitCells) and optionally a subsplit as 8 indices into splitCells. Note that the numbers in splitCells are not cell labels, they are purely indices 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:

  • parent:0
  • subsplits:0()

The parent 0 refers back to the splitcell entries.

Source files

Definition at line 89 of file refinementHistory.H.


Constructor & Destructor Documentation

refinementHistory ( const IOobject io  ) 

Construct (read) given an IOobject.

Definition at line 322 of file refinementHistory.C.

refinementHistory ( const IOobject io,
const List< splitCell8 > &  splitCells,
const labelList visibleCells 
)

Construct (read) or construct null.

Read or construct.

Definition at line 349 of file refinementHistory.C.

refinementHistory ( const IOobject io,
const label  nCells 
)

Construct (read) or construct from initial number of cells.

(all visible)

Definition at line 386 of file refinementHistory.C.

refinementHistory ( const IOobject io,
const refinementHistory rh 
)

Construct as copy.

Definition at line 431 of file refinementHistory.C.

refinementHistory ( const IOobject io,
Istream is 
)

Construct from Istream.

Definition at line 450 of file refinementHistory.C.

References Foam::Pout.


Member Function Documentation

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 261 of file refinementHistory.H.

Referenced by hexRef8::getSplitPoints().

Here is the caller graph for this function:

const DynamicList<splitCell8>& splitCells (  )  const [inline]

Storage for splitCell8s.

Definition at line 267 of file refinementHistory.H.

const DynamicList<label>& freeSplitCells (  )  const [inline]

Cache of unused indices in splitCells.

Definition at line 273 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 283 of file refinementHistory.H.

Referenced by hexRef8::getSplitPoints().

Here is the caller graph for this function:

label parentIndex ( const label  cellI  )  const [inline]

Get parent of cell.

Definition at line 289 of file refinementHistory.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Referenced by hexRef8::getSplitPoints().

Here is the call graph for this function:

Here is the caller graph for this function:

void storeSplit ( const label  cellI,
const labelList addedCells 
)

Store splitting of cell into 8.

Definition at line 1055 of file refinementHistory.C.

References refinementHistory::writeDebug().

Here is the call graph for this function:

void combineCells ( const label  masterCellI,
const labelList combinedCells 
)

Store combining 8 cells into master.

Definition at line 1093 of file refinementHistory.C.

void updateMesh ( const mapPolyMesh map  ) 

Update numbering for mesh changes.

Definition at line 493 of file refinementHistory.C.

void subset ( const labelList pointMap,
const labelList faceMap,
const labelList cellMap 
)

Update numbering for subsetting.

Definition at line 542 of file refinementHistory.C.

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 628 of file refinementHistory.C.

Referenced by hexRef8::checkMesh().

Here is the caller graph for this function:

void compact (  ) 

Compact splitCells_. Removes all freeSplitCells_ elements.

Definition at line 892 of file refinementHistory.C.

void resize ( const label  nCells  ) 

Extend/shrink storage. additional visibleCells_ elements get.

set to -1.

Definition at line 473 of file refinementHistory.C.

void writeDebug (  )  const

Debug write.

Definition at line 1048 of file refinementHistory.C.

Referenced by refinementHistory::storeSplit().

Here is the caller graph for this function:

bool readData ( Istream is  )  [virtual]

ReadData function required for regIOobject read operation.

Reimplemented from regIOobject.

Definition at line 1116 of file refinementHistory.C.

bool writeData ( Ostream os  )  const [virtual]

WriteData function required for regIOobject write operation.

Implements regIOobject.

Definition at line 1123 of file refinementHistory.C.

References IOstream::bad().

Here is the call graph for this function:


Friends And Related Function Documentation

Istream& operator>> ( Istream ,
refinementHistory  
) [friend]

Ostream& operator<< ( Ostream ,
const refinementHistory  
) [friend]


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd