68 #ifndef dynamicRefineFvMesh_H 69 #define dynamicRefineFvMesh_H 133 const label maxCells,
134 const label maxRefinement,
135 const scalar refineLevel,
150 const scalar minLevel,
151 const scalar maxLevel
157 const scalar lowerRefineLevel,
158 const scalar upperRefineLevel,
166 const label maxCells,
167 const label maxRefinement,
174 const scalar unrefineLevel,
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual labelList selectUnrefinePoints(const scalar unrefineLevel, const PackedBoolList &markedCell, const scalarField &pFld) const
Select points that can be unrefined.
static label count(const PackedBoolList &, const unsigned int)
Count set/unset elements in packedlist.
PackedBoolList protectedCell_
Protected cells (usually since not hexes)
virtual labelList selectRefineCells(const label maxCells, const label maxRefinement, const PackedBoolList &candidateCell) const
Subset candidate cells for refinement.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
scalarField maxPointField(const scalarField &) const
Get per cell max of connected point.
const PackedBoolList & protectedCell() const
Cells which should not be refined/unrefined.
HashTable< word > correctFluxes_
Fluxes to map.
TypeName("dynamicRefineFvMesh")
Runtime type information.
A fvMesh with built-in refinement.
void calculateProtectedCells(PackedBoolList &unrefineableCell) const
Calculate cells that cannot be refined since would trigger.
void extendMarkedCells(PackedBoolList &markedCell) const
Extend markedCell with cell-face-cell.
virtual bool update()
Update the mesh for both mesh motion and topology change.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
autoPtr< mapPolyMesh > unrefine(const labelList &)
Unrefine cells. Gets passed in centre points of cells to combine.
Refinement of (split) hexes using polyTopoChange.
hexRef8 meshCutter_
Mesh cutting engine.
streamFormat
Enumeration for the format of data in the stream.
autoPtr< mapPolyMesh > refine(const labelList &)
Refine cells. Update mesh and fields.
scalarField maxCellField(const volScalarField &) const
Get point max of connected cell.
An STL-conforming hash table.
scalar getRefineLevel(const label maxCells, const label maxRefinement, const scalar refineLevel, const scalarField &) const
Calculates approximate value for refinement level so.
void checkEightAnchorPoints(PackedBoolList &protectedCell, label &nProtected) const
Check all cells have 8 anchor points.
compressionType
Enumeration for the format of data in the stream.
scalarField cellToPoint(const scalarField &vFld) const
label nRefinementIterations_
Number of refinement/unrefinement steps done so far.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
Write using given format, version and compression.
void readDict()
Read the projection parameters from dictionary.
Abstract base class for geometry and/or topology changing fvMesh.
scalarField error(const scalarField &fld, const scalar minLevel, const scalar maxLevel) const
virtual ~dynamicRefineFvMesh()
Destructor.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual void selectRefineCandidates(const scalar lowerRefineLevel, const scalar upperRefineLevel, const scalarField &vFld, PackedBoolList &candidateCell) const
Select candidate cells for refinement.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const hexRef8 & meshCutter() const
Direct access to the refinement engine.
Switch dumpLevel_
Dump cellLevel for postprocessing.