Volume-weighted interpolation stencil. More...
Public Member Functions | |
TypeName ("cellVolumeWeight") | |
Runtime type information. More... | |
cellVolumeWeight (const fvMesh &, const dictionary &, const bool doUpdate) | |
Construct from fvMesh. More... | |
virtual | ~cellVolumeWeight () |
Destructor. More... | |
scalar | overlapTolerance () const |
Access to volume overlap tolerance. More... | |
virtual bool | update () |
Update stencils. Return false if nothing changed. More... | |
virtual const labelUList & | cellTypes () const |
Return the cell type list. More... | |
virtual const labelUList & | interpolationCells () const |
Indices of interpolated cells. More... | |
virtual const mapDistribute & | cellInterpolationMap () const |
Return a communication schedule. More... | |
virtual const labelListList & | cellStencil () const |
Per interpolated cell the neighbour cells (in terms of slots as. More... | |
virtual const List< scalarList > & | cellInterpolationWeights () const |
Weights for cellStencil. More... | |
virtual const scalarList & | cellInterpolationWeight () const |
Per interpolated cell the interpolation factor. (0 = use. More... | |
virtual void | stencilWeights (const point &sample, const pointList &donorCcs, scalarList &weights) const |
Calculate inverse distance weights for a single acceptor. Revert. More... | |
Public Member Functions inherited from cellCellStencil | |
TypeName ("cellCellStencil") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, cellCellStencil, mesh,(const fvMesh &mesh, const dictionary &dict, const bool update),(mesh, dict, update)) | |
cellCellStencil (const fvMesh &) | |
Construct from fvMesh. More... | |
virtual | ~cellCellStencil () |
Destructor. More... | |
virtual bool | update ()=0 |
Update stencils. Return false if nothing changed. More... | |
virtual const labelUList & | cellTypes () const =0 |
Return the cell type list. More... | |
virtual const labelUList & | interpolationCells () const =0 |
Indices of interpolated cells. More... | |
virtual const mapDistribute & | cellInterpolationMap () const =0 |
Return a communication schedule. More... | |
virtual const labelListList & | cellStencil () const =0 |
Per interpolated cell the neighbour cells (in terms of slots as. More... | |
virtual const List< scalarList > & | cellInterpolationWeights () const =0 |
Weights for cellStencil. More... | |
virtual const scalarList & | cellInterpolationWeight () const =0 |
Per interpolated cell the interpolation factor. (0 = use. More... | |
virtual void | stencilWeights (const point &sample, const pointList &donorCcs, scalarList &weights) const =0 |
Calculate weights for a single acceptor. More... | |
virtual const wordHashSet & | nonInterpolatedFields () const |
Return the names of any (stencil or mesh specific) fields that. More... | |
virtual wordHashSet & | nonInterpolatedFields () |
Return non-const non-interpolating fields. More... | |
bool | localStencil (const labelUList &) const |
Helper: is stencil fully local. More... | |
const labelIOList & | zoneID () const |
Helper: get reference to registered zoneID. Loads volScalarField. More... | |
template<class Type > | |
Foam::tmp< Foam::volScalarField > | createField (const fvMesh &mesh, const word &name, const UList< Type > &psi) |
Protected Member Functions | |
void | walkFront (const scalar layerRelax, labelList &allCellTypes, scalarField &allWeight) const |
void | findHoles (const globalIndex &globalCells, const fvMesh &mesh, const labelList &zoneID, const labelListList &stencil, labelList &cellTypes) const |
Find cells next to cells of type PATCH. More... | |
void | markPatchCells (const fvMesh &mesh, const labelList &cellMap, labelList &patchCellTypes) const |
according to additionalDocumentation/MEJ_oversetMesh.txt More... | |
void | combineCellTypes (const label subZoneID, const fvMesh &subMesh, const labelList &subCellMap, const label donorZoneID, const labelListList &toOtherCells, const List< scalarList > &weights, const labelList &otherCells, const labelList &interpolatedOtherPatchTypes, labelListList &allStencil, scalarListList &allWeights, labelList &allCellTypes, labelList &allDonorID) const |
void | interpolatePatchTypes (const labelListList &addressing, const labelList &patchTypes, labelList &result) const |
interpolate (= combine) patch types More... | |
void | interpolatePatchTypes (const autoPtr< mapDistribute > &mapPtr, const labelListList &addressing, const labelList &patchTypes, labelList &result) const |
interpolate (= combine) patch types More... | |
Protected Attributes | |
const dictionary | dict_ |
Dictionary of motion control parameters. More... | |
scalar | overlapTolerance_ |
Tolerance for volume overlap. Fraction of volume. More... | |
labelList | cellTypes_ |
Per cell the cell type. More... | |
labelList | interpolationCells_ |
Indices of interpolated cells. More... | |
autoPtr< mapDistribute > | cellInterpolationMap_ |
Fetch interpolated cells. More... | |
labelListList | cellStencil_ |
Interpolation stencil. More... | |
List< scalarList > | cellInterpolationWeights_ |
Interpolation weights. More... | |
volScalarField | cellInterpolationWeight_ |
Amount of interpolation. More... | |
Protected Attributes inherited from cellCellStencil | |
const fvMesh & | mesh_ |
Reference to the mesh. More... | |
wordHashSet | nonInterpolatedFields_ |
Set of fields that should not be interpolated. More... | |
Static Protected Attributes | |
static scalar | defaultOverlapTolerance_ = 1e-6 |
Default overlap tolerance. Fraction of volume. More... | |
Static Protected Attributes inherited from cellCellStencil | |
static const Enum< cellType > | cellTypeNames_ |
Mode type names. More... | |
Additional Inherited Members | |
Public Types inherited from cellCellStencil | |
enum | patchCellType { OTHER = 0 , PATCH = 1 , OVERSET = 2 } |
enum | cellType { CALCULATED = 0 , INTERPOLATED = 1 , HOLE = 2 } |
Static Public Member Functions inherited from cellCellStencil | |
static autoPtr< cellCellStencil > | New (const fvMesh &, const dictionary &dict, const bool update=true) |
New function which constructs and returns pointer to a. More... | |
static const labelIOList & | zoneID (const fvMesh &) |
Helper: get reference to registered zoneID. Loads volScalarField. More... | |
static void | globalCellCells (const globalIndex &gi, const polyMesh &mesh, const boolList &isValidDonor, const labelList &selectedCells, labelListList &cellCells, pointListList &cellCellCentres) |
Helper: create cell-cell addressing in global numbering. More... | |
Static Protected Member Functions inherited from cellCellStencil | |
static labelList | count (const label size, const labelUList &lst) |
Count occurrences (in parallel) More... | |
template<class Type > | |
static tmp< volScalarField > | createField (const fvMesh &mesh, const word &name, const UList< Type > &) |
Helper: create volScalarField for postprocessing. More... | |
Volume-weighted interpolation stencil.
Definition at line 54 of file cellVolumeWeightCellCellStencil.H.
cellVolumeWeight | ( | const fvMesh & | mesh, |
const dictionary & | dict, | ||
const bool | doUpdate | ||
) |
Construct from fvMesh.
Definition at line 660 of file cellVolumeWeightCellCellStencil.C.
References cellVolumeWeight::cellTypes_, Foam::endl(), forAll, HashSet< Key, Hash >::insert(), io(), cellCellStencil::mesh_, IOobject::NO_WRITE, cellCellStencil::nonInterpolatedFields_, Foam::Pout, IOobject::READ_IF_PRESENT, fvMesh::time(), Time::timeName(), IOobject::typeHeaderOk(), cellVolumeWeight::update(), and cellCellStencil::zoneID().
|
virtual |
Destructor.
Definition at line 740 of file cellVolumeWeightCellCellStencil.C.
|
protected |
Definition at line 59 of file cellVolumeWeightCellCellStencil.C.
References fvMesh::boundary(), primitiveMesh::cells(), bitSet::count(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, cellCellStencil::HOLE, Foam::Info, cellCellStencil::INTERPOLATED, primitiveMesh::isInternalFace(), cellCellStencil::mesh_, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::returnReduce(), bitSet::set(), syncTools::swapBoundaryCellList(), syncTools::syncFaceList(), bitSet::test(), and bitSet::transfer().
|
protected |
Find cells next to cells of type PATCH.
Definition at line 203 of file cellVolumeWeightCellCellStencil.C.
References cellTypes, cyclicACMIPointPatch::constraintType(), mapDistribute::distribute(), Foam::endl(), fvPatch::faceCells(), forAll, Foam::Info, Pstream::listCombineAllGather(), mesh, Foam::nl, regionSplit::nRegions(), Foam::reduce(), syncTools::swapBoundaryCellList(), Foam::type(), and Foam::Zero.
|
protected |
according to additionalDocumentation/MEJ_oversetMesh.txt
Definition at line 443 of file cellVolumeWeightCellCellStencil.C.
References cyclicACMIPointPatch::constraintType(), fvPatch::faceCells(), forAll, and mesh.
|
protected |
Option 1:
scalar currentVol = sum(allWeights[cellI]); if (overlapVol[subCellI] > currentVol)
Option 3:
Definition at line 551 of file cellVolumeWeightCellCellStencil.C.
References forAll, and Foam::mag().
|
protected |
interpolate (= combine) patch types
Definition at line 483 of file cellVolumeWeightCellCellStencil.C.
References forAll, patchTypes(), and Foam::type().
|
protected |
interpolate (= combine) patch types
Definition at line 518 of file cellVolumeWeightCellCellStencil.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, patchTypes(), and UList< T >::size().
TypeName | ( | "cellVolumeWeight" | ) |
Runtime type information.
|
inline |
Access to volume overlap tolerance.
Definition at line 186 of file cellVolumeWeightCellCellStencil.H.
References cellVolumeWeight::overlapTolerance_.
|
virtual |
Update stencils. Return false if nothing changed.
Implements cellCellStencil.
Definition at line 746 of file cellVolumeWeightCellCellStencil.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), List< T >::clear(), GeometricField< Type, PatchField, GeoMesh >::correctBoundaryConditions(), Foam::decrIndent(), Foam::dimless, Foam::endl(), forAll, Foam::gMax(), meshToMesh::imCellVolumeWeight, Foam::incrIndent(), Foam::indent(), Foam::Info, GeometricField< Type, PatchField, GeoMesh >::internalField(), Pstream::listCombineAllGather(), meshParts(), Foam::mkDir(), OFstream::name(), primitiveMesh::nCells(), nCellsPerZone(), Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, nZones, patchTypes(), meshToMesh::pmAABB, Foam::Pout, Foam::returnReduce(), s(), UList< T >::size(), meshToMesh::srcMap(), meshToMesh::srcToTgtCellAddr(), meshToMesh::srcToTgtCellWght(), Foam::sum(), meshToMesh::tgtMap(), meshToMesh::tgtToSrcCellAddr(), meshToMesh::tgtToSrcCellWght(), globalIndex::toGlobal(), regIOobject::write(), OBJstream::write(), Foam::Zero, and zoneID.
Referenced by cellVolumeWeight::cellInterpolationMap(), and cellVolumeWeight::cellVolumeWeight().
|
inlinevirtual |
Return the cell type list.
Implements cellCellStencil.
Definition at line 195 of file cellVolumeWeightCellCellStencil.H.
References cellVolumeWeight::cellTypes_.
|
inlinevirtual |
Indices of interpolated cells.
Implements cellCellStencil.
Definition at line 201 of file cellVolumeWeightCellCellStencil.H.
References cellVolumeWeight::interpolationCells_.
|
inlinevirtual |
Return a communication schedule.
Implements cellCellStencil.
Definition at line 207 of file cellVolumeWeightCellCellStencil.H.
References cellVolumeWeight::cellInterpolationMap_, and cellVolumeWeight::update().
|
inlinevirtual |
Per interpolated cell the neighbour cells (in terms of slots as.
constructed by above cellInterpolationMap) to interpolate
Implements cellCellStencil.
Definition at line 218 of file cellVolumeWeightCellCellStencil.H.
|
inlinevirtual |
Weights for cellStencil.
Implements cellCellStencil.
Definition at line 224 of file cellVolumeWeightCellCellStencil.H.
References cellVolumeWeight::cellInterpolationWeights_.
|
inlinevirtual |
Per interpolated cell the interpolation factor. (0 = use.
calculated, 1 = use interpolated)
Implements cellCellStencil.
Definition at line 231 of file cellVolumeWeightCellCellStencil.H.
|
virtual |
Calculate inverse distance weights for a single acceptor. Revert.
to inverse distance (so not consistent with volume overlap!)
Implements cellCellStencil.
Definition at line 1276 of file cellVolumeWeightCellCellStencil.C.
References forAll, Foam::mag(), List< T >::setSize(), UList< T >::size(), and Foam::sum().
|
staticprotected |
Default overlap tolerance. Fraction of volume.
Definition at line 63 of file cellVolumeWeightCellCellStencil.H.
|
protected |
Dictionary of motion control parameters.
Definition at line 69 of file cellVolumeWeightCellCellStencil.H.
|
protected |
Tolerance for volume overlap. Fraction of volume.
Definition at line 72 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight::overlapTolerance().
|
protected |
Per cell the cell type.
Definition at line 75 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight::cellTypes(), and cellVolumeWeight::cellVolumeWeight().
|
protected |
Indices of interpolated cells.
Definition at line 78 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight::interpolationCells().
|
protected |
Fetch interpolated cells.
Definition at line 81 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight::cellInterpolationMap().
|
protected |
Interpolation stencil.
Definition at line 84 of file cellVolumeWeightCellCellStencil.H.
|
protected |
Interpolation weights.
Definition at line 87 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight::cellInterpolationWeights().
|
protected |
Amount of interpolation.
Definition at line 90 of file cellVolumeWeightCellCellStencil.H.