Public Member Functions | Private Member Functions | Private Attributes
LUscalarMatrix Class Reference

Foam::LUscalarMatrix. More...

Inheritance diagram for LUscalarMatrix:
Inheritance graph
[legend]
Collaboration diagram for LUscalarMatrix:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("LUscalarMatrix")
 
 LUscalarMatrix (const scalarSquareMatrix &)
 Construct from scalarSquareMatrix and perform LU decomposition. More...
 
 LUscalarMatrix (const lduMatrix &, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces)
 Construct from lduMatrix and perform LU decomposition. More...
 
template<class T >
void solve (Field< T > &source) const
 Solve the matrix using the LU decomposition with pivoting. More...
 
template<class Type >
void solve (Field< Type > &sourceSol) const
 
- Public Member Functions inherited from SquareMatrix< scalar >
 SquareMatrix ()
 Null constructor. More...
 
 SquareMatrix (const label n)
 Construct given number of rows/columns. More...
 
 SquareMatrix (const label m, const label n)
 Construct given number of rows and columns,. More...
 
 SquareMatrix (const label m, const label n, const scalar &)
 Construct with given number of rows and rows. More...
 
 SquareMatrix (Istream &)
 Construct from Istream. More...
 
autoPtr< SquareMatrix< scalar > > clone () const
 Clone. More...
 
- Public Member Functions inherited from Matrix< SquareMatrix< scalar >, scalar >
 Matrix ()
 Null constructor. More...
 
 Matrix (const label n, const label m)
 Construct given number of rows and columns. More...
 
 Matrix (const label n, const label m, const Type &)
 Construct with given number of rows and columns. More...
 
 Matrix (const Matrix< Form, Type > &)
 Copy constructor. More...
 
 Matrix (Istream &)
 Construct from Istream. More...
 
autoPtr< Matrix< Form, Type > > clone () const
 Clone. More...
 
 ~Matrix ()
 Destructor. More...
 
label n () const
 Return the number of rows. More...
 
label m () const
 Return the number of columns. More...
 
label size () const
 Return the number of elements in matrix (n*m) More...
 
void checki (const label i) const
 Check index i is within valid range (0 ... n-1). More...
 
void checkj (const label j) const
 Check index j is within valid range (0 ... m-1). More...
 
void clear ()
 Clear the Matrix, i.e. set sizes to zero. More...
 
void transfer (Matrix< Form, Type > &)
 Transfer the contents of the argument Matrix into this Matrix. More...
 
Form T () const
 Return the transpose of the matrix. More...
 
Type * operator[] (const label)
 Return subscript-checked row of Matrix. More...
 
const Type * operator[] (const label) const
 Return subscript-checked row of constant Matrix. More...
 
void operator= (const Matrix< Form, Type > &)
 Assignment operator. Takes linear time. More...
 
void operator= (const Type &)
 Assignment of all entries to the given value. More...
 

Private Member Functions

void convert (const lduMatrix &ldum, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces)
 Convert the given lduMatrix into this LUscalarMatrix. More...
 
void convert (const PtrList< procLduMatrix > &lduMatrices)
 Convert the given list of procLduMatrix into this LUscalarMatrix. More...
 
void printDiagonalDominance () const
 Print the ratio of the mag-sum of the off-diagonal coefficients. More...
 

Private Attributes

const label comm_
 Communicator to use. More...
 
labelList procOffsets_
 Processor matrix offsets. More...
 
labelList pivotIndices_
 The pivot indices used in the LU decomposition. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Matrix< SquareMatrix< scalar >, scalar >
static const Matrix< Form, Type > & null ()
 Return a null Matrix. More...
 

Detailed Description

Foam::LUscalarMatrix.

Source files

Definition at line 54 of file LUscalarMatrix.H.

Constructor & Destructor Documentation

◆ LUscalarMatrix() [1/2]

LUscalarMatrix ( const scalarSquareMatrix matrix)

Construct from scalarSquareMatrix and perform LU decomposition.

Definition at line 42 of file LUscalarMatrix.C.

References Foam::LUDecompose(), and LUscalarMatrix::pivotIndices_.

Here is the call graph for this function:

◆ LUscalarMatrix() [2/2]

LUscalarMatrix ( const lduMatrix ldum,
const FieldField< Field, scalar > &  interfaceCoeffs,
const lduInterfaceFieldPtrsList interfaces 
)

Member Function Documentation

◆ convert() [1/2]

void convert ( const lduMatrix ldum,
const FieldField< Field, scalar > &  interfaceCoeffs,
const lduInterfaceFieldPtrsList interfaces 
)
private

◆ convert() [2/2]

void convert ( const PtrList< procLduMatrix > &  lduMatrices)
private

◆ printDiagonalDominance()

void printDiagonalDominance ( ) const
private

Print the ratio of the mag-sum of the off-diagonal coefficients.

to the mag-diagonal

Definition at line 388 of file LUscalarMatrix.C.

References Foam::endl(), Foam::Info, Foam::mag(), n, and Foam::sum().

Here is the call graph for this function:

◆ ClassName()

ClassName ( "LUscalarMatrix"  )

◆ solve() [1/2]

void solve ( Field< T > &  source) const

Solve the matrix using the LU decomposition with pivoting.

returning the solution in the source

◆ solve() [2/2]

void solve ( Field< Type > &  sourceSol) const

Field Documentation

◆ comm_

const label comm_
private

Communicator to use.

Definition at line 61 of file LUscalarMatrix.H.

Referenced by LUscalarMatrix::solve().

◆ procOffsets_

labelList procOffsets_
private

Processor matrix offsets.

Definition at line 64 of file LUscalarMatrix.H.

Referenced by LUscalarMatrix::solve().

◆ pivotIndices_

labelList pivotIndices_
private

The pivot indices used in the LU decomposition.

Definition at line 67 of file LUscalarMatrix.H.

Referenced by LUscalarMatrix::LUscalarMatrix(), and LUscalarMatrix::solve().


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