Calculation of interpolation stencils. More...
Public Types | |
enum | patchCellType { OTHER = 0, PATCH = 1, OVERSET = 2 } |
enum | cellType { CALCULATED = 0, INTERPOLATED = 1, HOLE = 2 } |
Public Member Functions | |
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) |
Static Public Member Functions | |
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 | |
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... | |
Protected Attributes | |
const fvMesh & | mesh_ |
Reference to the mesh. More... | |
wordHashSet | nonInterpolatedFields_ |
Set of fields that should not be interpolated. More... | |
Static Protected Attributes | |
static const Enum< cellType > | cellTypeNames_ |
Mode type names. More... | |
Calculation of interpolation stencils.
Looks up zoneID labelIOList to give the zoning. Wrapped in MeshObject as cellCellStencilObject. Kept separate so meshes can implement more clever methods (e.g. solid body motion does not require full recalculation)
Definition at line 61 of file cellCellStencil.H.
enum patchCellType |
Enumerator | |
---|---|
OTHER | |
PATCH | |
OVERSET |
Definition at line 65 of file cellCellStencil.H.
enum cellType |
Enumerator | |
---|---|
CALCULATED | |
INTERPOLATED | |
HOLE |
Definition at line 72 of file cellCellStencil.H.
cellCellStencil | ( | const fvMesh & | mesh | ) |
Construct from fvMesh.
Definition at line 56 of file cellCellStencil.C.
|
virtual |
Destructor.
Definition at line 93 of file cellCellStencil.C.
|
staticprotected |
Count occurrences (in parallel)
Definition at line 143 of file cellCellStencil.C.
References Foam::BitOps::count(), forAll, Pstream::listCombineGather(), and Foam::Zero.
|
staticprotected |
Helper: create volScalarField for postprocessing.
TypeName | ( | "cellCellStencil" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
cellCellStencil | , | ||
mesh | , | ||
(const fvMesh &mesh, const dictionary &dict, const bool update) | , | ||
(mesh, dict, update) | |||
) |
|
static |
New function which constructs and returns pointer to a.
Definition at line 64 of file cellCellStencil.C.
References DebugInFunction, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), mesh, and update().
|
pure virtual |
Update stencils. Return false if nothing changed.
Implemented in inverseDistance, cellVolumeWeight, trackingInverseDistance, and cellCellStencilObject.
|
pure virtual |
Return the cell type list.
Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.
|
pure virtual |
Indices of interpolated cells.
Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.
|
pure virtual |
Return a communication schedule.
Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.
|
pure virtual |
Per interpolated cell the neighbour cells (in terms of slots as.
constructed by above cellInterpolationMap) to interpolate
Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.
|
pure virtual |
Weights for cellStencil.
Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.
|
pure virtual |
Per interpolated cell the interpolation factor. (0 = use.
calculated, 1 = use interpolated)
Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.
|
pure virtual |
Calculate weights for a single acceptor.
Implemented in inverseDistance, cellVolumeWeight, cellCellStencilObject, and leastSquares.
|
virtual |
Return the names of any (stencil or mesh specific) fields that.
should not be interpolated
Reimplemented in cellCellStencilObject.
Definition at line 158 of file cellCellStencil.C.
|
virtual |
Return non-const non-interpolating fields.
Definition at line 164 of file cellCellStencil.C.
bool localStencil | ( | const labelUList & | slots | ) | const |
Helper: is stencil fully local.
Definition at line 170 of file cellCellStencil.C.
References forAll.
|
static |
Helper: get reference to registered zoneID. Loads volScalarField.
if not registered.
Definition at line 99 of file cellCellStencil.C.
References polyMesh::dbDir(), polyMesh::facesInstance(), Time::findInstance(), forAll, objectRegistry::foundObject(), objectRegistry::lookupObject(), mesh, polyMesh::meshSubDir, IOobject::MUST_READ, primitiveMesh::nCells(), IOobject::NO_READ, IOobject::NO_WRITE, regIOobject::store(), fvMesh::time(), and zoneID.
Referenced by dynamicOversetFvMesh::writeObject().
|
inline |
Helper: get reference to registered zoneID. Loads volScalarField.
if not registered.
Definition at line 210 of file cellCellStencil.H.
|
static |
Helper: create cell-cell addressing in global numbering.
Definition at line 184 of file cellCellStencil.C.
References primitiveMesh::cellCentres(), cells, primitiveMesh::cells(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, Foam::identity(), globalIndex::localSize(), globalIndex::localStart(), mesh, primitiveMesh::nCells(), primitiveMesh::nInternalFaces(), List< T >::setSize(), syncTools::swapBoundaryCellList(), and globalIndex::toGlobal().
Foam::tmp<Foam::volScalarField> createField | ( | const fvMesh & | mesh, |
const word & | name, | ||
const UList< Type > & | psi | ||
) |
Definition at line 35 of file cellCellStencilTemplates.C.
References Foam::dimless, fld, forAll, mesh, Foam::name(), psi, tmp< T >::ref(), and Foam::Zero.
|
staticprotected |
Mode type names.
Definition at line 85 of file cellCellStencil.H.
|
protected |
Reference to the mesh.
Definition at line 88 of file cellCellStencil.H.
|
protected |
Set of fields that should not be interpolated.
Definition at line 91 of file cellCellStencil.H.