Creates upwind stencil by shifting a centred stencil to upwind and downwind faces and optionally removing all non-(up/down)wind faces ('pureUpwind'). More...
Public Member Functions | |
extendedUpwindCellToFaceStencil (const cellToFaceStencil &, const bool pureUpwind, const scalar minOpposedness) | |
Construct from mesh and uncompacted centred face stencil. More... | |
extendedUpwindCellToFaceStencil (const cellToFaceStencil &) | |
Construct from mesh and uncompacted centred face stencil. Splits. More... | |
bool | pureUpwind () const |
const mapDistribute & | ownMap () const |
Return reference to the parallel distribution map. More... | |
const mapDistribute & | neiMap () const |
Return reference to the parallel distribution map. More... | |
const labelListList & | ownStencil () const |
Return reference to the stencil. More... | |
const labelListList & | neiStencil () const |
Return reference to the stencil. More... | |
template<class Type > | |
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > | weightedSum (const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< scalar > > &ownWeights, const List< List< scalar > > &neiWeights) const |
Sum vol field contributions to create face values. More... | |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > | weightedSum (const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< scalar > > &ownWeights, const List< List< scalar > > &neiWeights) const |
![]() | |
ClassName ("extendedCellToFaceStencil") | |
extendedCellToFaceStencil (const polyMesh &) | |
Construct from mesh. More... | |
template<class Type > | |
void | collectData (const mapDistribute &map, const labelListList &stencil, const GeometricField< Type, fvPatchField, volMesh > &fld, List< List< Type > > &stencilFld) |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > | weightedSum (const mapDistribute &map, const labelListList &stencil, const GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< scalar > > &stencilWeights) |
Private Member Functions | |
void | selectOppositeFaces (const boolList &nonEmptyFace, const scalar minOpposedness, const label faceI, const label cellI, DynamicList< label > &oppositeFaces) const |
Find most 'opposite' faces of cell. More... | |
void | transportStencil (const boolList &nonEmptyFace, const labelListList &faceStencil, const scalar minOpposedness, const label faceI, const label cellI, const bool stencilHasNeighbour, DynamicList< label > &oppositeFaces, labelHashSet &faceStencilSet, labelList &transportedStencil) const |
Transport (centred) face stencil to 'opposite' face. More... | |
void | transportStencils (const labelListList &faceStencil, const scalar minOpposedness, labelListList &ownStencil, labelListList &neiStencil) |
Transport (centred) face stencil to 'opposite' faces. More... | |
extendedUpwindCellToFaceStencil (const extendedUpwindCellToFaceStencil &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const extendedUpwindCellToFaceStencil &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const bool | pureUpwind_ |
Does stencil contain upwind points only. More... | |
autoPtr< mapDistribute > | ownMapPtr_ |
Swap map for getting neigbouring data. More... | |
autoPtr< mapDistribute > | neiMapPtr_ |
labelListList | ownStencil_ |
Per face the stencil. More... | |
labelListList | neiStencil_ |
Additional Inherited Members | |
![]() | |
template<class T > | |
static void | collectData (const mapDistribute &map, const labelListList &stencil, const GeometricField< T, fvPatchField, volMesh > &fld, List< List< T > > &stencilFld) |
Use map to get the data into stencil order. More... | |
template<class Type > | |
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > | weightedSum (const mapDistribute &map, const labelListList &stencil, const GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< scalar > > &stencilWeights) |
Sum vol field contributions to create face values. More... | |
![]() | |
static void | writeStencilStats (Ostream &os, const labelListList &stencil, const mapDistribute &map) |
Write some statistics about stencil. More... | |
![]() | |
const polyMesh & | mesh_ |
Creates upwind stencil by shifting a centred stencil to upwind and downwind faces and optionally removing all non-(up/down)wind faces ('pureUpwind').
Note: the minOpposedness parameter is to decide which upwind and downwind faces to combine the stencils from. If myArea is the local area and upwindArea the area of the possible upwind candidate it will be included if (upwindArea & myArea)/magSqr(myArea) > minOpposedness so this includes both cosine and area. WIP.
Definition at line 59 of file extendedUpwindCellToFaceStencil.H.
|
private |
Disallow default bitwise copy construct.
extendedUpwindCellToFaceStencil | ( | const cellToFaceStencil & | stencil, |
const bool | pureUpwind, | ||
const scalar | minOpposedness | ||
) |
Construct from mesh and uncompacted centred face stencil.
Transports facestencil to create owner and neighbour versions. pureUpwind to remove any remaining downwind cells.
Definition at line 380 of file extendedUpwindCellToFaceStencil.C.
References DynamicList::append(), forAll, cellToFaceStencil::globalNumbering(), mesh, cellToFaceStencil::mesh(), points, and List::size().
extendedUpwindCellToFaceStencil | ( | const cellToFaceStencil & | stencil | ) |
Construct from mesh and uncompacted centred face stencil. Splits.
stencil into owner and neighbour (so always pure upwind)
Definition at line 524 of file extendedUpwindCellToFaceStencil.C.
References DynamicList::append(), forAll, cellToFaceStencil::globalNumbering(), mesh, cellToFaceStencil::mesh(), points, and List::size().
|
private |
Find most 'opposite' faces of cell.
Definition at line 35 of file extendedUpwindCellToFaceStencil.C.
References DynamicList::append(), DynamicList::clear(), forAll, SortableList::indices(), Foam::magSqr(), List::size(), and SortableList::sort().
|
private |
Transport (centred) face stencil to 'opposite' face.
Definition at line 107 of file extendedUpwindCellToFaceStencil.C.
References Foam::abort(), HashTable::clear(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), HashSet< Key, Hash >::insert(), n, List::setSize(), List::size(), and HashTable::size().
|
private |
Transport (centred) face stencil to 'opposite' faces.
Definition at line 200 of file extendedUpwindCellToFaceStencil.C.
References polyPatch::coupled(), forAll, patches, List::setSize(), polyPatch::start(), and List::transfer().
|
private |
Disallow default bitwise assignment.
|
inline |
Definition at line 146 of file extendedUpwindCellToFaceStencil.H.
References extendedUpwindCellToFaceStencil::pureUpwind_.
|
inline |
Return reference to the parallel distribution map.
Definition at line 152 of file extendedUpwindCellToFaceStencil.H.
References extendedUpwindCellToFaceStencil::ownMapPtr_.
Referenced by pureUpwindCFCCellToFaceStencilObject::pureUpwindCFCCellToFaceStencilObject(), upwindCECCellToFaceStencilObject::upwindCECCellToFaceStencilObject(), upwindCFCCellToFaceStencilObject::upwindCFCCellToFaceStencilObject(), upwindCPCCellToFaceStencilObject::upwindCPCCellToFaceStencilObject(), and upwindFECCellToFaceStencilObject::upwindFECCellToFaceStencilObject().
|
inline |
Return reference to the parallel distribution map.
Definition at line 158 of file extendedUpwindCellToFaceStencil.H.
References extendedUpwindCellToFaceStencil::neiMapPtr_.
|
inline |
Return reference to the stencil.
Definition at line 164 of file extendedUpwindCellToFaceStencil.H.
References extendedUpwindCellToFaceStencil::ownStencil_.
Referenced by pureUpwindCFCCellToFaceStencilObject::pureUpwindCFCCellToFaceStencilObject(), upwindCECCellToFaceStencilObject::upwindCECCellToFaceStencilObject(), upwindCFCCellToFaceStencilObject::upwindCFCCellToFaceStencilObject(), upwindCPCCellToFaceStencilObject::upwindCPCCellToFaceStencilObject(), and upwindFECCellToFaceStencilObject::upwindFECCellToFaceStencilObject().
|
inline |
Return reference to the stencil.
Definition at line 170 of file extendedUpwindCellToFaceStencil.H.
References extendedUpwindCellToFaceStencil::neiStencil_.
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > weightedSum | ( | const surfaceScalarField & | phi, |
const GeometricField< Type, fvPatchField, volMesh > & | fld, | ||
const List< List< scalar > > & | ownWeights, | ||
const List< List< scalar > > & | neiWeights | ||
) | const |
Sum vol field contributions to create face values.
Referenced by PureUpwindFitScheme< Type, Polynomial, Stencil >::correction(), and UpwindFitScheme< Type, Polynomial, Stencil >::correction().
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> > weightedSum | ( | const surfaceScalarField & | phi, |
const GeometricField< Type, fvPatchField, volMesh > & | fld, | ||
const List< List< scalar > > & | ownWeights, | ||
const List< List< scalar > > & | neiWeights | ||
) | const |
Definition at line 33 of file extendedUpwindCellToFaceStencilTemplates.C.
References fvsPatchField::coupled(), fld(), forAll, mesh, fvsPatchField::patch(), patchi, phi, sf(), and fvPatch::start().
|
private |
Does stencil contain upwind points only.
Definition at line 66 of file extendedUpwindCellToFaceStencil.H.
Referenced by extendedUpwindCellToFaceStencil::pureUpwind().
|
private |
Swap map for getting neigbouring data.
Definition at line 69 of file extendedUpwindCellToFaceStencil.H.
Referenced by extendedUpwindCellToFaceStencil::ownMap().
|
private |
Definition at line 70 of file extendedUpwindCellToFaceStencil.H.
Referenced by extendedUpwindCellToFaceStencil::neiMap().
|
private |
Per face the stencil.
Definition at line 73 of file extendedUpwindCellToFaceStencil.H.
Referenced by extendedUpwindCellToFaceStencil::ownStencil().
|
private |
Definition at line 74 of file extendedUpwindCellToFaceStencil.H.
Referenced by extendedUpwindCellToFaceStencil::neiStencil().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.