44 #ifndef cellCellStencils_inverseDistance_H 45 #define cellCellStencils_inverseDistance_H 61 namespace cellCellStencils
156 const unsigned int val
166 const unsigned int val
204 const label destMesh,
205 const label currentDonorMesh,
206 const label newDonorMesh
258 const scalar wantedFraction,
269 const bool allowHoleDonors
static point position(const boundBox &bb, const labelVector &nDivs, const label boxI)
Convert index back into coordinate.
const bool allowHoleDonors_
Allow holes as donors.
List< scalar > scalarList
List of scalar.
Inverse-distance-weighted interpolation stencil.
virtual const labelListList & cellStencil() const
Per interpolated cell the neighbour cells (in terms of slots as.
scalarListList cellInterpolationWeights_
Interpolation weights.
static labelVector index3(const labelVector &nDivs, const label)
Convert single index into ijk.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const dictionary dict_
Dictionary of motion control parameters.
void findHoles(const globalIndex &globalCells, const fvMesh &mesh, const labelList &zoneID, const labelListList &stencil, labelList &cellTypes) const
Do flood filling to detect unreachable (from patches) sections.
autoPtr< globalIndex > compactedRegionSplit(const fvMesh &mesh, const globalIndex &globalFaces, labelList &cellRegion) const
wordList patchTypes(nPatches)
bool betterDonor(const label destMesh, const label currentDonorMesh, const label newDonorMesh) const
If multiple donors meshes: decide which is best.
autoPtr< mapDistribute > cellInterpolationMap_
Fetch interpolated cells.
labelList interpolationCells_
Indices of interpolated cells.
static void markBoundaries(const fvMesh &mesh, const vector &smallVec, const boundBox &bb, const labelVector &nDivs, PackedList< 2 > &patchTypes, const labelList &cellMap, labelList &patchCellTypes)
Mark voxels of patchTypes with type of patch face.
static void fill(PackedList< 2 > &elems, const boundBox &bb, const labelVector &nDivs, const boundBox &subBb, const unsigned int val)
Fill all elements overlapping subBb with value val.
void uncompactedRegionSplit(const fvMesh &mesh, const globalIndex &globalFaces, const label nZones, const labelList &zoneID, const labelList &cellTypes, const boolList &isBlockedFace, labelList &cellRegion) const
Replacement of regionSplit.
A bounding box defined in terms of min/max extrema points.
virtual const scalarListList & cellInterpolationWeights() const
Weights for cellStencil.
List< labelList > labelListList
List of labelList.
virtual ~inverseDistance()
Destructor.
void markDonors(const globalIndex &globalCells, PstreamBuffers &pBufs, const PtrList< fvMeshSubset > &meshParts, const List< treeBoundBoxList > &meshBb, const labelList &allCellTypes, const label srcI, const label tgtI, labelListList &allStencil, labelList &allDonor) const
Determine donors for all tgt cells.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Calculation of interpolation stencils.
virtual void stencilWeights(const point &sample, const pointList &donorCcs, scalarList &weights) const
Calculate inverse distance weights for a single acceptor.
List< scalarList > scalarListList
List of scalarList.
void markPatchesAsHoles(PstreamBuffers &pBufs, const PtrList< fvMeshSubset > &meshParts, const List< treeBoundBoxList > &patchBb, const List< labelVector > &patchDivisions, const PtrList< PackedList< 2 >> &patchParts, const label srcI, const label tgtI, labelList &allCellTypes) const
Mark all cells overlapping (a voxel covered by) a src patch.
virtual void createStencil(const globalIndex &, const bool allowHoleDonors)
Create stencil starting from the donor containing the acceptor allowHoleDonors : allow donors of type...
virtual const scalarList & cellInterpolationWeight() const
Per interpolated cell the interpolation factor. (0 = use.
virtual bool update()
Update stencils. Return false if nothing changed.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
labelListList cellStencil_
Interpolation stencil.
labelList cellTypes_
Per cell the cell type.
static label index(const labelVector &nDivs, const labelVector &)
Convert ijk indices into single index.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
const labelIOList & zoneID() const
Helper: get reference to registered zoneID. Loads volScalarField.
virtual const labelUList & cellTypes() const
Return the cell type list.
Class containing processor-to-processor mapping information.
vector point
Point is a vector.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
virtual const mapDistribute & cellInterpolationMap() const
Return a communication schedule.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
volScalarField cellInterpolationWeight_
Amount of interpolation.
Standard boundBox with extra functionality for use in octree.
TypeName("inverseDistance")
Runtime type information.
virtual const labelUList & interpolationCells() const
Indices of interpolated cells.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
List< point > pointList
List of point.
static bool overlaps(const boundBox &bb, const labelVector &nDivs, const PackedList< 2 > &voxels, const treeBoundBox &subBb, const unsigned int val)
Is any voxel inside subBb set to val.
Data for a set of interpolated/donor set.
void holeExtrapolationStencil(const globalIndex &globalCells)
Make holes next to live ones type SPECIAL and include in interpolation stencil.
List< treeBoundBox > meshBb(1, treeBoundBox(coarseMesh.points()).extend(rndGen, 1e-3))
const bool allowInterpolatedDonors_
Allow interpolared as donors.
vector smallVec_
Small perturbation vector for geometric tests.
void seedCell(const label cellI, const scalar wantedFraction, bitSet &isFront, scalarField &fraction) const
Seed faces of cell with wantedFraction (if higher than current)