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

dynamicRefineFvMesh Class Reference

A fvMesh with built-in refinement. More...

Inheritance diagram for dynamicRefineFvMesh:
Collaboration diagram for dynamicRefineFvMesh:

List of all members.


Public Member Functions

 TypeName ("dynamicRefineFvMesh")
 Runtime type information.
 dynamicRefineFvMesh (const IOobject &io)
 Construct from IOobject.
virtual ~dynamicRefineFvMesh ()
const hexRef8meshCutter () const
 Direct access to the refinement engine.
const PackedBoolListprotectedCell () const
 Cells which should not be refined/unrefined.
PackedBoolListprotectedCell ()
 Cells which should not be refined/unrefined.
virtual bool update ()
 Update the mesh for both mesh motion and topology change.
virtual bool writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
 Write using given format, version and compression.

Protected Member Functions

void calculateProtectedCells (PackedBoolList &unrefineableCell) const
 Calculate cells that cannot be refined since would trigger.
void readDict ()
 Read the projection parameters from dictionary.
autoPtr< mapPolyMeshrefine (const labelList &)
 Refine cells. Update mesh and fields.
autoPtr< mapPolyMeshunrefine (const labelList &)
 Unrefine cells. Gets passed in centre points of cells to combine.
scalar getRefineLevel (const label maxCells, const label maxRefinement, const scalar refineLevel, const scalarField &) const
 Calculates approximate value for refinement level so.
scalarField maxPointField (const scalarField &) const
 Get per cell max of connected point.
scalarField minCellField (const volScalarField &) const
 Get point min of connected cell.
scalarField cellToPoint (const scalarField &vFld) const
scalarField error (const scalarField &fld, const scalar minLevel, const scalar maxLevel) const
virtual void selectRefineCandidates (const scalar lowerRefineLevel, const scalar upperRefineLevel, const scalarField &vFld, PackedBoolList &candidateCell) const
 Select candidate cells for refinement.
virtual labelList selectRefineCells (const label maxCells, const label maxRefinement, const PackedBoolList &candidateCell) const
 Subset candidate cells for refinement.
virtual labelList selectUnrefinePoints (const scalar unrefineLevel, const PackedBoolList &markedCell, const scalarField &pFld) const
 Select points that can be unrefined.
void extendMarkedCells (PackedBoolList &markedCell) const
 Extend markedCell with cell-face-cell.

Static Protected Member Functions

static label count (const PackedBoolList &, const unsigned int)
 Count set/unset elements in packedlist.

Protected Attributes

hexRef8 meshCutter_
 Mesh cutting engine.
Switch dumpLevel_
 Dump cellLevel for postprocessing.
List< Pair< word > > correctFluxes_
 Fluxes to map.
label nRefinementIterations_
 Number of refinement/unrefinement steps done so far.
PackedBoolList protectedCell_
 Protected cells (usually since not hexes).

Detailed Description

A fvMesh with built-in refinement.

Determines which cells to refine/unrefine and does all in update().

Source files

Definition at line 49 of file dynamicRefineFvMesh.H.


Constructor & Destructor Documentation

dynamicRefineFvMesh ( const IOobject io  )  [explicit]

Construct from IOobject.

Definition at line 857 of file dynamicRefineFvMesh.C.

References polyMesh::faceOwner().

Here is the call graph for this function:

~dynamicRefineFvMesh (  )  [virtual]

Definition at line 990 of file dynamicRefineFvMesh.C.

References dynamicRefineFvMesh::protectedCell_.


Member Function Documentation

label count ( const PackedBoolList l,
const unsigned int  val 
) [static, protected]

Count set/unset elements in packedlist.

Definition at line 42 of file dynamicRefineFvMesh.C.

void calculateProtectedCells ( PackedBoolList unrefineableCell  )  const [protected]

Calculate cells that cannot be refined since would trigger.

refinement of protectedCell_ (since 2:1 refinement cascade)

Definition at line 60 of file dynamicRefineFvMesh.C.

void readDict (  )  [protected]

Read the projection parameters from dictionary.

Definition at line 165 of file dynamicRefineFvMesh.C.

autoPtr< mapPolyMesh > refine ( const labelList cellsToRefine  )  [protected]

Refine cells. Update mesh and fields.

Definition at line 191 of file dynamicRefineFvMesh.C.

