cellCellStencil Class Referenceabstract

Calculation of interpolation stencils. More...

Inheritance diagram for cellCellStencil:
[legend]
Collaboration diagram for cellCellStencil:
[legend]

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 labelUListcellTypes () const =0
 Return the cell type list. More...
 
virtual const labelUListinterpolationCells () const =0
 Indices of interpolated cells. More...
 
virtual const mapDistributecellInterpolationMap () const =0
 Return a communication schedule. More...
 
virtual const labelListListcellStencil () 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 scalarListcellInterpolationWeight () 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 wordHashSetnonInterpolatedFields () const
 Return the names of any (stencil or mesh specific) fields that. More...
 
virtual wordHashSetnonInterpolatedFields ()
 Return non-const non-interpolating fields. More...
 
bool localStencil (const labelUList &) const
 Helper: is stencil fully local. More...
 
const labelIOListzoneID () const
 Helper: get reference to registered zoneID. Loads volScalarField. More...
 
template<class Type >
Foam::tmp< Foam::volScalarFieldcreateField (const fvMesh &mesh, const word &name, const UList< Type > &psi)
 

Static Public Member Functions

static autoPtr< cellCellStencilNew (const fvMesh &, const dictionary &dict, const bool update=true)
 New function which constructs and returns pointer to a. More...
 
static const labelIOListzoneID (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< volScalarFieldcreateField (const fvMesh &mesh, const word &name, const UList< Type > &)
 Helper: create volScalarField for postprocessing. More...
 

Protected Attributes

const fvMeshmesh_
 Reference to the mesh. More...
 
wordHashSet nonInterpolatedFields_
 Set of fields that should not be interpolated. More...
 

Static Protected Attributes

static const Enum< cellTypecellTypeNames_
 Mode type names. More...
 

Detailed Description

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)

Source files

Definition at line 61 of file cellCellStencil.H.

Member Enumeration Documentation

◆ patchCellType

Enumerator
OTHER 
PATCH 
OVERSET 

Definition at line 65 of file cellCellStencil.H.

◆ cellType

enum cellType
Enumerator
CALCULATED 
INTERPOLATED 
HOLE 

Definition at line 72 of file cellCellStencil.H.

Constructor & Destructor Documentation

◆ cellCellStencil()

cellCellStencil ( const fvMesh mesh)

Construct from fvMesh.

Definition at line 56 of file cellCellStencil.C.

◆ ~cellCellStencil()

~cellCellStencil ( )
virtual

Destructor.

Definition at line 93 of file cellCellStencil.C.

Member Function Documentation

◆ count()

Foam::labelList count ( const label  size,
const labelUList lst 
)
staticprotected

Count occurrences (in parallel)

Definition at line 143 of file cellCellStencil.C.

References Foam::BitOps::count(), forAll, Pstream::listCombineGather(), and Foam::Zero.

Here is the call graph for this function:

◆ createField() [1/2]

static tmp<volScalarField> createField ( const fvMesh mesh,
const word name,
const UList< Type > &   
)
staticprotected

Helper: create volScalarField for postprocessing.

◆ TypeName()

TypeName ( "cellCellStencil"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
cellCellStencil  ,
mesh  ,
(const fvMesh &mesh, const dictionary &dict, const bool update ,
(mesh, dict, update  
)

◆ New()

Foam::autoPtr< Foam::cellCellStencil > New ( const fvMesh mesh,
const dictionary dict,
const bool  update = true 
)
static

New function which constructs and returns pointer to a.

cellCellStencil

Definition at line 64 of file cellCellStencil.C.

References DebugInFunction, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), mesh, and update().

Here is the call graph for this function:

◆ update()

virtual bool update ( )
pure virtual

Update stencils. Return false if nothing changed.

Implemented in inverseDistance, cellVolumeWeight, trackingInverseDistance, and cellCellStencilObject.

◆ cellTypes()

virtual const labelUList& cellTypes ( ) const
pure virtual

Return the cell type list.

Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.

◆ interpolationCells()

virtual const labelUList& interpolationCells ( ) const
pure virtual

Indices of interpolated cells.

Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.

◆ cellInterpolationMap()

virtual const mapDistribute& cellInterpolationMap ( ) const
pure virtual

Return a communication schedule.

Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.

◆ cellStencil()

virtual const labelListList& cellStencil ( ) const
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.

◆ cellInterpolationWeights()

virtual const List<scalarList>& cellInterpolationWeights ( ) const
pure virtual

Weights for cellStencil.

Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.

◆ cellInterpolationWeight()

virtual const scalarList& cellInterpolationWeight ( ) const
pure virtual

Per interpolated cell the interpolation factor. (0 = use.

calculated, 1 = use interpolated)

Implemented in inverseDistance, cellVolumeWeight, and cellCellStencilObject.

◆ stencilWeights()

virtual void stencilWeights ( const point sample,
const pointList donorCcs,
scalarList weights 
) const
pure virtual

Calculate weights for a single acceptor.

Implemented in inverseDistance, cellVolumeWeight, cellCellStencilObject, and leastSquares.

◆ nonInterpolatedFields() [1/2]

const Foam::wordHashSet & nonInterpolatedFields ( ) const
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.

◆ nonInterpolatedFields() [2/2]

Foam::wordHashSet & nonInterpolatedFields ( )
virtual

Return non-const non-interpolating fields.

Definition at line 164 of file cellCellStencil.C.

◆ localStencil()

bool localStencil ( const labelUList slots) const

Helper: is stencil fully local.

Definition at line 170 of file cellCellStencil.C.

References forAll.

◆ zoneID() [1/2]

const Foam::labelIOList & zoneID ( const fvMesh mesh)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zoneID() [2/2]

const labelIOList& zoneID ( ) const
inline

Helper: get reference to registered zoneID. Loads volScalarField.

if not registered.

Definition at line 210 of file cellCellStencil.H.

◆ globalCellCells()

void globalCellCells ( const globalIndex gi,
const polyMesh mesh,
const boolList isValidDonor,
const labelList selectedCells,
labelListList cellCells,
pointListList cellCellCentres 
)
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().

Here is the call graph for this function:

◆ createField() [2/2]

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.

Here is the call graph for this function:

Member Data Documentation

◆ cellTypeNames_

const Foam::Enum< Foam::cellCellStencil::cellType > cellTypeNames_
staticprotected

Mode type names.

Definition at line 85 of file cellCellStencil.H.

◆ mesh_

const fvMesh& mesh_
protected

Reference to the mesh.

Definition at line 88 of file cellCellStencil.H.

◆ nonInterpolatedFields_

wordHashSet nonInterpolatedFields_
protected

Set of fields that should not be interpolated.

Definition at line 91 of file cellCellStencil.H.


The documentation for this class was generated from the following files: