A simple square matrix solver with scalar coefficients. More...
Public Member Functions | |
simpleMatrix (const label) | |
Construct given size. More... | |
simpleMatrix (const label, const scalar, const Type &) | |
Construct given size and initial values for coefficients and source. More... | |
simpleMatrix (const scalarSquareMatrix &, const Field< Type > &) | |
Construct from components. More... | |
simpleMatrix (Istream &) | |
Construct from Istream. More... | |
simpleMatrix (const simpleMatrix< Type > &) | |
Construct as copy. More... | |
Field< Type > & | source () |
Return access to the source. More... | |
const Field< Type > & | source () const |
Return const-access to the source. More... | |
Field< Type > | solve () const |
Solve the matrix using Gaussian elimination with pivoting. More... | |
Field< Type > | LUsolve () const |
Solve the matrix using LU decomposition with pivoting. More... | |
void | operator= (const simpleMatrix< Type > &) |
Private Attributes | |
Field< Type > | source_ |
Friends | |
Ostream & | operator (Ostream &, const simpleMatrix< Type > &) |
A simple square matrix solver with scalar coefficients.
Definition at line 47 of file simpleMatrix.H.
simpleMatrix | ( | const | label | ) |
Construct given size.
Note: this does not initialise the coefficients or the source.
simpleMatrix | ( | const | label, |
const | scalar, | ||
const Type & | |||
) |
Construct given size and initial values for coefficients and source.
simpleMatrix | ( | const scalarSquareMatrix & | , |
const Field< Type > & | |||
) |
Construct from components.
simpleMatrix | ( | Istream & | ) |
Construct from Istream.
simpleMatrix | ( | const simpleMatrix< Type > & | ) |
Construct as copy.
|
inline |
Return access to the source.
Definition at line 97 of file simpleMatrix.H.
References simpleMatrix::source_.
Referenced by quadricFitting::calculateQuadricCoeffs(), and main().
|
inline |
Return const-access to the source.
Definition at line 103 of file simpleMatrix.H.
References simpleMatrix::source_.
Foam::Field< Type > solve | ( | ) | const |
Solve the matrix using Gaussian elimination with pivoting.
and return the solution
Definition at line 74 of file simpleMatrix.C.
References Foam::solve().
Referenced by main().
Foam::Field< Type > LUsolve | ( | ) | const |
Solve the matrix using LU decomposition with pivoting.
and return the solution
Definition at line 86 of file simpleMatrix.C.
References Foam::LUsolve().
Referenced by quadricFitting::calculateQuadricCoeffs(), and main().
void operator= | ( | const simpleMatrix< Type > & | m | ) |
Definition at line 100 of file simpleMatrix.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, n, Matrix< SquareMatrix< scalar >, scalar >::operator=(), and simpleMatrix::source_.
|
friend |
|
private |
Definition at line 68 of file simpleMatrix.H.
Referenced by simpleMatrix::operator=(), and simpleMatrix::source().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.