Go to the documentation of this file.
46 symmTensor2D::uniform(0)
52 symmTensor2D::uniform(1)
58 symmTensor2D::uniform(VGREAT)
64 symmTensor2D::uniform(-VGREAT)
70 symmTensor2D::uniform(ROOTVGREAT)
76 symmTensor2D::uniform(-ROOTVGREAT)
92 if (
sqr(
T.xy()) < ROOTSMALL)
98 const scalar skewTrace =
T.xx() -
T.yy();
99 const scalar trace =
tr(
T);
100 const scalar gap =
sign(skewTrace)*
hypot(skewTrace, 2*
T.xy());
102 return vector2D(0.5*(trace + gap), 0.5*(trace - gap));
122 if (
mag(eVec) < SMALL)
125 <<
"Eigenvector magnitude should be non-zero:"
126 <<
"mag(eigenvector) = " <<
mag(eVec)
131 return eVec/
mag(eVec);
133 else if (
mag(
A.xx()) > SMALL)
138 if (
mag(eVec) < SMALL)
141 <<
"Eigenvector magnitude should be non-zero:"
142 <<
"mag(eigenvector) = " <<
mag(eVec)
147 return eVec/
mag(eVec);
151 return vector2D(-standardBasis.
y(), standardBasis.
x());
162 const scalar skewTrace =
T.xx() -
T.yy();
164 if (
mag(skewTrace) > SMALL)
166 const scalar
phi = 0.5*
atan(2*
T.xy()/skewTrace);
167 const scalar cphi =
cos(
phi);
168 const scalar sphi =
sin(
phi);
169 return tensor2D(cphi, sphi, -sphi, cphi);
171 else if (
mag(
T.xy()) > SMALL)
173 const scalar a = 0.70710678;
static const Form rootMax
static const char *const componentNames[]
vector eigenVector(const symmTensor &T, const scalar eVal, const vector &standardBasis1, const vector &standardBasis2)
dimensionedVector eigenValues(const dimensionedSymmTensor &dt)
dimensionedScalar sin(const dimensionedScalar &ds)
A templated (2 x 2) symmetric tensor of objects of <T>, effectively containing 3 elements,...
dimensionedTensor eigenVectors(const dimensionedSymmTensor &dt)
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
Tensor2D< scalar > tensor2D
Tensor2D of scalars, i.e. Tensor2D<scalar>.
dimensionedScalar sign(const dimensionedScalar &ds)
A templated (2 x 2) tensor of objects of <T> derived from VectorSpace.
dimensionedScalar hypot(const dimensionedScalar &x, const dimensionedScalar &y)
static const SymmTensor2D I
errorManip< error > abort(error &err)
static const Form rootMin
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Vector2D< scalar > vector2D
A 2D vector of scalars obtained from the generic Vector2D.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar atan(const dimensionedScalar &ds)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
const Cmpt & y() const
Access to the vector y component.
const Cmpt & x() const
Access to the vector x component.
static const Identity< scalar > I
static const char *const typeName
dimensionedScalar cos(const dimensionedScalar &ds)