autoPtr< mapPolyMesh > unrefine ( const labelList splitPoints  )  [protected]

Unrefine cells. Gets passed in centre points of cells to combine.

Definition at line 403 of file dynamicRefineFvMesh.C.

scalar getRefineLevel ( const label  maxCells,
const label  maxRefinement,
const scalar  refineLevel,
const scalarField  
) const [protected]

Calculates approximate value for refinement level so.

we don't go above maxCell

scalarField maxPointField ( const scalarField pFld  )  const [protected]

Get per cell max of connected point.

Definition at line 557 of file dynamicRefineFvMesh.C.

scalarField minCellField ( const volScalarField vFld  )  const [protected]

Get point min of connected cell.

Definition at line 575 of file dynamicRefineFvMesh.C.

References Foam::max().

Here is the call graph for this function:

scalarField cellToPoint ( const scalarField vFld  )  const [protected]

Definition at line 593 of file dynamicRefineFvMesh.C.

References Foam::min().

Here is the call graph for this function:

scalarField error ( const scalarField fld,
const scalar  minLevel,
const scalar  maxLevel 
) const [protected]

Definition at line 614 of file dynamicRefineFvMesh.C.

void selectRefineCandidates ( const scalar  lowerRefineLevel,
const scalar  upperRefineLevel,
const scalarField vFld,
PackedBoolList candidateCell 
) const [protected, virtual]

Select candidate cells for refinement.

Definition at line 636 of file dynamicRefineFvMesh.C.

References Foam::mag().

Here is the call graph for this function:

labelList selectRefineCells ( const label  maxCells,
const label  maxRefinement,
const PackedBoolList candidateCell 
) const [protected, virtual]

Subset candidate cells for refinement.

Definition at line 670 of file dynamicRefineFvMesh.C.

labelList selectUnrefinePoints ( const scalar  unrefineLevel,
const PackedBoolList markedCell,
const scalarField pFld 
) const [protected, virtual]

Select points that can be unrefined.

Definition at line 757 of file dynamicRefineFvMesh.C.

void extendMarkedCells ( PackedBoolList markedCell  )  const [protected]

Extend markedCell with cell-face-cell.

Definition at line 816 of file dynamicRefineFvMesh.C.

TypeName ( "dynamicRefineFvMesh"   ) 

Runtime type information.

const hexRef8& meshCutter (  )  const [inline]

Direct access to the refinement engine.

Definition at line 179 of file dynamicRefineFvMesh.H.

References dynamicRefineFvMesh::meshCutter_.

const PackedBoolList& protectedCell (  )  const [inline]

Cells which should not be refined/unrefined.

Definition at line 185 of file dynamicRefineFvMesh.H.

References dynamicRefineFvMesh::protectedCell_.

PackedBoolList& protectedCell (  )  [inline]

Cells which should not be refined/unrefined.

Definition at line 191 of file dynamicRefineFvMesh.H.

References dynamicRefineFvMesh::protectedCell_.

bool update (  )  [virtual]

Update the mesh for both mesh motion and topology change.

Implements dynamicFvMesh.

Definition at line 996 of file dynamicRefineFvMesh.C.

bool writeObject ( IOstream::streamFormat  fmt,
IOstream::versionNumber  ver,
IOstream::compressionType  cmp 
) const [virtual]

Write using given format, version and compression.

Reimplemented from objectRegistry.

Definition at line 1199 of file dynamicRefineFvMesh.C.


Member Data Documentation

hexRef8 meshCutter_ [protected]

Mesh cutting engine.

Definition at line 56 of file dynamicRefineFvMesh.H.

Referenced by dynamicRefineFvMesh::meshCutter().

Switch dumpLevel_ [protected]

Dump cellLevel for postprocessing.

Definition at line 59 of file dynamicRefineFvMesh.H.

List<Pair<word> > correctFluxes_ [protected]

Fluxes to map.

Definition at line 62 of file dynamicRefineFvMesh.H.

Number of refinement/unrefinement steps done so far.

Definition at line 65 of file dynamicRefineFvMesh.H.

Protected cells (usually since not hexes).

Definition at line 68 of file dynamicRefineFvMesh.H.

Referenced by dynamicRefineFvMesh::protectedCell(), and dynamicRefineFvMesh::~dynamicRefineFvMesh().


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