Volume-weighted interpolation stencil. More...
#include <cellVolumeWeightCellCellStencil.H>


Public Member Functions | |
| TypeName ("cellVolumeWeight") | |
| Runtime type information. | |
| cellVolumeWeight (const fvMesh &, const dictionary &, const bool doUpdate) | |
| Construct from fvMesh. | |
| virtual | ~cellVolumeWeight () |
| Destructor. | |
| scalar | overlapTolerance () const |
| Access to volume overlap tolerance. | |
| virtual bool | update () |
| Update stencils. Return false if nothing changed. | |
| virtual const labelUList & | cellTypes () const |
| Return the cell type list. | |
| virtual const labelUList & | interpolationCells () const |
| Indices of interpolated cells. | |
| virtual const mapDistribute & | cellInterpolationMap () const |
| Return a communication schedule. | |
| virtual const labelListList & | cellStencil () const |
| Per interpolated cell the neighbour cells (in terms of slots as. | |
| virtual const List< scalarList > & | cellInterpolationWeights () const |
| Weights for cellStencil. | |
| virtual const scalarList & | cellInterpolationWeight () const |
| Per interpolated cell the interpolation factor. (0 = use. | |
| virtual void | stencilWeights (const point &sample, const pointList &donorCcs, scalarList &weights) const |
| Calculate inverse distance weights for a single acceptor. Revert. | |
| Public Member Functions inherited from cellCellStencil | |
| TypeName ("cellCellStencil") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, cellCellStencil, mesh,(const fvMesh &mesh, const dictionary &dict, const bool update),(mesh, dict, update)) | |
| cellCellStencil (const fvMesh &) | |
| Construct from fvMesh. | |
| virtual | ~cellCellStencil () |
| Destructor. | |
| virtual const wordHashSet & | nonInterpolatedFields () const |
| Return the names of any (stencil or mesh specific) fields that. | |
| virtual wordHashSet & | nonInterpolatedFields () |
| Return non-const non-interpolating fields. | |
| bool | localStencil (const labelUList &) const |
| Helper: is stencil fully local. | |
| const labelIOList & | zoneID () const |
| Helper: get reference to registered zoneID. Loads volScalarField. | |
| template<class T> | |
| void | interpolate (const fvMesh &mesh, Field< T > &psi) const |
| Explicit interpolation of acceptor cells from donor cells. Looks up cellCellStencil. | |
| template<class GeoField> | |
| void | interpolate (GeoField &psi) const |
| Explicit interpolation of acceptor cells from donor cells with boundary condition handling. | |
| template<class GeoField> | |
| void | interpolate (const fvMesh &mesh, const wordHashSet &suppressed) const |
| Explicit interpolation of all registered fields. No boundary conditions. Excludes selected fields (and their old-time fields). | |
| void | walkFront (const globalIndex &globalCells, const scalar layerRelax, const labelListList &allStencil, labelList &allCellTypes, scalarField &allWeight, const scalarList &compactCellVol, const labelListList &compactStencil, const labelList &zoneID, const label holeLayers, const label useLayer) const |
| Surround holes with layer(s) of interpolated cells. | |
| void | setUpFront (const labelList &allCellTypes, bitSet &isFront) const |
| Set up front using allCellTypes. | |
| void | setUpFrontOnOversetPatch (const labelList &allCellTypes, bitSet &isFront) const |
| Set up front on overset patches. | |
| void | seedCell (const label cellI, const scalar wantedFraction, bitSet &isFront, scalarField &fraction) const |
| Seed faces of cell with wantedFraction (if higher than current). | |
| InfoProxy< cellCellStencil > | info () const noexcept |
| Return info proxy, used to print stencil information to a stream. | |
| template<class Type> | |
| Foam::tmp< Foam::volScalarField > | createField (const fvMesh &mesh, const word &name, const UList< Type > &psi) |
Protected Member Functions | |
| 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. | |
| void | markPatchCells (const fvMesh &mesh, const labelList &cellMap, labelList &patchCellTypes) const |
| according to additionalDocumentation/MEJ_oversetMesh.txt | |
| 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 | |
| void | interpolatePatchTypes (const autoPtr< mapDistribute > &mapPtr, const labelListList &addressing, const labelList &patchTypes, labelList &result) const |
| interpolate (= combine) patch types | |
| Protected Member Functions inherited from cellCellStencil | |
| void | suppressMotionFields () |
| Helper: populate nonInterpolatedFields_ with motion solver. | |
Protected Attributes | |
| const dictionary | dict_ |
| Dictionary of motion control parameters. | |
| scalar | overlapTolerance_ |
| Tolerance for volume overlap. Fraction of volume. | |
| labelList | cellTypes_ |
| Per cell the cell type. | |
| labelList | interpolationCells_ |
| Indices of interpolated cells. | |
| autoPtr< mapDistribute > | cellInterpolationMap_ |
| Fetch interpolated cells. | |
| labelListList | cellStencil_ |
| Interpolation stencil. | |
| List< scalarList > | cellInterpolationWeights_ |
| Interpolation weights. | |
| volScalarField | cellInterpolationWeight_ |
| Amount of interpolation. | |
| const bool | allowInterpolatedDonors_ |
| Allow interpolared as donors. | |
| Protected Attributes inherited from cellCellStencil | |
| const fvMesh & | mesh_ |
| Reference to the mesh. | |
| wordHashSet | nonInterpolatedFields_ |
| Set of fields that should not be interpolated. | |
| const dictionary | dict_ |
| Dictionary of motion control parameters. | |
Static Protected Attributes | |
| static scalar | defaultOverlapTolerance_ = 1e-6 |
| Default overlap tolerance. Fraction of volume. | |
| Static Protected Attributes inherited from cellCellStencil | |
| static const Enum< cellType > | cellTypeNames_ |
| Mode type names. | |
Additional Inherited Members | |
| Public Types inherited from cellCellStencil | |
| enum | patchCellType { OTHER = 0 , PATCH = 1 , OVERSET = 2 } |
| enum | cellType { CALCULATED = 0 , INTERPOLATED = 1 , HOLE = 2 , SPECIAL = 3 , POROUS = 4 } |
| 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. | |
| static const labelIOList & | zoneID (const fvMesh &) |
| Helper: get reference to registered zoneID. Loads volScalarField. | |
| static labelList | count (const label size, const labelUList &lst) |
| Count occurrences (in parallel). | |
| 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. | |
| template<class T> | |
| static void | interpolate (Field< T > &psi, const fvMesh &mesh, const cellCellStencil &overlap, const List< scalarList > &wghts) |
| Interpolation of acceptor cells from donor cells. | |
| template<class GeoField, class SuppressBC> | |
| static void | correctBoundaryConditions (GeoField &psi) |
| Version of correctBoundaryConditions that excludes 'overset' bcs. | |
| Static Protected Member Functions inherited from cellCellStencil | |
| template<class Type> | |
| static tmp< volScalarField > | createField (const fvMesh &mesh, const word &name, const UList< Type > &) |
| Helper: create volScalarField for postprocessing. | |
| static word | baseName (const word &name) |
| Helper: strip off trailing _0. | |
Volume-weighted interpolation stencil.
Definition at line 50 of file cellVolumeWeightCellCellStencil.H.
| cellVolumeWeight | ( | const fvMesh & | mesh, |
| const dictionary & | dict, | ||
| const bool | doUpdate ) |
Construct from fvMesh.
Definition at line 506 of file cellVolumeWeightCellCellStencil.C.
References allowInterpolatedDonors_, cellCellStencil::CALCULATED, cellInterpolationMap_, cellInterpolationWeight_, cellInterpolationWeights_, cellStencil_, cellTypes_, defaultOverlapTolerance_, dict, dict_, Foam::dimless, Foam::endl(), forAll, interpolationCells_, io, mesh, cellCellStencil::mesh_, IOobjectOption::NO_REGISTER, IOobjectOption::NO_WRITE, overlapTolerance_, Foam::Pout, IOobjectOption::READ_IF_PRESENT, cellCellStencil::suppressMotionFields(), update(), Foam::Zero, and cellCellStencil::zoneID().

|
virtual |
Destructor.
Definition at line 585 of file cellVolumeWeightCellCellStencil.C.
|
protected |
Find cells next to cells of type PATCH.
Definition at line 53 of file cellVolumeWeightCellCellStencil.C.
References cellTypes(), fvPatch::constraintType(), mapDistribute::distribute(), Foam::endl(), fvPatch::faceCells(), forAll, Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, cellCellStencil::HOLE, Foam::Info, Foam::isA(), isBlockedFace(), Pstream::listReduce(), mesh, Foam::nl, regionSplit::nRegions(), pbm, Foam::returnReduceOr(), syncTools::swapBoundaryCellList(), Foam::Zero, and cellCellStencil::zoneID().
Referenced by update().


|
protected |
according to additionalDocumentation/MEJ_oversetMesh.txt
Definition at line 284 of file cellVolumeWeightCellCellStencil.C.
References fvPatch::constraintType(), fvPatch::faceCells(), forAll, Foam::isA(), mesh, cellCellStencil::OVERSET, cellCellStencil::PATCH, and pbm.
Referenced by update().


|
protected |
Option 1:
scalar currentVol = sum(allWeights[cellI]); if (overlapVol[subCellI] > currentVol)
Option 3:
Definition at line 393 of file cellVolumeWeightCellCellStencil.C.
References forAll, cellCellStencil::HOLE, Foam::mag(), cellCellStencil::OTHER, cellCellStencil::OVERSET, and cellCellStencil::PATCH.
Referenced by update().


|
protected |
interpolate (= combine) patch types
Definition at line 324 of file cellVolumeWeightCellCellStencil.C.
References forAll, cellCellStencil::OTHER, cellCellStencil::OVERSET, cellCellStencil::PATCH, and patchTypes().
Referenced by interpolatePatchTypes(), and update().


|
protected |
interpolate (= combine) patch types
Definition at line 360 of file cellVolumeWeightCellCellStencil.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, interpolatePatchTypes(), patchTypes(), and UList< T >::size().

| TypeName | ( | "cellVolumeWeight" | ) |
Runtime type information.
|
inline |
Access to volume overlap tolerance.
Definition at line 218 of file cellVolumeWeightCellCellStencil.H.
References overlapTolerance_.
|
virtual |
Update stencils. Return false if nothing changed.
Implements cellCellStencil.
Definition at line 591 of file cellVolumeWeightCellCellStencil.C.
References allowInterpolatedDonors_, cellCellStencil::CALCULATED, cellInterpolationMap(), cellInterpolationMap_, cellInterpolationWeight_, cellInterpolationWeights_, cellStencil_, cellTypes_, List< T >::clear(), combineCellTypes(), oversetFvMeshBase::correctBoundaryConditions(), cellCellStencil::count(), Foam::createField(), Foam::decrIndent(), dict_, mapDistribute::distribute(), Foam::endl(), findHoles(), forAll, Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, Foam::gMax(), cellCellStencil::HOLE, meshToMesh::imCellVolumeWeight, Foam::incrIndent(), Foam::indent(), Foam::Info, cellCellStencil::info(), cellCellStencil::INTERPOLATED, interpolatePatchTypes(), interpolationCells(), interpolationCells_, Pstream::listReduce(), markPatchCells(), cellCellStencil::mesh_, Foam::mkDir(), OFstream::name(), primitiveMesh::nCells(), Foam::nl, cellCellStencil::OTHER, overlapTolerance_, cellCellStencil::OVERSET, cellCellStencil::PATCH, meshToMesh::pmAABB, cellCellStencil::POROUS, Foam::Pout, Foam::reduce(), Foam::returnReduce(), s(), PtrList< T >::set(), UList< T >::size(), UPtrList< T >::size(), meshToMesh::srcMap(), meshToMesh::srcToTgtCellAddr(), meshToMesh::srcToTgtCellWght(), Foam::sum(), meshToMesh::tgtMap(), meshToMesh::tgtToSrcCellAddr(), meshToMesh::tgtToSrcCellWght(), globalIndex::toGlobal(), cellCellStencil::walkFront(), OBJstream::writeLine(), Foam::Zero, and cellCellStencil::zoneID().
Referenced by cellVolumeWeight().


|
inlinevirtual |
Return the cell type list.
Implements cellCellStencil.
Definition at line 231 of file cellVolumeWeightCellCellStencil.H.
References cellTypes_.
Referenced by findHoles().

|
inlinevirtual |
Indices of interpolated cells.
Implements cellCellStencil.
Definition at line 239 of file cellVolumeWeightCellCellStencil.H.
References interpolationCells_.
Referenced by update().

|
inlinevirtual |
Return a communication schedule.
Implements cellCellStencil.
Definition at line 247 of file cellVolumeWeightCellCellStencil.H.
References cellInterpolationMap_.
Referenced by update().

|
inlinevirtual |
Per interpolated cell the neighbour cells (in terms of slots as.
constructed by above cellInterpolationMap) to interpolate
Implements cellCellStencil.
Definition at line 261 of file cellVolumeWeightCellCellStencil.H.
References cellStencil_.
|
inlinevirtual |
Weights for cellStencil.
Implements cellCellStencil.
Definition at line 269 of file cellVolumeWeightCellCellStencil.H.
References cellInterpolationWeights_.
|
inlinevirtual |
Per interpolated cell the interpolation factor. (0 = use.
calculated, 1 = use interpolated)
Implements cellCellStencil.
Definition at line 279 of file cellVolumeWeightCellCellStencil.H.
References cellInterpolationWeight_.
|
virtual |
Calculate inverse distance weights for a single acceptor. Revert.
to inverse distance (so not consistent with volume overlap!)
Implements cellCellStencil.
Definition at line 1099 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 61 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight().
|
protected |
Dictionary of motion control parameters.
Definition at line 69 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight(), and update().
|
protected |
Tolerance for volume overlap. Fraction of volume.
Definition at line 74 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight(), overlapTolerance(), and update().
|
protected |
Per cell the cell type.
Definition at line 79 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellTypes(), cellVolumeWeight(), and update().
|
protected |
Indices of interpolated cells.
Definition at line 84 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight(), interpolationCells(), and update().
|
protected |
Fetch interpolated cells.
Definition at line 89 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellInterpolationMap(), cellVolumeWeight(), and update().
|
protected |
Interpolation stencil.
Definition at line 94 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellStencil(), cellVolumeWeight(), and update().
|
protected |
Interpolation weights.
Definition at line 99 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellInterpolationWeights(), cellVolumeWeight(), and update().
|
protected |
Amount of interpolation.
Definition at line 104 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellInterpolationWeight(), cellVolumeWeight(), and update().
|
protected |
Allow interpolared as donors.
Definition at line 109 of file cellVolumeWeightCellCellStencil.H.
Referenced by cellVolumeWeight(), and update().