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 |
![]() | |
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... | |
![]() | |
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 const Matrix< Form, Type > & | null () |
Return a null Matrix. More... | |
Definition at line 54 of file LUscalarMatrix.H.
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_.
LUscalarMatrix | ( | const lduMatrix & | ldum, |
const FieldField< Field, scalar > & | interfaceCoeffs, | ||
const lduInterfaceFieldPtrsList & | interfaces | ||
) |
Construct from lduMatrix and perform LU decomposition.
Definition at line 53 of file LUscalarMatrix.C.
References Foam::endl(), UPstream::firstSlave(), forAll, UPstream::lastSlave(), lduMatrix::lduAddr(), Foam::LUDecompose(), Foam::mag(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), n, UPstream::nProcs(), UPstream::parRun(), Foam::Pout, UPstream::scheduled, PtrList::set(), lduAddressing::size(), and PtrList::size().
|
private |
Convert the given lduMatrix into this LUscalarMatrix.
Definition at line 192 of file LUscalarMatrix.C.
References UList::begin(), UPtrList::begin(), lduMatrix::diag(), forAll, interface(), lduMatrix::lduAddr(), lduMatrix::lower(), lduAddressing::lowerAddr(), cyclicLduInterface::neighbPatchID(), UPtrList::set(), lduMatrix::upper(), and lduAddressing::upperAddr().
|
private |
Convert the given list of procLduMatrix into this LUscalarMatrix.
on the master processor
Definition at line 258 of file LUscalarMatrix.C.
References procLduInterface::coeffs_, procLduMatrix::diag_, Foam::exit(), procLduInterface::faceCells_, Foam::FatalError, FatalErrorInFunction, forAll, interface(), procLduMatrix::interfaces_, procLduMatrix::lower_, procLduMatrix::lowerAddr_, procLduMatrix::size(), PtrList::size(), procLduMatrix::upper_, and procLduMatrix::upperAddr_.
|
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().
ClassName | ( | "LUscalarMatrix" | ) |
Solve the matrix using the LU decomposition with pivoting.
returning the solution in the source
void solve | ( | Field< Type > & | sourceSol | ) | const |
Definition at line 31 of file LUscalarMatrixTemplates.C.
References LUscalarMatrix::comm_, UPstream::firstSlave(), UPstream::lastSlave(), Foam::LUBacksubstitute(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), Matrix< SquareMatrix< scalar >, scalar >::n(), UPstream::parRun(), LUscalarMatrix::pivotIndices_, LUscalarMatrix::procOffsets_, UIPstream::read(), UPstream::scheduled, and UOPstream::write().
|
private |
Communicator to use.
Definition at line 61 of file LUscalarMatrix.H.
Referenced by LUscalarMatrix::solve().
|
private |
Processor matrix offsets.
Definition at line 64 of file LUscalarMatrix.H.
Referenced by LUscalarMatrix::solve().
|
private |
The pivot indices used in the LU decomposition.
Definition at line 67 of file LUscalarMatrix.H.
Referenced by LUscalarMatrix::LUscalarMatrix(), and LUscalarMatrix::solve().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.