54 this->v_[XX] = st.
ii(); this->v_[XY] =
Zero; this->v_[XZ] =
Zero;
55 this->v_[YY] = st.
ii(); this->v_[YZ] =
Zero;
56 this->v_[ZZ] = st.
ii();
76 const Cmpt txx,
const Cmpt txy,
const Cmpt txz,
77 const Cmpt tyy,
const Cmpt tyz,
81 this->v_[XX] = txx; this->v_[XY] = txy; this->v_[XZ] = txz;
82 this->v_[YY] = tyy; this->v_[YZ] = tyz;
209 return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
216 return Vector<Cmpt>(this->v_[XY], this->v_[YY], this->v_[YZ]);
223 return Vector<Cmpt>(this->v_[XZ], this->v_[YZ], this->v_[ZZ]);
228template<Foam::direction Idx>
231 if (Idx == 0)
return x();
232 else if (Idx == 1)
return y();
233 else if (Idx == 2)
return z();
235 static_assert(Idx < 3,
"Invalid row access");
245 case 0:
return x();
break;
246 case 1:
return y();
break;
247 case 2:
return z();
break;
258template<Foam::direction Idx>
263 this->v_[XX] = v.
x(); this->v_[XY] = v.
y(); this->v_[XZ] = v.
z();
267 this->v_[XY] = v.
x(); this->v_[YY] = v.
y(); this->v_[YZ] = v.
z();
271 this->v_[XZ] = v.
x(); this->v_[YZ] = v.
y(); this->v_[ZZ] = v.
z();
274 static_assert(Idx < 3,
"Invalid row access");
286 this->v_[XX] =
x.x(); this->v_[XY] =
x.y(); this->v_[XZ] =
x.z();
287 this->v_[YY] =
y.y(); this->v_[YZ] =
y.z();
288 this->v_[ZZ] = z.
z();
301 case 0: row<0>(v);
break;
302 case 1: row<1>(v);
break;
303 case 2: row<2>(v);
break;
314 return Vector<Cmpt>(this->v_[XX], this->v_[YY], this->v_[ZZ]);
321 this->v_[XX] = v.
x(); this->v_[YY] = v.
y(); this->v_[ZZ] = v.
z();
337 this->v_[XX] = st.
ii(); this->v_[XY] =
Zero; this->v_[XZ] =
Zero;
338 this->v_[YY] = st.
ii(); this->v_[YZ] =
Zero;
339 this->v_[ZZ] = st.
ii();
354 return st.
xx() + st.
yy() + st.
zz();
397 return st - 2*
sph(st);
437 if (
mag(detst) < VSMALL)
440 <<
"SymmTensor is not invertible due to the zero determinant:"
441 <<
"det(symmTensor) = " <<
mag(detst)
446 return cof(st).
T()/detst;
488inline SymmTensor<Cmpt>
524 v.
x()*v.
x(), v.
x()*v.
y(), v.
x()*v.
z(),
525 v.
y()*v.
y(), v.
y()*v.
z(),
535inline SymmTensor<Cmpt>
540 spt1.
ii() + st2.
xx(), st2.
xy(), st2.
xz(),
541 spt1.
ii() + st2.
yy(), st2.
yz(),
549inline SymmTensor<Cmpt>
554 st1.
xx() + spt2.
ii(), st1.
xy(), st1.
xz(),
555 st1.
yy() + spt2.
ii(), st1.
yz(),
563inline SymmTensor<Cmpt>
568 spt1.
ii() - st2.
xx(), -st2.
xy(), -st2.
xz(),
569 spt1.
ii() - st2.
yy(), -st2.
yz(),
577inline SymmTensor<Cmpt>
582 st1.
xx() - spt2.
ii(), st1.
xy(), st1.
xz(),
583 st1.
yy() - spt2.
ii(), st1.
yz(),
599inline SymmTensor<Cmpt>
618 st1.
xx()*st2.
xx() + st1.
xy()*st2.
xy() + st1.
xz()*st2.
xz(),
619 st1.
xx()*st2.
xy() + st1.
xy()*st2.
yy() + st1.
xz()*st2.
yz(),
620 st1.
xx()*st2.
xz() + st1.
xy()*st2.
yz() + st1.
xz()*st2.
zz(),
622 st1.
xy()*st2.
xx() + st1.
yy()*st2.
xy() + st1.
yz()*st2.
xz(),
623 st1.
xy()*st2.
xy() + st1.
yy()*st2.
yy() + st1.
yz()*st2.
yz(),
624 st1.
xy()*st2.
xz() + st1.
yy()*st2.
yz() + st1.
yz()*st2.
zz(),
626 st1.
xz()*st2.
xx() + st1.
yz()*st2.
xy() + st1.
zz()*st2.
xz(),
627 st1.
xz()*st2.
xy() + st1.
yz()*st2.
yy() + st1.
zz()*st2.
yz(),
628 st1.
xz()*st2.
xz() + st1.
yz()*st2.
yz() + st1.
zz()*st2.
zz()
635inline SymmTensor<Cmpt>
640 spt1.
ii()*st2.
xx(), spt1.
ii()*st2.
xy(), spt1.
ii()*st2.
xz(),
641 spt1.
ii()*st2.
yy(), spt1.
ii()*st2.
yz(),
649inline SymmTensor<Cmpt>
654 st1.
xx()*spt2.
ii(), st1.
xy()*spt2.
ii(), st1.
xz()*spt2.
ii(),
655 st1.
yy()*spt2.
ii(), st1.
yz()*spt2.
ii(),
668 st.
xx()*v.
x() + st.
xy()*v.
y() + st.
xz()*v.
z(),
669 st.
xy()*v.
x() + st.
yy()*v.
y() + st.
yz()*v.
z(),
670 st.
xz()*v.
x() + st.
yz()*v.
y() + st.
zz()*v.
z()
682 v.
x()*st.
xx() + v.
y()*st.
xy() + v.
z()*st.
xz(),
683 v.
x()*st.
xy() + v.
y()*st.
yy() + v.
z()*st.
yz(),
684 v.
x()*st.
xz() + v.
y()*st.
yz() + v.
z()*st.
zz()
696 st1.
xx()*st2.
xx() + 2*st1.
xy()*st2.
xy() + 2*st1.
xz()*st2.
xz()
697 + st1.
yy()*st2.
yy() + 2*st1.
yz()*st2.
yz()
708 return (spt1.
ii()*st2.
xx() + spt1.
ii()*st2.
yy() + spt1.
ii()*st2.
zz());
717 return (st1.
xx()*spt2.
ii() + st1.
yy()*spt2.
ii() + st1.
zz()*spt2.
ii());
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 1 element,...
A templated (3 x 3) symmetric tensor of objects of <T>, effectively containing 6 elements,...
void rows(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set row values.
Vector< Cmpt > row() const
Extract vector for given row: compile-time check of index.
Vector< Cmpt > z() const
Extract vector for row 2.
Vector< Cmpt > y() const
Extract vector for row 1.
Vector< Cmpt > diag() const
Extract the diagonal as a vector.
SymmTensor & operator=(const SymmTensor &)=default
Copy assignment.
SymmTensor()=default
Default construct.
Vector< Cmpt > x() const
Extract vector for row 0.
const SymmTensor< Cmpt > & T() const
Return non-Hermitian transpose.
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
const Cmpt & z() const
Access to the vector z component.
const Cmpt & y() const
Access to the vector y component.
const Cmpt & x() const
Access to the vector x component.
dimensioned< Type > T() const
Return transpose.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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))
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensionedScalar det(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
Cmpt invariantII(const SymmTensor< Cmpt > &st)
Return the 2nd invariant of a SymmTensor.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
Cmpt invariantIII(const SymmTensor< Cmpt > &st)
Return the 3rd invariant of a SymmTensor.
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
dimensionedSymmTensor cof(const dimensionedSymmTensor &dt)
Cmpt invariantI(const SymmTensor< Cmpt > &st)
Return the 1st invariant of a SymmTensor.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
SphericalTensor< Cmpt > sph(const DiagTensor< Cmpt > &dt)
Return the spherical part of a DiagTensor as a SphericalTensor.
static constexpr const zero Zero
Global zero (0)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor innerSqr(const dimensionedSymmTensor &dt)
dimensioned< typename scalarProduct< Type1, Type2 >::type > operator&&(const dimensioned< Type1 > &, const dimensioned< Type2 > &)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)