Classes | Public Member Functions | Friends | List of all members
LduMatrix Class Reference

LduMatrix is a general matrix class in which the coefficients are stored as three arrays, one for the upper triangle, one for the lower triangle and a third for the diagonal. More...

Inheritance diagram for LduMatrix:
Inheritance graph
[legend]

Classes

class  preconditioner
 
class  smoother
 
class  solver
 

Public Member Functions

 ClassName ("LduMatrix")
 
 LduMatrix (const lduMesh &)
 
 LduMatrix (const LduMatrix< Type, DType, LUType > &)
 
 LduMatrix (LduMatrix< Type, DType, LUType > &, bool reuse)
 
 LduMatrix (const lduMesh &, Istream &)
 
 ~LduMatrix ()
 
const lduMeshmesh () const
 
const lduAddressinglduAddr () const
 
const lduSchedulepatchSchedule () const
 
const LduInterfaceFieldPtrsList< Type > & interfaces () const
 
LduInterfaceFieldPtrsList< Type > & interfaces ()
 
Field< DType > & diag ()
 
Field< LUType > & upper ()
 
Field< LUType > & lower ()
 
Field< Type > & source ()
 
FieldField< Field, LUType > & interfacesUpper ()
 
FieldField< Field, LUType > & interfacesLower ()
 
const Field< DType > & diag () const
 
const Field< LUType > & upper () const
 
const Field< LUType > & lower () const
 
const Field< Type > & source () const
 
const FieldField< Field, LUType > & interfacesUpper () const
 
const FieldField< Field, LUType > & interfacesLower () const
 
bool hasDiag () const
 
bool hasUpper () const
 
bool hasLower () const
 
bool hasSource () const
 
bool diagonal () const
 
bool symmetric () const
 
bool asymmetric () const
 
void sumDiag ()
 
void negSumDiag ()
 
void sumMagOffDiag (Field< LUType > &sumOff) const
 
void Amul (Field< Type > &, const tmp< Field< Type >> &) const
 
void Tmul (Field< Type > &, const tmp< Field< Type >> &) const
 
void sumA (Field< Type > &) const
 
void residual (Field< Type > &rA, const Field< Type > &psi) const
 
tmp< Field< Type > > residual (const Field< Type > &psi) const
 
void initMatrixInterfaces (const bool add, const FieldField< Field, LUType > &interfaceCoeffs, const Field< Type > &psiif, Field< Type > &result) const
 
void updateMatrixInterfaces (const bool add, const FieldField< Field, LUType > &interfaceCoeffs, const Field< Type > &psiif, Field< Type > &result) const
 
tmp< Field< Type > > H (const Field< Type > &) const
 
tmp< Field< Type > > H (const tmp< Field< Type >> &) const
 
tmp< Field< Type > > faceH (const Field< Type > &) const
 
tmp< Field< Type > > faceH (const tmp< Field< Type >> &) const
 
void operator= (const LduMatrix< Type, DType, LUType > &)
 
void negate ()
 
void operator+= (const LduMatrix< Type, DType, LUType > &)
 
void operator-= (const LduMatrix< Type, DType, LUType > &)
 
void operator*= (const scalarField &)
 
void operator*= (scalar)
 

Friends

class SolverPerformance< Type >
 
Ostreamoperator (Ostream &, const LduMatrix< Type, DType, LUType > &)
 

Detailed Description

LduMatrix is a general matrix class in which the coefficients are stored as three arrays, one for the upper triangle, one for the lower triangle and a third for the diagonal.

Addressing arrays must be supplied for the upper and lower triangles.

Note
It might be better if this class were organised as a hierarchy starting from an empty matrix, then deriving diagonal, symmetric and asymmetric matrices.
Source files

Definition at line 68 of file LduMatrix.H.

Constructor & Destructor Documentation

◆ LduMatrix() [1/4]

LduMatrix ( const lduMesh )

◆ LduMatrix() [2/4]

LduMatrix ( const LduMatrix< Type, DType, LUType > &  )

◆ LduMatrix() [3/4]

LduMatrix ( LduMatrix< Type, DType, LUType > &  ,
bool  reuse 
)

◆ LduMatrix() [4/4]

LduMatrix ( const lduMesh ,
Istream  
)

◆ ~LduMatrix()

~LduMatrix ( )

Definition at line 158 of file LduMatrix.C.

Member Function Documentation

◆ ClassName()

ClassName ( "LduMatrix"  )

◆ mesh()

const lduMesh& mesh ( ) const
inline

Definition at line 488 of file LduMatrix.H.

◆ lduAddr()

const lduAddressing& lduAddr ( ) const
inline

◆ patchSchedule()

const lduSchedule& patchSchedule ( ) const
inline

Definition at line 500 of file LduMatrix.H.

◆ interfaces() [1/2]

const LduInterfaceFieldPtrsList<Type>& interfaces ( ) const
inline

Definition at line 506 of file LduMatrix.H.

◆ interfaces() [2/2]

LduInterfaceFieldPtrsList<Type>& interfaces ( )
inline

Definition at line 512 of file LduMatrix.H.

◆ diag() [1/2]

Foam::Field< DType > & diag ( )

◆ upper() [1/2]

Foam::Field< LUType > & upper ( )

◆ lower() [1/2]

Foam::Field< LUType > & lower ( )

◆ source() [1/2]

Foam::Field< Type > & source ( )

Definition at line 243 of file LduMatrix.C.

Referenced by TGaussSeidelSmoother< Type, DType, LUType >::smooth().

Here is the caller graph for this function:

◆ interfacesUpper() [1/2]

FieldField<Field, LUType>& interfacesUpper ( )
inline

Definition at line 525 of file LduMatrix.H.

Referenced by TGaussSeidelSmoother< Type, DType, LUType >::smooth().

