Public Member Functions | Private Member Functions | Private Attributes
LeastSquaresGrad< Type, Stencil > Class Template Reference

Gradient calculated using weighted least-squares on an arbitrary stencil. The stencil type is provided via a template argument and any cell-based stencil is supported: More...

Inheritance diagram for LeastSquaresGrad< Type, Stencil >:
Inheritance graph
[legend]
Collaboration diagram for LeastSquaresGrad< Type, Stencil >:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("LeastSquares")
 Runtime type information. More...
 
 LeastSquaresGrad (const fvMesh &mesh, Istream &schemeData)
 Construct from Istream. More...
 
virtual tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > calcGrad (const GeometricField< Type, fvPatchField, volMesh > &vsf, const word &name) const
 Return the gradient of the given field to the gradScheme::grad. More...
 
- Public Member Functions inherited from gradScheme< Type >
virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (tmp, gradScheme, Istream,(const fvMesh &mesh, Istream &schemeData),(mesh, schemeData))
 
 gradScheme (const fvMesh &mesh)
 Construct from mesh. More...
 
virtual ~gradScheme ()
 Destructor. More...
 
const fvMeshmesh () const
 Return mesh reference. More...
 
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad (const GeometricField< Type, fvPatchField, volMesh > &, const word &name) const
 Calculate and return the grad of the given field. More...
 
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad (const GeometricField< Type, fvPatchField, volMesh > &) const
 Calculate and return the grad of the given field. More...
 
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad (const tmp< GeometricField< Type, fvPatchField, volMesh > > &) const
 Calculate and return the grad of the given field. More...
 
- Public Member Functions inherited from refCount
 refCount ()
 Construct null with zero count. More...
 
int count () const
 Return the reference count. More...
 
bool okToDelete () const
 Return true if the reference count is zero. More...
 
void resetRefCount ()
 Reset the reference count to zero. More...
 
void operator++ ()
 Increment the reference count. More...
 
void operator++ (int)
 Increment the reference count. More...
 
void operator-- ()
 Decrement the reference count. More...
 
void operator-- (int)
 Decrement the reference count. More...
 

Private Member Functions

 LeastSquaresGrad (const LeastSquaresGrad &)
 Disallow default bitwise copy construct. More...
 
void operator= (const LeastSquaresGrad &)
 Disallow default bitwise assignment. More...
 

Private Attributes

scalar minDet_
 Minimum determinant criterion to choose extra cells. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gradScheme< Type >
static tmp< gradScheme< Type > > New (const fvMesh &mesh, Istream &schemeData)
 Return a pointer to a new gradScheme created on freestore. More...
 

Detailed Description

template<class Type, class Stencil>
class Foam::fv::LeastSquaresGrad< Type, Stencil >

Gradient calculated using weighted least-squares on an arbitrary stencil. The stencil type is provided via a template argument and any cell-based stencil is supported:

Stencil Connections Scheme name
centredCFCCellToCellStencil cell-face-cell Not Instantiated
centredCPCCellToCellStencil cell-point-cell pointCellsLeastSquares
centredCECCellToCellStencil cell-edge-cell edgeCellsLeastSquares

The first of these is not instantiated by default as the standard leastSquaresGrad is equivalent and more efficient.


Usage

Example of the gradient specification:

    gradSchemes
    {
        default         pointCellsLeastSquares;
    }
See also
Foam::fv::LeastSquaresVectors Foam::fv::leastSquaresGrad
Source files

Definition at line 98 of file LeastSquaresGrad.H.

Constructor & Destructor Documentation

◆ LeastSquaresGrad() [1/2]

LeastSquaresGrad ( const LeastSquaresGrad< Type, Stencil > &  )
private

Disallow default bitwise copy construct.

◆ LeastSquaresGrad() [2/2]

LeastSquaresGrad ( const fvMesh mesh,
Istream schemeData 
)
inline

Construct from Istream.

Definition at line 126 of file LeastSquaresGrad.H.

Member Function Documentation

◆ operator=()

void operator= ( const LeastSquaresGrad< Type, Stencil > &  )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "LeastSquares"  )

Runtime type information.

◆ calcGrad()

virtual tmp< GeometricField <typename outerProduct<vector, Type>::type, fvPatchField, volMesh> > calcGrad ( const GeometricField< Type, fvPatchField, volMesh > &  vsf,
const word name 
) const
virtual

Return the gradient of the given field to the gradScheme::grad.

for optional caching

Implements gradScheme< Type >.

Field Documentation

◆ minDet_

scalar minDet_
private

Minimum determinant criterion to choose extra cells.

Definition at line 105 of file LeastSquaresGrad.H.


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