55 tensor2D::uniform(VGREAT)
61 tensor2D::uniform(-VGREAT)
67 tensor2D::uniform(ROOTVGREAT)
73 tensor2D::uniform(-ROOTVGREAT)
91 if (
mag(t.xy()) < SMALL &&
mag(t.yx()) < SMALL)
98 scalar mb = t.xx() + t.yy();
99 scalar c = t.xx()*t.yy() - t.xy()*t.yx();
109 scalar disc =
sqr(mb) - 4*
c;
113 scalar q =
sqrt(disc);
121 <<
"zero and complex eigenvalues in tensor2D: " << t
141 return vector2D::zero;
144 if (
mag(t.xy()) < SMALL &&
mag(t.yx()) < SMALL)
146 if (lambda >
min(t.xx(), t.yy()))
155 else if (
mag(t.xy()) < SMALL)
157 return vector2D(lambda - t.yy(), t.yx());
161 return vector2D(t.xy(), lambda - t.yy());
static const char *const typeName
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Vector2D< scalar > vector2D
vector2D obtained from generic Vector2D
static const char *const componentNames[]
dimensionedVector eigenValues(const dimensionedTensor &dt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
static const Form rootMax
Templated 2D tensor derived from VectorSpace adding construction from 4 components, element access using xx(), xy(), yx() and yy() member functions and the iner-product (dot-product) and outer-product of two Vector2Ds (tensor-product) operators.
static const Form rootMin
errorManip< error > abort(error &err)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedTensor eigenVectors(const dimensionedTensor &dt)
const dimensionedScalar c
Speed of light in a vacuum.
dimensioned< scalar > mag(const dimensioned< Type > &)
Tensor2D< scalar > tensor2D
Tensor2D or scalars.
vector eigenVector(const tensor &, const scalar lambda)