Here is the caller graph for this function:

◆ interfacesLower() [1/2]

FieldField<Field, LUType>& interfacesLower ( )
inline

Definition at line 530 of file LduMatrix.H.

◆ diag() [2/2]

const Foam::Field< DType > & diag ( ) const

Definition at line 255 of file LduMatrix.C.

◆ upper() [2/2]

const Foam::Field< LUType > & upper ( ) const

Definition at line 269 of file LduMatrix.C.

◆ lower() [2/2]

const Foam::Field< LUType > & lower ( ) const

Definition at line 290 of file LduMatrix.C.

◆ source() [2/2]

const Foam::Field< Type > & source ( ) const

Definition at line 311 of file LduMatrix.C.

◆ interfacesUpper() [2/2]

const FieldField<Field, LUType>& interfacesUpper ( ) const
inline

Definition at line 541 of file LduMatrix.H.

◆ interfacesLower() [2/2]

const FieldField<Field, LUType>& interfacesLower ( ) const
inline

Definition at line 546 of file LduMatrix.H.

◆ hasDiag()

bool hasDiag ( ) const
inline

Definition at line 552 of file LduMatrix.H.

◆ hasUpper()

bool hasUpper ( ) const
inline

Definition at line 557 of file LduMatrix.H.

◆ hasLower()

bool hasLower ( ) const
inline

Definition at line 562 of file LduMatrix.H.

◆ hasSource()

bool hasSource ( ) const
inline

Definition at line 567 of file LduMatrix.H.

◆ diagonal()

bool diagonal ( ) const
inline

Definition at line 572 of file LduMatrix.H.

Referenced by LduMatrix::solver::New().

Here is the caller graph for this function:

◆ symmetric()

bool symmetric ( ) const
inline

Definition at line 577 of file LduMatrix.H.

Referenced by LduMatrix::solver::New(), LduMatrix::smoother::New(), and LduMatrix::preconditioner::New().

Here is the caller graph for this function:

◆ asymmetric()

bool asymmetric ( ) const
inline

Definition at line 582 of file LduMatrix.H.

Referenced by LduMatrix::solver::New(), LduMatrix::smoother::New(), and LduMatrix::preconditioner::New().

Here is the caller graph for this function:

◆ sumDiag()

void sumDiag ( )

Definition at line 27 of file LduMatrixOperations.C.

◆ negSumDiag()

void negSumDiag ( )

Definition at line 45 of file LduMatrixOperations.C.

◆ sumMagOffDiag()

void sumMagOffDiag ( Field< LUType > &  sumOff) const

Definition at line 64 of file LduMatrixOperations.C.

◆ Amul()

void Amul ( Field< Type > &  Apsi,
const tmp< Field< Type >> &  tpsi 
) const

Definition at line 59 of file LduMatrixATmul.C.

◆ Tmul()

void Tmul ( Field< Type > &  Tpsi,
const tmp< Field< Type >> &  tpsi 
) const

Definition at line 115 of file LduMatrixATmul.C.

◆ sumA()

void sumA ( Field< Type > &  sumA) const

Definition at line 170 of file LduMatrixATmul.C.

◆ residual() [1/2]

void residual ( Field< Type > &  rA,
const Field< Type > &  psi 
) const

Definition at line 218 of file LduMatrixATmul.C.

◆ residual() [2/2]

Foam::tmp< Foam::Field< Type > > residual ( const Field< Type > &  psi) const

Definition at line 275 of file LduMatrixATmul.C.

◆ initMatrixInterfaces()

void initMatrixInterfaces ( const bool  add,
const FieldField< Field, LUType > &  interfaceCoeffs,
const Field< Type > &  psiif,
Field< Type > &  result 
) const

Definition at line 29 of file LduMatrixUpdateMatrixInterfaces.C.

Referenced by TGaussSeidelSmoother< Type, DType, LUType >::smooth().

Here is the caller graph for this function:

◆ updateMatrixInterfaces()

void updateMatrixInterfaces ( const bool  add,
const FieldField< Field, LUType > &  interfaceCoeffs,
const Field< Type > &  psiif,
Field< Type > &  result 
) const

Definition at line 101 of file LduMatrixUpdateMatrixInterfaces.C.

Referenced by TGaussSeidelSmoother< Type, DType, LUType >::smooth().

Here is the caller graph for this function:

◆ H() [1/2]

tmp<Field<Type> > H ( const Field< Type > &  ) const

◆ H() [2/2]

tmp<Field<Type> > H ( const tmp< Field< Type >> &  ) const

◆ faceH() [1/2]

tmp<Field<Type> > faceH ( const Field< Type > &  ) const

◆ faceH() [2/2]

tmp<Field<Type> > faceH ( const tmp< Field< Type >> &  ) const

◆ operator=()

void operator= ( const LduMatrix< Type, DType, LUType > &  )

Definition at line 163 of file LduMatrixOperations.C.

◆ negate()

void negate ( )

Definition at line 206 of file LduMatrixOperations.C.

◆ operator+=()

void operator+= ( const LduMatrix< Type, DType, LUType > &  )

Definition at line 234 of file LduMatrixOperations.C.

◆ operator-=()

void operator-= ( const LduMatrix< Type, DType, LUType > &  )

Definition at line 311 of file LduMatrixOperations.C.

◆ operator*=() [1/2]

void operator*= ( const scalarField )

◆ operator*=() [2/2]

void operator*= ( scalar  )

Friends And Related Function Documentation

◆ SolverPerformance< Type >

friend class SolverPerformance< Type >
friend

Definition at line 108 of file LduMatrix.H.

◆ operator

Ostream& operator ( Ostream ,
const LduMatrix< Type, DType, LUType > &   
)
friend

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