Collection of functions for matrix-related verifications. More...
Functions | |
| template<class Form1 , class Form2 , class Type > | |
| bool | equal (const Matrix< Form1, Type > &A, const Matrix< Form2, Type > &B, const bool verbose=false, const label maxDiffs=10, const scalar relTol=1e-5, const scalar absTol=1e-8) |
| Compare matrix elements for absolute or relative equality. More... | |
| template<class Container > | |
| Ostream & | printMatrix (Ostream &os, const Container &mat) |
| Simple ASCII output of Matrix, MatrixBlock. More... | |
| template<class MatrixType > | |
| MatrixType | pinv (const MatrixType &A, scalar tol=1e-5) |
| Moore-Penrose inverse of singular/non-singular square/rectangular scalar/complex matrices (KPP:p. 9834; KP:p. 648) More... | |
| bool equal | ( | const Matrix< Form1, Type > & | A, |
| const Matrix< Form2, Type > & | B, | ||
| const bool | verbose = false, |
||
| const label | maxDiffs = 10, |
||
| const scalar | relTol = 1e-5, |
||
| const scalar | absTol = 1e-8 |
||
| ) |
Compare matrix elements for absolute or relative equality.
| maxDiffs | Stop reporting after maxDiffs (0 to disable) |
Definition at line 27 of file MatrixTools.C.
References A, B, Foam::Info, Foam::mag(), and Foam::nl.

Simple ASCII output of Matrix, MatrixBlock.
| MatrixType pinv | ( | const MatrixType & | A, |
| scalar | tol = 1e-5 |
||
| ) |
Moore-Penrose inverse of singular/non-singular square/rectangular scalar/complex matrices (KPP:p. 9834; KP:p. 648)
The tolerance to ensure the R1 matrix full-rank is set to 1e-5 by (TA; mentioned in (KPP:p. 9832)) in contrast to 1e-13 (KPP:p. 9834).
Definition at line 577 of file QRMatrix.C.
References A, Foam::abort(), C, Foam::diag(), Foam::distance(), Foam::constant::electromagnetic::e, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::ListOps::find_if(), Foam::mag(), QRMatrix< MatrixType >::P(), QRMatrix< MatrixType >::Q(), R, QRMatrix< MatrixType >::R(), Matrix< RectangularMatrix< Type >, Type >::resize(), QRMatrix< MatrixType >::solve(), WarningInFunction, x, and Foam::Zero.
Referenced by Foam::SVDinv().

