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. | |
| template<class Container> | |
| Ostream & | printMatrix (Ostream &os, const Container &mat) |
| Simple ASCII output of Matrix, MatrixBlock. | |
| 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). | |
| 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 26 of file MatrixTools.C.
References A, B, Foam::Info, Foam::mag(), and Foam::nl.

Simple ASCII output of Matrix, MatrixBlock.
References os().

| 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 576 of file QRMatrix.C.
References A, Foam::abort(), QRMatrix< MatrixType >::BOTH_QR, C, Foam::diag(), e, Foam::endl(), Foam::FatalError, FatalErrorInFunction, QRMatrix< MatrixType >::FULL, Matrix< Form, Type >::m(), Foam::mag(), Matrix< Form, Type >::n(), QRMatrix< MatrixType >::P(), QRMatrix< MatrixType >::Q(), QRMatrix< MatrixType >::R(), R, Matrix< Form, Type >::resize(), QRMatrix< MatrixType >::solve(), QRMatrix< MatrixType >::TRUE, WarningInFunction, x, and Foam::Zero.
