Loading...
Searching...
No Matches
faMatrix< Type > Class Template Reference

A special matrix type and solver, designed for finite area solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise. More...

#include <faMatrix.H>

Inheritance diagram for faMatrix< Type >:
Collaboration diagram for faMatrix< Type >:

Classes

class  faSolver
 Solver class returned by the solver function used for systems in which it is useful to cache the solver for reuse. More...

Public Types

typedef GeometricField< Type, faPatchField, areaMeshpsiFieldType
 The geometric field type for psi.
typedef GeometricField< Type, faePatchField, edgeMeshfaceFluxFieldType
 Field type for face flux (for non-orthogonal correction).
typedef std::unique_ptr< faceFluxFieldTypefaceFluxFieldPtrType
 Declare return type of the faceFluxCorrectionPtr() function.
Public Types inherited from lduMatrix
enum class  normTypes : char { NO_NORM , DEFAULT_NORM , L1_SCALED_NORM }
 Enumerated matrix normalisation types. More...

Public Member Functions

 ClassName ("faMatrix")
 faMatrix (const GeometricField< Type, faPatchField, areaMesh > &psi, const dimensionSet &ds)
 Construct given a field to solve for.
 faMatrix (const faMatrix< Type > &)
 Copy construct.
 faMatrix (const tmp< faMatrix< Type > > &)
 Copy/move construct from tmp<faMatrix<Type>>.
 faMatrix (const GeometricField< Type, faPatchField, areaMesh > &psi, Istream &is)
 Deprecated(2022-05) - construct with dimensionSet instead.
tmp< faMatrix< Type > > clone () const
 Construct and return a clone.
virtual ~faMatrix ()
 Destructor.
const GeometricField< Type, faPatchField, areaMesh > & psi () const
const dimensionSetdimensions () const noexcept
Field< Type > & source () noexcept
const Field< Type > & source () const noexcept
const FieldField< Field, Type > & internalCoeffs () const noexcept
 faBoundary scalar field containing pseudo-matrix coeffs for internal cells
FieldField< Field, Type > & internalCoeffs () noexcept
 faBoundary scalar field containing pseudo-matrix coeffs for internal cells
const FieldField< Field, Type > & boundaryCoeffs () const noexcept
 faBoundary scalar field containing pseudo-matrix coeffs for boundary cells
FieldField< Field, Type > & boundaryCoeffs () noexcept
 faBoundary scalar field containing pseudo-matrix coeffs for boundary cells
faceFluxFieldPtrTypefaceFluxCorrectionPtr ()
 Return pointer to face-flux non-orthogonal correction field.
void faceFluxCorrectionPtr (faceFluxFieldType *flux)
 Set pointer to face-flux non-orthogonal correction field.
bool hasFaceFluxCorrection () const noexcept
 True if face-flux non-orthogonal correction field exists.
void setValues (const labelUList &faceLabels, const Type &value)
 Set solution in given faces to the specified value and eliminate the corresponding equations from the matrix.
void setValues (const labelUList &faceLabels, const UList< Type > &values)
 Set solution in given faces to the specified values and eliminate the corresponding equations from the matrix.
void setValues (const labelUList &faceLabels, const UIndirectList< Type > &values)
 Set solution in given faces to the specified values and eliminate the corresponding equations from the matrix.
void setReference (const label facei, const Type &value, const bool forceReference=false)
 Set reference level for solution.
void setReferences (const labelUList &faceLabels, const Type &value, const bool forceReference=false)
 Set reference level for solution.
void setReferences (const labelUList &faceLabels, const UList< Type > &values, const bool forceReference=false)
 Set reference level for solution.
void setComponentReference (const label patchi, const label facei, const direction cmpt, const scalar value)
 Set reference level for a component of the solution on a given patch face.
void relax (const scalar alpha)
 Relax matrix (for steady-state solution).
void relax ()
 Relax matrix (for steady-state solution).
SolverPerformance< Type > solve (const dictionary &)
 Solve returning the solution statistics.
SolverPerformance< Type > solve (const word &name)
 Solve returning the solution statistics.
SolverPerformance< Type > solve ()
 Solve returning the solution statistics.
tmp< Field< Type > > residual () const
 Return the matrix residual.
tmp< scalarFieldD () const
 Return the matrix diagonal.
tmp< areaScalarFieldA () const
 Return the central coefficient.
tmp< GeometricField< Type, faPatchField, areaMesh > > H () const
 Return the H operation source.
