84 return dt.
xx() + dt.
yy() + dt.
zz();
103 return dt.
xx()*dt.
yy()*dt.
zz();
109 inline DiagTensor<Cmpt>
inv(
const DiagTensor<Cmpt>& dt)
112 if (
mag(
det(dt)) < VSMALL)
115 <<
"DiagTensor is not invertible due to the zero determinant:" 116 <<
"det(DiagTensor) = " <<
det(dt)
127 inline DiagTensor<Cmpt>
diag(
const Tensor<Cmpt>& t)
129 return DiagTensor<Cmpt>(t.xx(), t.yy(), t.zz());
135 inline DiagTensor<Cmpt>
diag(
const SymmTensor<Cmpt>& st)
137 return DiagTensor<Cmpt>(st.xx(), st.yy(), st.zz());
150 dt1.
xx() + t2.
xx(), t2.
xy(), t2.
xz(),
151 t2.
yx(), dt1.
yy() + t2.
yy(), t2.
yz(),
152 t2.
zx(), t2.
zy(), dt1.
zz() + t2.
zz()
160 operator+(
const Tensor<Cmpt>& t1,
const DiagTensor<Cmpt>& dt2)
164 t1.xx() + dt2.xx(), t1.xy(), t1.xz(),
165 t1.yx(), t1.yy() + dt2.yy(), t1.yz(),
166 t1.zx(), t1.zy(), t1.zz() + dt2.zz()
178 dt1.
xx() - t2.
xx(), -t2.
xy(), -t2.
xz(),
179 -t2.
yx(), dt1.
yy() - t2.
yy(), -t2.
yz(),
180 -t2.
zx(), -t2.
zy(), dt1.
zz() - t2.
zz()
192 t1.
xx() - dt2.
xx(), t1.
xy(), t1.
xz(),
193 t1.
yx(), t1.
yy() - dt2.
yy(), t1.
yz(),
194 t1.
zx(), t1.
zy(), t1.
zz() - dt2.
zz()
205 if (
mag(
det(dt)) < VSMALL)
209 <<
" is not divisible by the DiagTensor due to a zero element:" 210 <<
"DiagTensor = " << dt
228 <<
"DiagTensor = " << dt
229 <<
" is not divisible due to a zero value in Cmpt:" 245 if (
mag(
det(dt)) < VSMALL)
249 <<
" is not divisible by the DiagTensor due to a zero element:" 250 <<
"DiagTensor = " << dt
276 operator&(
const DiagTensor<Cmpt>& dt1,
const Tensor<Cmpt>& t2)
298 operator&(
const Tensor<Cmpt>& t1,
const DiagTensor<Cmpt>& dt2)
320 operator&(
const DiagTensor<Cmpt>& dt,
const Vector<Cmpt>& v)
334 operator&(
const Vector<Cmpt>& v,
const DiagTensor<Cmpt>& dt)
const Cmpt & zz() const noexcept
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Cmpt & yx() const noexcept
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const Cmpt & xy() const noexcept
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
const Cmpt & y() const noexcept
Access to the vector y component.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
SphericalTensor< Cmpt > sph(const DiagTensor< Cmpt > &dt)
Return the spherical part of a DiagTensor as a SphericalTensor.
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 1 element, derived from VectorSpace.
const Cmpt & yz() const noexcept
const Cmpt & xx() const noexcept
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
const Cmpt & yy() const noexcept
DiagTensor()=default
Default construct.
const Cmpt & zx() const noexcept
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 3 elements, derived from VectorSpace.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
errorManip< error > abort(error &err)
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross-product operators.
const Cmpt & yy() const noexcept
const Cmpt & x() const noexcept
Access to the vector x component.
const Cmpt & zy() const noexcept
const Cmpt & z() const noexcept
Access to the vector z component.
const Cmpt & zz() const noexcept
tmp< GeometricField< Type, faPatchField, areaMesh > > operator &(const faMatrix< Type > &, const DimensionedField< Type, areaMesh > &)
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
const Cmpt & xx() const noexcept
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const Cmpt & xz() const noexcept
static constexpr const zero Zero
Global zero (0)