Data for centred fit snGrad schemes. More...
Public Member Functions | |
TypeName ("CentredFitSnGradData") | |
CentredFitSnGradData (const fvMesh &mesh, const extendedCentredCellToFaceStencil &stencil, const scalar linearLimitFactor, const scalar centralWeight) | |
Construct from components. More... | |
virtual | ~CentredFitSnGradData ()=default |
Destructor. More... | |
const List< scalarList > & | coeffs () const |
Return reference to fit coefficients. More... | |
void | calcFit (scalarList &coeffsi, const List< point > &, const scalar wLin, const scalar deltaCoeff, const label faci) |
Calculate the fit for the specified face and set the coefficients. More... | |
void | calcFit () |
Calculate the fit for all the faces. More... | |
Public Member Functions inherited from FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial > | |
FitData (const fvMesh &mesh, const extendedCentredCellToFaceStencil &stencil, const bool linearCorrection, const scalar linearLimitFactor, const scalar centralWeight) | |
Construct from components. More... | |
virtual | ~FitData ()=default |
Destructor. More... | |
const extendedCentredCellToFaceStencil & | stencil () const |
Return reference to the stencil. More... | |
scalar | linearLimitFactor () const |
Factor the fit is allowed to deviate from the base scheme. More... | |
scalar | centralWeight () const |
Return weight for central stencil. More... | |
label | dim () const |
Dimensionality of the geometry. More... | |
label | minSize () const |
Minimum stencil size. More... | |
bool | linearCorrection () const |
void | calcFit (scalarList &coeffsi, const List< point > &, const scalar wLin, const label faci) |
Calculate the fit for the specified face and set the coefficients. More... | |
virtual void | calcFit ()=0 |
Calculate the fit for all the faces. More... | |
bool | movePoints () |
Recalculate weights (but not stencil) when the mesh moves. More... | |
Public Member Functions inherited from MeshObject< Mesh, MeshObjectType, Type > | |
MeshObject (const Mesh &mesh) | |
Construct on Mesh type. More... | |
virtual | ~MeshObject ()=default |
Destructor. More... | |
const Mesh & | mesh () const |
virtual bool | writeData (Ostream &os) const |
Additional Inherited Members | |
Static Public Member Functions inherited from MeshObject< Mesh, MeshObjectType, Type > | |
template<class... Args> | |
static const Type & | New (const Mesh &mesh, Args &&... args) |
Get existing or create a new MeshObject. More... | |
static bool | Delete (const Mesh &mesh) |
Static destructor. More... | |
Protected Member Functions inherited from FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial > | |
void | findFaceDirs (vector &idir, vector &jdir, vector &kdir, const label faci) |
Find the normal direction (i) and j and k directions for face faci. More... | |
Protected Attributes inherited from MeshObject< Mesh, MeshObjectType, Type > | |
const Mesh & | mesh_ |
Data for centred fit snGrad schemes.
Definition at line 54 of file CentredFitSnGradData.H.
CentredFitSnGradData | ( | const fvMesh & | mesh, |
const extendedCentredCellToFaceStencil & | stencil, | ||
const scalar | linearLimitFactor, | ||
const scalar | centralWeight | ||
) |
Construct from components.
Definition at line 37 of file CentredFitSnGradData.C.
References CentredFitSnGradData< Polynomial >::calcFit(), DebugInfo, DebugInFunction, Foam::endl(), and Foam::nl.
|
virtualdefault |
Destructor.
TypeName | ( | "CentredFitSnGradData< Polynomial >" | ) |
|
inline |
Return reference to fit coefficients.
Definition at line 94 of file CentredFitSnGradData.H.
Referenced by CentredFitSnGradScheme< Type, Polynomial, Stencil >::correction().
void calcFit | ( | scalarList & | coeffsi, |
const List< point > & | C, | ||
const scalar | wLin, | ||
const scalar | deltaCoeff, | ||
const label | faci | ||
) |
Calculate the fit for the specified face and set the coefficients.
Definition at line 68 of file CentredFitSnGradData.C.
References biLinearFitPolynomial::addCoeffs(), B, Foam::cmptMag(), Foam::cmptMax(), Foam::endl(), primitiveMesh::faceCentres(), forAll, Foam::mag(), mesh, Foam::nl, p, p0, SVD::S(), List< T >::setSize(), Foam::sum(), SVD::VSinvUt(), WarningInFunction, Vector< Cmpt >::x(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Foam::Zero.
|
virtual |
Calculate the fit for all the faces.
Implements FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial >.
Definition at line 206 of file CentredFitSnGradData.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvMesh::C(), fvsPatchField< Type >::coupled(), forAll, mesh, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), surfaceInterpolation::nonOrthDeltaCoeffs(), fvsPatchField< Type >::patch(), and fvPatch::start().
Referenced by CentredFitSnGradData< Polynomial >::CentredFitSnGradData().