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);
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A HashTable similar to std::unordered_map.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
The IOstreamOption is a simple container for options an IOstream can normally have.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A topoSetPointSource to select all the points from given cellSet(s).
Dynamic mesh able to handle multiple motion solvers. NOTE: If the word entry "solvers" is not found i...
A fvMesh with built-in refinement.
bitSet & protectedCell()
Cells which should not be refined/unrefined.
virtual ~dynamicRefineFvMesh()=default
Destructor.
void readDict()
Read the projection parameters from dictionary.
bool updateTopology()
Update topology (refinement, unrefinement)
void mapNewInternalFaces(const labelList &faceMap, GeometricField< T, fvsPatchField, surfaceMesh > &)
Map single non-flux surface<Type>Field.
hexRef8 meshCutter_
Mesh cutting engine.
scalar getRefineLevel(const label maxCells, const label maxRefinement, const scalar refineLevel, const scalarField &) const
Calculates approximate value for refinement level so.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
const hexRef8 & meshCutter() const
Direct access to the refinement engine.
virtual autoPtr< mapPolyMesh > refine(const labelList &)
Refine cells. Update mesh and fields.
HashTable< word > correctFluxes_
Fluxes to map.
scalarField maxPointField(const scalarField &) const
Get per cell max of connected point.
bool dumpLevel_
Dump cellLevel for post-processing.
void calculateProtectedCells(bitSet &unrefineableCell) const
Calculate cells that cannot be refined since would trigger.
virtual labelList selectRefineCells(const label maxCells, const label maxRefinement, const bitSet &candidateCell) const
Subset candidate cells for refinement.
bitSet protectedCell_
Protected cells (usually since not hexes)
label nRefinementIterations_
Number of refinement/unrefinement steps done so far.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
const bitSet & protectedCell() const
Cells which should not be refined/unrefined.
virtual bool update()
Update the mesh for both mesh motion and topology change.
virtual void selectRefineCandidates(const scalar lowerRefineLevel, const scalar upperRefineLevel, const scalarField &vFld, bitSet &candidateCell) const
Select candidate cells for refinement.
scalarField maxCellField(const volScalarField &) const
Get point max of connected cell.
virtual labelList selectUnrefinePoints(const scalar unrefineLevel, const bitSet &markedCell, const scalarField &pFld) const
Select points that can be unrefined.
TypeName("dynamicRefineFvMesh")
Runtime type information.
void extendMarkedCells(bitSet &markedCell) const
Extend markedCell with cell-face-cell.
virtual void mapFields(const mapPolyMesh &mpm)
Map all fields in time using given map.
virtual autoPtr< mapPolyMesh > unrefine(const labelList &)
Unrefine cells. Gets passed in centre points of cells to combine.
void checkEightAnchorPoints(bitSet &protectedCell) const
Check all cells have 8 anchor points.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
Refinement of (split) hexes using polyTopoChange.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.