tmp< GeometricField< Type, faePatchField, edgeMesh > > flux () const
 Return the face-flux field from the matrix.
const dictionarysolverDict (const word &name) const
 Return the solver dictionary (from faSolution) for name.
const dictionarysolverDict () const
 Return the solver dictionary for psi.
void operator= (const faMatrix< Type > &)
void operator= (const tmp< faMatrix< Type > > &)
void negate ()
 Inplace negate.
void operator+= (const faMatrix< Type > &)
void operator+= (const tmp< faMatrix< Type > > &)
void operator-= (const faMatrix< Type > &)
void operator-= (const tmp< faMatrix< Type > > &)
void operator+= (const DimensionedField< Type, areaMesh > &)
void operator+= (const tmp< DimensionedField< Type, areaMesh > > &)
void operator+= (const tmp< GeometricField< Type, faPatchField, areaMesh > > &)
void operator-= (const DimensionedField< Type, areaMesh > &)
void operator-= (const tmp< DimensionedField< Type, areaMesh > > &)
void operator-= (const tmp< GeometricField< Type, faPatchField, areaMesh > > &)
void operator+= (const dimensioned< Type > &)
void operator-= (const dimensioned< Type > &)
void operator+= (Foam::zero)
void operator-= (Foam::zero)
void operator*= (const areaScalarField::Internal &)
void operator*= (const tmp< areaScalarField::Internal > &)
void operator*= (const tmp< areaScalarField > &)
void operator*= (const dimensioned< scalar > &)
void setComponentReference (const label patchI, const label edgeI, const direction, const scalar value)
Foam::solverPerformance solve (const dictionary &solverControls)
Foam::tmp< Foam::scalarFieldresidual () const
Foam::tmp< Foam::areaScalarFieldH () const
void setComponentReference (const label patchi, const label facei, const direction, const scalar value)
SolverPerformance< scalar > solve (const dictionary &)
tmp< scalarFieldresidual () const
tmp< areaScalarFieldH () const
Public Member Functions inherited from refCount
constexpr refCount () noexcept
 Default construct, initializing count to 0.
int use_count () const noexcept
 Return the current reference count.
bool unique () const noexcept
 Return true if the reference count is zero.
void operator++ () noexcept
 Increment the reference count.
void operator++ (int) noexcept
 Increment the reference count.
void operator-- () noexcept
 Decrement the reference count.
void operator-- (int) noexcept
 Decrement the reference count.
Public Member Functions inherited from lduMatrix
 ClassName ("lduMatrix")
 lduMatrix (const lduMesh &mesh)
 Construct (without coefficients) for an LDU addressed mesh.
 lduMatrix (const lduMatrix &)
 Copy construct.
 lduMatrix (lduMatrix &&)
 Move construct.
 lduMatrix (lduMatrix &, bool reuse)
 Construct as copy or re-use as specified.
 lduMatrix (const lduMesh &mesh, Istream &is)
 Construct given an LDU addressed mesh and an Istream from which the coefficients are read.
 ~lduMatrix ()=default
 Destructor.
const lduMeshmesh () const noexcept
 Return the LDU mesh from which the addressing is obtained.
void setLduMesh (const lduMesh &m)
 Set the LDU mesh containing the addressing.
const lduAddressinglduAddr () const
 Return the LDU addressing.
const lduSchedulepatchSchedule () const
 Return the patch evaluation schedule.
const scalarFielddiag () const
const scalarFieldupper () const
const scalarFieldlower () const
scalarFielddiag ()
scalarFieldupper ()
scalarFieldlower ()
scalarFielddiag (label size)
scalarFieldupper (label nCoeffs)
scalarFieldlower (label nCoeffs)
bool hasLowerCSR () const noexcept
const scalarFieldlowerCSR () const
scalarFieldlowerCSR ()
const solveScalarFieldwork () const
 Work array.
solveScalarFieldwork (label size) const
 Work array.
word matrixTypeName () const
 The matrix type (empty, diagonal, symmetric, ...).
bool hasDiag () const noexcept
bool hasUpper () const noexcept
bool hasLower () const noexcept
bool diagonal () const noexcept
 Matrix has diagonal only.
bool symmetric () const noexcept
 Matrix is symmetric.
bool asymmetric () const noexcept
 Matrix is asymmetric (ie, full).
void sumDiag ()
void negSumDiag ()
void sumMagOffDiag (scalarField &sumOff) const
void Amul (solveScalarField &, const tmp< solveScalarField > &, const FieldField< Field, scalar > &, const lduInterfaceFieldPtrsList &, const direction cmpt) const
 Matrix multiplication with updated interfaces.
