56 tensor2D::uniform(vGreat)
62 tensor2D::uniform(-vGreat)
68 tensor2D::uniform(rootVGreat)
74 tensor2D::uniform(-rootVGreat)
80 tensor2D::uniform(NaN)
96 const scalar
b = - t.
xx() - t.
yy();
97 const scalar
c = t.
xx()*t.
yy() - t.
xy()*t.
yx();
106 switch (roots.
type(i))
111 case rootType::complex:
113 <<
"Complex eigenvalues detected for tensor: " << t
117 case rootType::posInf:
120 case rootType::negInf:
125 <<
"Eigenvalue calculation failed for tensor: " << t
157 else if (
mag(
A.xx()) > small)
165 return vector2D(- direction1.
y(), direction1.
x());
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
#define forAll(list, i)
Loop across all elements in list.
Templated storage for the roots of polynomial equations, plus flags to indicate the nature of the roo...
void type(const direction i, const rootType t)
Set the type of the i-th root.
Templated 2D tensor derived from VectorSpace adding construction from 4 components,...
static const char *const componentNames[]
static const Form rootMax
static const Form rootMin
static const char *const typeName
Quadratic equation of the form a*x^2 + b*x + c = 0.
Roots< 2 > roots() const
Get the roots.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar lambda(viscosity->lookup("lambda"))
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar c
Speed of light in a vacuum.
Vector2D< scalar > vector2D
vector2D obtained from generic Vector2D
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedTensor eigenVectors(const dimensionedTensor &dt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Tensor2D< scalar > tensor2D
Tensor2D or scalars.
static const Identity< scalar > I
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedVector eigenValues(const dimensionedTensor &dt)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
vector eigenVector(const tensor &T, const scalar lambda, const vector &direction1, const vector &direction2)