75 #ifndef dynamicRefineFvMesh_H 76 #define dynamicRefineFvMesh_H 138 const label maxCells,
139 const label maxRefinement,
140 const scalar refineLevel,
155 const scalar minLevel,
156 const scalar maxLevel
162 const scalar lowerRefineLevel,
163 const scalar upperRefineLevel,
171 const label maxCells,
172 const label maxRefinement,
173 const bitSet& candidateCell
179 const scalar unrefineLevel,
239 const bool doInit=
true 250 virtual bool init(
const bool doInit);
274 virtual void mapFields(
const mapPolyMesh& mpm);
282 IOstreamOption streamOpt,
283 const bool writeOnProc
void calculateProtectedCells(bitSet &unrefineableCell) const
Calculate cells that cannot be refined since would trigger.
const surfaceVectorField & Sf() const
Return cell face area vectors.
bool dumpLevel_
Dump cellLevel for post-processing.
bool updateTopology()
Update topology (refinement, unrefinement)
scalarField maxPointField(const scalarField &) const
Get per cell max of connected point.
const hexRef8 & meshCutter() const
Direct access to the refinement engine.
scalar getRefineLevel(const label maxCells, const label maxRefinement, const scalar refineLevel, const scalarField &) const
Calculates approximate value for refinement level so.
void checkEightAnchorPoints(bitSet &protectedCell) const
Check all cells have 8 anchor points.
scalarField cellToPoint(const scalarField &vFld) const
bitSet protectedCell_
Protected cells (usually since not hexes)
HashTable< word > correctFluxes_
Fluxes to map.
TypeName("dynamicRefineFvMesh")
Runtime type information.
A fvMesh with built-in refinement.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual labelList selectUnrefinePoints(const scalar unrefineLevel, const bitSet &markedCell, const scalarField &pFld) const
Select points that can be unrefined.
virtual ~dynamicRefineFvMesh()=default
Destructor.
virtual bool update()
Update the mesh for both mesh motion and topology change.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
void mapNewInternalFaces(const labelList &faceMap, GeometricField< T, fvsPatchField, surfaceMesh > &)
Map single non-flux surface<Type>Field.
virtual autoPtr< mapPolyMesh > unrefine(const labelList &)
Unrefine cells. Gets passed in centre points of cells to combine.
virtual void selectRefineCandidates(const scalar lowerRefineLevel, const scalar upperRefineLevel, const scalarField &vFld, bitSet &candidateCell) const
Select candidate cells for refinement.
Refinement of (split) hexes using polyTopoChange.
hexRef8 meshCutter_
Mesh cutting engine.
virtual labelList selectRefineCells(const label maxCells, const label maxRefinement, const bitSet &candidateCell) const
Subset candidate cells for refinement.
virtual autoPtr< mapPolyMesh > refine(const labelList &)
Refine cells. Update mesh and fields.
A HashTable similar to std::unordered_map.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
virtual void mapFields(const mapPolyMesh &mpm)
Map all fields in time using given map.
Dynamic mesh able to handle multiple motion solvers. NOTE: If the word entry "solvers" is not found i...
label nRefinementIterations_
Number of refinement/unrefinement steps done so far.
void extendMarkedCells(bitSet &markedCell) const
Extend markedCell with cell-face-cell.
const bitSet & protectedCell() const
Cells which should not be refined/unrefined.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void readDict()
Read the projection parameters from dictionary.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Defines the attributes of an object for which implicit objectRegistry management is supported...
scalarField error(const scalarField &fld, const scalar minLevel, const scalar maxLevel) const
scalarField maxCellField(const volScalarField &) const
Get point max of connected cell.