void Tmul (solveScalarField &, const tmp< solveScalarField > &, const FieldField< Field, scalar > &, const lduInterfaceFieldPtrsList &, const direction cmpt) const
 Matrix transpose multiplication with updated interfaces.
void sumA (solveScalarField &, const FieldField< Field, scalar > &, const lduInterfaceFieldPtrsList &) const
 Sum the coefficients on each row of the matrix.
void residual (solveScalarField &rA, const solveScalarField &psi, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const
tmp< solveScalarFieldresidual (const solveScalarField &psi, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const
void initMatrixInterfaces (const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt) const
 Initialise the update of interfaced interfaces for matrix operations.
void updateMatrixInterfaces (const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt, const label startRequest) const
 Update interfaced interfaces for matrix operations.
void setResidualField (const scalarField &residual, const word &fieldName, const bool initial) const
 Set the residual field using an IOField on the object registry if it exists.
template<class Type>
tmp< Field< Type > > H (const Field< Type > &) const
template<class Type>
tmp< Field< Type > > H (const tmp< Field< Type > > &) const
tmp< scalarFieldH1 () const
template<class Type>
tmp< Field< Type > > faceH (const Field< Type > &) const
template<class Type>
tmp< Field< Type > > faceH (const tmp< Field< Type > > &) const
InfoProxy< lduMatrixinfo () const noexcept
 Return info proxy, used to print matrix information to a stream.
void operator= (const lduMatrix &)
 Copy assignment.
void operator= (lduMatrix &&)
 Move assignment.
void negate ()
void operator+= (const lduMatrix &)
void operator-= (const lduMatrix &)
void operator*= (const scalarField &)
void operator*= (scalar)
template<class Type>
Foam::tmp< Foam::Field< Type > > H (const Field< Type > &psi) const
template<class Type>
Foam::tmp< Foam::Field< Type > > H (const tmp< Field< Type > > &tpsi) const
template<class Type>
Foam::tmp< Foam::Field< Type > > faceH (const Field< Type > &psi) const
template<class Type>
Foam::tmp< Foam::Field< Type > > faceH (const tmp< Field< Type > > &tpsi) const

Protected Member Functions

template<class Type2>
void addToInternalField (const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
 Add patch contribution to internal field.
template<class Type2>
void addToInternalField (const labelUList &addr, const tmp< Field< Type2 > > &tpf, Field< Type2 > &intf) const
template<class Type2>
void subtractFromInternalField (const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
 Subtract patch contribution from internal field.
template<class Type2>
void subtractFromInternalField (const labelUList &addr, const tmp< Field< Type2 > > &tpf, Field< Type2 > &intf) const
void addBoundaryDiag (scalarField &diag, const direction cmpt) const
void addCmptAvBoundaryDiag (scalarField &diag) const
void addBoundarySource (Field< Type > &source, const bool couples=true) const
template<template< class > class ListType>
void setValuesFromList (const labelUList &faceLabels, const ListType< Type > &values)
 Set solution in given faces to the specified values.

Friends

class faSolver
 Declare friendship with the faSolver class.
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& (const faMatrix< Type > &, const DimensionedField< Type, areaMesh > &)
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& (const faMatrix< Type > &, const tmp< GeometricField< Type, faPatchField, areaMesh > > &)
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& (const tmp< faMatrix< Type > > &, const DimensionedField< Type, areaMesh > &)
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& (const tmp< faMatrix< Type > > &, const tmp< GeometricField< Type, faPatchField, areaMesh > > &)
Ostreamoperator<< (Ostream &, const faMatrix< Type > &)

Additional Inherited Members

Static Public Attributes inherited from lduMatrix
static const Enum< normTypesnormTypesNames_
 Names for the normTypes.
static constexpr const label defaultMaxIter = 1000
 Default maximum number of iterations for solvers (1000).
static const scalar defaultTolerance = 1e-6
 Default (absolute) tolerance (1e-6).

Detailed Description

template<class Type>
class Foam::faMatrix< Type >

A special matrix type and solver, designed for finite area solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.

Finite-Area matrix.

Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.

Source files
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.

Definition at line 104 of file faMatrix.H.

Member Typedef Documentation

◆ psiFieldType

template<class Type>
typedef GeometricField<Type, faPatchField, areaMesh> psiFieldType

The geometric field type for psi.

Definition at line 118 of file faMatrix.H.

◆ faceFluxFieldType

template<class Type>
typedef GeometricField<Type, faePatchField, edgeMesh> faceFluxFieldType

Field type for face flux (for non-orthogonal correction).

Definition at line 125 of file faMatrix.H.

◆ faceFluxFieldPtrType

template<class Type>
typedef std::unique_ptr<faceFluxFieldType> faceFluxFieldPtrType

Declare return type of the faceFluxCorrectionPtr() function.

Definition at line 407 of file faMatrix.H.

Constructor & Destructor Documentation

◆ faMatrix() [1/4]

template<class Type>
faMatrix ( const GeometricField< Type, faPatchField, areaMesh > & psi,
const dimensionSet & ds )

Construct given a field to solve for.

Definition at line 175 of file faMatrix.C.

References boundary, DebugInFunction, Foam::endl(), forAll, lduMatrix::lduMatrix(), lduMatrix::mesh(), psi(), and Foam::Zero.

Referenced by faMatrix(), faMatrix(), faMatrix< Type >::faSolver::faSolver(), operator+=(), operator+=(), operator-=(), operator-=(), operator=(), and operator=().

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

◆ faMatrix() [2/4]

template<class Type>
faMatrix ( const faMatrix< Type > & fam)

Copy construct.

Definition at line 218 of file faMatrix.C.

References DebugInFunction, Foam::endl(), faMatrix(), and lduMatrix::lduMatrix().

Here is the call graph for this function:

◆ faMatrix() [3/4]

template<class Type>
faMatrix ( const tmp< faMatrix< Type > > & tmat)

Copy/move construct from tmp<faMatrix<Type>>.

Definition at line 241 of file faMatrix.C.

References DebugInFunction, Foam::endl(), faMatrix(), and lduMatrix::lduMatrix().

Here is the call graph for this function:

◆ faMatrix() [4/4]

template<class Type>
faMatrix ( const GeometricField< Type, faPatchField, areaMesh > & psi,
Istream & is )
inline

Deprecated(2022-05) - construct with dimensionSet instead.

Deprecated
(2022-05) - construct with dimensionSet instead

Definition at line 320 of file faMatrix.H.

◆ ~faMatrix()

template<class Type>
~faMatrix ( )
virtual

Destructor.

Definition at line 276 of file faMatrix.C.

References DebugInFunction, and Foam::endl().

Here is the call graph for this function:

Member Function Documentation

◆ addToInternalField() [1/2]

template<class Type>
template<class Type2>
void addToInternalField ( const labelUList & addr,
const Field< Type2 > & pf,
Field< Type2 > & intf ) const
protected

Add patch contribution to internal field.

Definition at line 32 of file faMatrix.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and UList< T >::size().

Referenced by addBoundaryDiag(), addBoundarySource(), addCmptAvBoundaryDiag(), and addToInternalField().

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

◆ addToInternalField() [2/2]

template<class Type>
template<class Type2>
void addToInternalField ( const labelUList & addr,
const tmp< Field< Type2 > > & tpf,
Field< Type2 > & intf ) const
protected

Definition at line 56 of file faMatrix.C.

References addToInternalField().

Here is the call graph for this function:

◆ subtractFromInternalField() [1/2]

template<class Type>
template<class Type2>
void subtractFromInternalField ( const labelUList & addr,
const Field< Type2 > & pf,
Field< Type2 > & intf ) const
protected

Subtract patch contribution from internal field.

Definition at line 70 of file faMatrix.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and UList< T >::size().

Referenced by subtractFromInternalField().

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

◆ subtractFromInternalField() [2/2]

template<class Type>
template<class Type2>
void subtractFromInternalField ( const labelUList & addr,
const tmp< Field< Type2 > > & tpf,
Field< Type2 > & intf ) const
protected

Definition at line 94 of file faMatrix.C.

References subtractFromInternalField().

Here is the call graph for this function:

◆ addBoundaryDiag()

template<class Type>
void addBoundaryDiag ( scalarField & diag,
const direction cmpt ) const
protected

Definition at line 107 of file faMatrix.C.

References addToInternalField(), Foam::component(), lduMatrix::diag(), forAll, and lduMatrix::lduAddr().

Referenced by H(), residual(), and solve().

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

◆ addCmptAvBoundaryDiag()

template<class Type>
void addCmptAvBoundaryDiag ( scalarField & diag) const
protected

Definition at line 126 of file faMatrix.C.

References addToInternalField(), Foam::cmptAv(), lduMatrix::diag(), forAll, and lduMatrix::lduAddr().

Referenced by D(), and H().

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

◆ addBoundarySource()

template<class Type>
void addBoundarySource ( Field< Type > & source,
const bool couples = true ) const
protected

Definition at line 141 of file faMatrix.C.

References addToInternalField(), Foam::cmptMultiply(), faPatchFieldBase::coupled(), forAll, lduMatrix::lduAddr(), faPatchField< Type >::patchNeighbourField(), and source().

Referenced by H(), residual(), and solve().

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

◆ setValuesFromList()

template<class Type>
template<template< class > class ListType>
void setValuesFromList ( const labelUList & faceLabels,
const ListType< Type > & values )
protected

Set solution in given faces to the specified values.

Definition at line 287 of file faMatrix.C.

References lduMatrix::asymmetric(), Foam::diag(), faceLabels(), forAll, lduMatrix::lower(), lduMatrix::mesh(), psi(), lduMatrix::symmetric(), lduMatrix::upper(), and Foam::Zero.

Referenced by setValues(), setValues(), and setValues().

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

◆ ClassName()

template<class Type>
ClassName ( "faMatrix< Type >" )

◆ clone()

template<class Type>
tmp< faMatrix< Type > > clone ( ) const
inline

Construct and return a clone.

Definition at line 332 of file faMatrix.H.

◆ psi()

template<class Type>
const GeometricField< Type, faPatchField, areaMesh > & psi ( ) const
inline

◆ dimensions()

template<class Type>
const dimensionSet & dimensions ( ) const
inlinenoexcept

Definition at line 353 of file faMatrix.H.

Referenced by Foam::checkMethod(), Foam::checkMethod(), Foam::checkMethod(), and flux().

Here is the caller graph for this function:

◆ source() [1/2]

template<class Type>
Field< Type > & source ( )
inlinenoexcept

Definition at line 358 of file faMatrix.H.

Referenced by addBoundarySource(), operator+=(), operator+=(), operator-=(), operator-=(), relax(), setReference(), setReferences(), setReferences(), and solve().

Here is the caller graph for this function:

◆ source() [2/2]

template<class Type>
const Field< Type > & source ( ) const
inlinenoexcept

Definition at line 363 of file faMatrix.H.

◆ internalCoeffs() [1/2]

template<class Type>
const FieldField< Field, Type > & internalCoeffs ( ) const
inlinenoexcept

faBoundary scalar field containing pseudo-matrix coeffs for internal cells

Definition at line 372 of file faMatrix.H.

◆ internalCoeffs() [2/2]

template<class Type>
FieldField< Field, Type > & internalCoeffs ( )
inlinenoexcept

faBoundary scalar field containing pseudo-matrix coeffs for internal cells

Definition at line 381 of file faMatrix.H.

◆ boundaryCoeffs() [1/2]

template<class Type>
const FieldField< Field, Type > & boundaryCoeffs ( ) const
inlinenoexcept

faBoundary scalar field containing pseudo-matrix coeffs for boundary cells

Definition at line 390 of file faMatrix.H.

◆ boundaryCoeffs() [2/2]

template<class Type>
FieldField< Field, Type > & boundaryCoeffs ( )
inlinenoexcept

faBoundary scalar field containing pseudo-matrix coeffs for boundary cells

Definition at line 399 of file faMatrix.H.

◆ faceFluxCorrectionPtr() [1/2]

template<class Type>
faceFluxFieldPtrType & faceFluxCorrectionPtr ( )
inline

Return pointer to face-flux non-orthogonal correction field.

Definition at line 412 of file faMatrix.H.

Referenced by gaussLaplacianScheme< Type >::famLaplacian().

Here is the caller graph for this function:

◆ faceFluxCorrectionPtr() [2/2]

template<class Type>
void faceFluxCorrectionPtr ( faceFluxFieldType * flux)
inline

Set pointer to face-flux non-orthogonal correction field.

Definition at line 420 of file faMatrix.H.

◆ hasFaceFluxCorrection()

template<class Type>
bool hasFaceFluxCorrection ( ) const
inlinenoexcept

True if face-flux non-orthogonal correction field exists.

Definition at line 428 of file faMatrix.H.

◆ setValues() [1/3]

template<class Type>
void setValues ( const labelUList & faceLabels,
const Type & value )

Set solution in given faces to the specified value and eliminate the corresponding equations from the matrix.

Definition at line 386 of file faMatrix.C.

References faceLabels(), and setValuesFromList().

Here is the call graph for this function:

◆ setValues() [2/3]

template<class Type>
void setValues ( const labelUList & faceLabels,
const UList< Type > & values )

Set solution in given faces to the specified values and eliminate the corresponding equations from the matrix.

Definition at line 397 of file faMatrix.C.

References faceLabels(), and setValuesFromList().

Here is the call graph for this function:

◆ setValues() [3/3]

template<class Type>
void setValues ( const labelUList & faceLabels,
const UIndirectList< Type > & values )

Set solution in given faces to the specified values and eliminate the corresponding equations from the matrix.

Definition at line 408 of file faMatrix.C.

References faceLabels(), and setValuesFromList().

Here is the call graph for this function:

◆ setReference()

template<class Type>
void setReference ( const label facei,
const Type & value,
const bool forceReference = false )

Set reference level for solution.

Definition at line 419 of file faMatrix.C.

References Foam::diag(), UPstream::master(), and source().

Here is the call graph for this function:

◆ setReferences() [1/2]

template<class Type>
void setReferences ( const labelUList & faceLabels,
const Type & value,
const bool forceReference = false )

Set reference level for solution.

Definition at line 438 of file faMatrix.C.

References Foam::diag(), faceId(), faceLabels(), forAll, and source().

Here is the call graph for this function:

◆ setReferences() [2/2]

template<class Type>
void setReferences ( const labelUList & faceLabels,
const UList< Type > & values,
const bool forceReference = false )

Set reference level for solution.

Definition at line 461 of file faMatrix.C.

References Foam::diag(), faceId(), faceLabels(), forAll, and source().

Here is the call graph for this function:

◆ setComponentReference() [1/3]

template<class Type>
void setComponentReference ( const label patchi,
const label facei,
const direction cmpt,
const scalar value )

Set reference level for a component of the solution on a given patch face.

Definition at line 31 of file faMatrixSolve.C.

References lduMatrix::diag().

Here is the call graph for this function:

◆ relax() [1/2]

template<class Type>
void relax ( const scalar alpha)

Relax matrix (for steady-state solution).

alpha = 1 : diagonally equal alpha < 1 : ,, dominant alpha = 0 : do nothing Note: Requires positive diagonal.

Definition at line 484 of file faMatrix.C.

References alpha, Foam::cmptMag(), Foam::cmptMin(), Foam::cmptMultiply(), Foam::component(), faPatchFieldBase::coupled(), D(), Foam::diag(), forAll, lduMatrix::lduAddr(), Foam::mag(), Foam::max(), UList< T >::size(), source(), lduMatrix::sumMagOffDiag(), and Foam::Zero.

Referenced by kinematicThinFilm::evolveRegion(), kinematicThinFilmIBM::evolveRegion(), and sensitivitySurface::smoothSensitivities().

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

◆ relax() [2/2]

template<class Type>
void relax ( )

Relax matrix (for steady-state solution).

alpha is read from controlDict

Definition at line 574 of file faMatrix.C.

References DebugInFunction, Foam::nl, and relax().

Here is the call graph for this function:

◆ solve() [1/5]

◆ solve() [2/5]

template<class Type>
Foam::SolverPerformance< Type > solve ( const word & name)

Solve returning the solution statistics.

Uses name solver controls from faSolution

Definition at line 172 of file faMatrixSolve.C.

References Foam::name(), solve(), and solverDict().

Here is the call graph for this function:

◆ solve() [3/5]

template<class Type>
Foam::SolverPerformance< Type > solve ( )

Solve returning the solution statistics.

Solver controls read from faSolution

Definition at line 179 of file faMatrixSolve.C.

References solve(), and solverDict().

Referenced by solve(), and solve().

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

◆ residual() [1/3]

template<class Type>
Foam::tmp< Foam::Field< Type > > residual ( ) const

Return the matrix residual.

Definition at line 186 of file faMatrixSolve.C.

References addBoundaryDiag(), addBoundarySource(), Field< Type >::component(), Foam::New(), lduMatrix::residual(), and Foam::Zero.

Here is the call graph for this function:

◆ D()

template<class Type>
Foam::tmp< Foam::scalarField > D ( ) const

Return the matrix diagonal.

Definition at line 591 of file faMatrix.C.

References addCmptAvBoundaryDiag(), Foam::diag(), and tmp< T >::New().

Referenced by relax().

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

◆ A()

template<class Type>
Foam::tmp< Foam::areaScalarField > A ( ) const

Return the central coefficient.

Definition at line 600 of file faMatrix.C.

References D, Foam::dimArea, faPatchFieldBase::extrapolatedCalculatedType(), and GeometricField< scalar, faPatchField, areaMesh >::New().

Referenced by kinematicThinFilm::evolveRegion(), and kinematicThinFilmIBM::evolveRegion().

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

◆ H() [1/3]

template<class Type>
Foam::tmp< Foam::GeometricField< Type, Foam::faPatchField, Foam::areaMesh > > H ( ) const

Return the H operation source.

Definition at line 619 of file faMatrix.C.

References addBoundaryDiag(), addBoundarySource(), addCmptAvBoundaryDiag(), Foam::dimArea, faPatchFieldBase::extrapolatedCalculatedType(), lduMatrix::H(), Field< Type >::negate(), GeometricField< Type, PatchField, GeoMesh >::New(), and Foam::Zero.

Referenced by kinematicThinFilm::evolveRegion(), and kinematicThinFilmIBM::evolveRegion().

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

◆ flux()

template<class Type>
Foam::tmp< Foam::GeometricField< Type, Foam::faePatchField, Foam::edgeMesh > > flux ( ) const

Return the face-flux field from the matrix.

Definition at line 655 of file faMatrix.C.

References Foam::abort(), Foam::cmptMultiply(), dimensions(), lduMatrix::faceH(), Foam::FatalError, FatalErrorInFunction, forAll, and GeometricField< Type, PatchField, GeoMesh >::New().

Referenced by kinematicThinFilm::evolveRegion(), and kinematicThinFilmIBM::evolveRegion().

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

◆ solverDict() [1/2]

template<class Type>
const Foam::dictionary & solverDict ( const word & name) const

Return the solver dictionary (from faSolution) for name.

Definition at line 722 of file faMatrix.C.

References Foam::name().

Here is the call graph for this function:

◆ solverDict() [2/2]

template<class Type>
const Foam::dictionary & solverDict ( ) const

Return the solver dictionary for psi.

Definition at line 732 of file faMatrix.C.

Referenced by solve(), and solve().

Here is the caller graph for this function:

◆ operator=() [1/2]

template<class Type>
void operator= ( const faMatrix< Type > & famv)

Definition at line 744 of file faMatrix.C.

References Foam::abort(), faMatrix(), Foam::FatalError, FatalErrorInFunction, and lduMatrix::operator=().

Referenced by operator=().

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

◆ operator=() [2/2]

template<class Type>
void operator= ( const tmp< faMatrix< Type > > & tfamv)

Definition at line 778 of file faMatrix.C.

References faMatrix(), and operator=().

Here is the call graph for this function:

◆ negate()

template<class Type>
void negate ( )

Inplace negate.

Definition at line 786 of file faMatrix.C.

References lduMatrix::negate().

Here is the call graph for this function:

◆ operator+=() [1/7]

template<class Type>
void operator+= ( const faMatrix< Type > & famv)

Definition at line 801 of file faMatrix.C.

References Foam::checkMethod(), faMatrix(), and lduMatrix::operator+=().

Referenced by operator+=(), operator+=(), and operator+=().

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

◆ operator+=() [2/7]

template<class Type>
void operator+= ( const tmp< faMatrix< Type > > & tfamv)

Definition at line 826 of file faMatrix.C.

References faMatrix(), and operator+=().

Here is the call graph for this function:

◆ operator-=() [1/7]

template<class Type>
void operator-= ( const faMatrix< Type > & famv)

Definition at line 834 of file faMatrix.C.

References Foam::checkMethod(), faMatrix(), and lduMatrix::operator-=().

Referenced by operator-=(), operator-=(), and operator-=().

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

◆ operator-=() [2/7]

template<class Type>
void operator-= ( const tmp< faMatrix< Type > > & tfamv)

Definition at line 859 of file faMatrix.C.

References faMatrix(), and operator-=().

Here is the call graph for this function:

◆ operator+=() [3/7]

template<class Type>
void operator+= ( const DimensionedField< Type, areaMesh > & su)

Definition at line 867 of file faMatrix.C.

References Foam::checkMethod(), and source().

Here is the call graph for this function:

◆ operator+=() [4/7]

template<class Type>
void operator+= ( const tmp< DimensionedField< Type, areaMesh > > & tsu)

Definition at line 878 of file faMatrix.C.

References operator+=().

Here is the call graph for this function:

◆ operator+=() [5/7]

template<class Type>
void operator+= ( const tmp< GeometricField< Type, faPatchField, areaMesh > > & tsu)

Definition at line 889 of file faMatrix.C.

References operator+=().

Here is the call graph for this function:

◆ operator-=() [3/7]

template<class Type>
void operator-= ( const DimensionedField< Type, areaMesh > & su)

Definition at line 900 of file faMatrix.C.

References Foam::checkMethod(), and source().

Here is the call graph for this function:

◆ operator-=() [4/7]

template<class Type>
void operator-= ( const tmp< DimensionedField< Type, areaMesh > > & tsu)

Definition at line 911 of file faMatrix.C.

References operator-=().

Here is the call graph for this function:

◆ operator-=() [5/7]

template<class Type>
void operator-= ( const tmp< GeometricField< Type, faPatchField, areaMesh > > & tsu)

Definition at line 922 of file faMatrix.C.

References operator-=().

Here is the call graph for this function:

◆ operator+=() [6/7]

template<class Type>
void operator+= ( const dimensioned< Type > & su)

Definition at line 933 of file faMatrix.C.

References DimensionedField< Type, GeoMesh >::mesh(), psi, and source().

Here is the call graph for this function:

◆ operator-=() [6/7]

template<class Type>
void operator-= ( const dimensioned< Type > & su)

Definition at line 943 of file faMatrix.C.

References DimensionedField< Type, GeoMesh >::mesh(), psi, and source().

Here is the call graph for this function:

◆ operator+=() [7/7]

template<class Type>
void operator+= ( Foam::zero )
inline

Definition at line 615 of file faMatrix.H.

◆ operator-=() [7/7]

template<class Type>
void operator-= ( Foam::zero )
inline

Definition at line 616 of file faMatrix.H.

◆ operator*=() [1/4]

template<class Type>
void operator*= ( const areaScalarField::Internal & dsf)

Definition at line 953 of file faMatrix.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and lduMatrix::operator*=().

Referenced by operator*=(), and operator*=().

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

◆ operator*=() [2/4]

template<class Type>
void operator*= ( const tmp< areaScalarField::Internal > & tfld)

Definition at line 982 of file faMatrix.C.

References operator*=().

Here is the call graph for this function:

◆ operator*=() [3/4]

template<class Type>
void operator*= ( const tmp< areaScalarField > & tfld)

Definition at line 993 of file faMatrix.C.

References operator*=().

Here is the call graph for this function:

◆ operator*=() [4/4]

template<class Type>
void operator*= ( const dimensioned< scalar > & ds)

Definition at line 1004 of file faMatrix.C.

References lduMatrix::operator*=().

Here is the call graph for this function:

◆ setComponentReference() [2/3]

void setComponentReference ( const label patchI,
const label edgeI,
const direction ,
const scalar value )

Definition at line 30 of file faScalarMatrix.C.

◆ solve() [4/5]

Foam::solverPerformance solve ( const dictionary & solverControls)

Definition at line 47 of file faScalarMatrix.C.

◆ residual() [2/3]

Foam::tmp< Foam::scalarField > residual ( ) const

Definition at line 98 of file faScalarMatrix.C.

◆ H() [2/3]

Definition at line 127 of file faScalarMatrix.C.

◆ setComponentReference() [3/3]

void setComponentReference ( const label patchi,
const label facei,
const direction ,
const scalar value )

◆ solve() [5/5]

SolverPerformance< scalar > solve ( const dictionary & )

◆ residual() [3/3]

tmp< scalarField > residual ( ) const

◆ H() [3/3]

tmp< areaScalarField > H ( ) const

◆ faSolver

template<class Type>
friend class faSolver
friend

Declare friendship with the faSolver class.

Definition at line 174 of file faMatrix.H.

◆ operator& [1/4]

template<class Type>
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& ( const faMatrix< Type > & ,
const DimensionedField< Type, areaMesh > &  )
friend

◆ operator& [2/4]

template<class Type>
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& ( const faMatrix< Type > & ,
const tmp< GeometricField< Type, faPatchField, areaMesh > > &  )
friend

◆ operator& [3/4]

template<class Type>
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& ( const tmp< faMatrix< Type > > & ,
const DimensionedField< Type, areaMesh > &  )
friend

◆ operator& [4/4]

template<class Type>
tmp< GeometricField< Type, faPatchField, areaMesh > > operator& ( const tmp< faMatrix< Type > > & ,
const tmp< GeometricField< Type, faPatchField, areaMesh > > &  )
friend

◆ operator<<

template<class Type>
Ostream & operator<< ( Ostream & ,
const faMatrix< Type > &  )
friend

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