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());
#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 bool real=false) 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.
static const coefficient A("A", dimPressure, 611.21)
Vector2D< scalar > vector2D
vector2D obtained from generic Vector2D
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
vector eigenVector(const TensorType &T, const scalar lambda, const vector &direction1, const vector &direction2)
void eigenValues(LagrangianPatchField< vector > &f, const LagrangianPatchField< tensor > &f1)
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
Tensor2D< scalar > tensor2D
Tensor2D or scalars.
static const Identity< scalar > I
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
void eigenVectors(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)