Go to the documentation of this file.
32 template<
class Form1,
class Form2,
class Type>
43 const label len =
A.size();
49 Info<<
"Matrices have different sizes: "
50 << len <<
" vs " <<
B.size() <<
nl;
55 auto iter1 =
A.cbegin();
56 auto iter2 =
B.cbegin();
60 for (label i = 0; i < len; ++i)
62 if ((absTol + relTol*
mag(*iter2)) <
Foam::mag(*iter1 - *iter2))
68 Info<<
"Matrix element " << i
69 <<
" differs beyond tolerance: "
70 << *iter1 <<
" vs " << *iter2 <<
nl;
72 if (maxDiffs && maxDiffs < nDiffs)
74 Info<<
"More than " << maxDiffs <<
" elements differ."
75 <<
" Skipping further comparisons." <<
nl;
88 Info<<
"Some elements differed" <<
nl;
92 Info<<
"All elements equal within the tolerances" <<
nl;
100 template<
class Container>
107 os << mat.m() <<
' ' << mat.n();
113 for (label j = 0; j < mat.n(); ++j)
120 else if (mat.n() == 1)
125 for (label i = 0; i < mat.m(); ++i)
138 for (label i = 0; i < mat.m(); ++i)
141 for (label j = 0; j < mat.n(); ++j)
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
A templated (m x n) matrix of objects of <T>. The layout is (mRows x nCols) - row-major order:
messageStream Info
Information stream (stdout output on master, null elsewhere)
OBJstream os(runTime.globalPath()/outputName)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...