67 this->v_[XX] = st.
ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
68 this->v_[YX] = 0; this->v_[YY] = st.
ii(); this->v_[YZ] = 0;
69 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = st.
ii();
76 this->v_[XX] = st.
xx(); this->v_[XY] = st.
xy(); this->v_[XZ] = st.
xz();
77 this->v_[YX] = st.
xy(); this->v_[YY] = st.
yy(); this->v_[YZ] = st.
yz();
78 this->v_[ZX] = st.
xz(); this->v_[ZY] = st.
yz(); this->v_[ZZ] = st.
zz();
85 this->v_[XX] =
tr.x().x();
86 this->v_[XY] =
tr.x().y();
87 this->v_[XZ] =
tr.x().z();
89 this->v_[YX] =
tr.y().x();
90 this->v_[YY] =
tr.y().y();
91 this->v_[YZ] =
tr.y().z();
93 this->v_[ZX] =
tr.z().x();
94 this->v_[ZY] =
tr.z().y();
95 this->v_[ZZ] =
tr.z().z();
107 this->v_[XX] = x.
x(); this->v_[XY] = x.
y(); this->v_[XZ] = x.
z();
108 this->v_[YX] = y.
x(); this->v_[YY] = y.
y(); this->v_[YZ] = y.
z();
109 this->v_[ZX] = z.
x(); this->v_[ZY] = z.
y(); this->v_[ZZ] = z.
z();
116 const Cmpt txx,
const Cmpt txy,
const Cmpt txz,
117 const Cmpt tyx,
const Cmpt tyy,
const Cmpt tyz,
118 const Cmpt tzx,
const Cmpt tzy,
const Cmpt tzz
121 this->v_[XX] = txx; this->v_[XY] = txy; this->v_[XZ] = txz;
122 this->v_[YX] = tyx; this->v_[YY] = tyy; this->v_[YZ] = tyz;
123 this->v_[ZX] = tzx; this->v_[ZY] = tzy; this->v_[ZZ] = tzz;
130 template<
class, Foam::direction, Foam::direction>
class Block2,
281 return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
288 return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
295 return Vector<Cmpt>(this->v_[ZX], this->v_[ZY], this->v_[ZZ]);
341 this->xx()*t.
xx() + this->xy()*t.
yx() + this->xz()*t.
zx(),
342 this->xx()*t.
xy() + this->xy()*t.
yy() + this->xz()*t.
zy(),
343 this->xx()*t.
xz() + this->xy()*t.
yz() + this->xz()*t.
zz(),
345 this->yx()*t.
xx() + this->yy()*t.
yx() + this->yz()*t.
zx(),
346 this->yx()*t.
xy() + this->yy()*t.
yy() + this->yz()*t.
zy(),
347 this->yx()*t.
xz() + this->yy()*t.
yz() + this->yz()*t.
zz(),
349 this->zx()*t.
xx() + this->zy()*t.
yx() + this->zz()*t.
zx(),
350 this->zx()*t.
xy() + this->zy()*t.
yy() + this->zz()*t.
zy(),
351 this->zx()*t.
xz() + this->zy()*t.
yz() + this->zz()*t.
zz()
358 template<
class Cmpt2>
359 inline void Foam::Tensor<Cmpt>::operator=
371 this->v_[XX] = st.
ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
372 this->v_[YX] = 0; this->v_[YY] = st.
ii(); this->v_[YZ] = 0;
373 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = st.
ii();
380 this->v_[XX] = st.
xx(); this->v_[XY] = st.
xy(); this->v_[XZ] = st.
xz();
381 this->v_[YX] = st.
xy(); this->v_[YY] = st.
yy(); this->v_[YZ] = st.
yz();
382 this->v_[ZX] = st.
xz(); this->v_[ZY] = st.
yz(); this->v_[ZZ] = st.
zz();
389 this->v_[XX] =
tr.x().x();
390 this->v_[XY] =
tr.x().y();
391 this->v_[XZ] =
tr.x().z();
393 this->v_[YX] =
tr.y().x();
394 this->v_[YY] =
tr.y().y();
395 this->v_[YZ] =
tr.y().z();
397 this->v_[ZX] =
tr.z().x();
398 this->v_[ZY] =
tr.z().y();
399 this->v_[ZZ] =
tr.z().z();
456 t.
xx()*v.
x() + t.
xy()*v.
y() + t.
xz()*v.
z(),
457 t.
yx()*v.
x() + t.
yy()*v.
y() + t.
yz()*v.
z(),
458 t.
zx()*v.
x() + t.
zy()*v.
y() + t.
zz()*v.
z()
469 v.
x()*t.
xx() + v.
y()*t.
yx() + v.
z()*t.
zx(),
470 v.
x()*t.
xy() + v.
y()*t.
yy() + v.
z()*t.
zy(),
471 v.
x()*t.
xz() + v.
y()*t.
yz() + v.
z()*t.
zz()
482 v1.
x()*v2.
x(), v1.
x()*v2.
y(), v1.
x()*v2.
z(),
483 v1.
y()*v2.
x(), v1.
y()*v2.
y(), v1.
y()*v2.
z(),
484 v1.
z()*v2.
x(), v1.
z()*v2.
y(), v1.
z()*v2.
z()
503 return t.
xx() + t.
yy() + t.
zz();
511 return (1.0/3.0)*
tr(t);
521 t.
xx(), 0.5*(t.
xy() + t.
yx()), 0.5*(t.
xz() + t.
zx()),
522 t.
yy(), 0.5*(t.
yz() + t.
zy()),
534 2*t.
xx(), (t.
xy() + t.
yx()), (t.
xz() + t.
zx()),
535 2*t.
yy(), (t.
yz() + t.
zy()),
547 0.0, 0.5*(t.
xy() - t.
yx()), 0.5*(t.
xz() - t.
zx()),
548 0.5*(t.
yx() - t.
xy()), 0.0, 0.5*(t.
yz() - t.
zy()),
549 0.5*(t.
zx() - t.
xz()), 0.5*(t.
zy() - t.
yz()), 0.0
684 st1.
ii() + t2.
xx(), t2.
xy(), t2.
xz(),
685 t2.
yx(), st1.
ii() + t2.
yy(), t2.
yz(),
686 t2.
zx(), t2.
zy(), st1.
ii() + t2.
zz()
697 t1.
xx() + st2.
ii(), t1.
xy(), t1.
xz(),
698 t1.
yx(), t1.
yy() + st2.
ii(), t1.
yz(),
699 t1.
zx(), t1.
zy(), t1.
zz() + st2.
ii()
710 st1.
ii() - t2.
xx(), -t2.
xy(), -t2.
xz(),
711 -t2.
yx(), st1.
ii() - t2.
yy(), -t2.
yz(),
712 -t2.
zx(), -t2.
zy(), st1.
ii() - t2.
zz()
723 t1.
xx() - st2.
ii(), t1.
xy(), t1.
xz(),
724 t1.
yx(), t1.
yy() - st2.
ii(), t1.
yz(),
725 t1.
zx(), t1.
zy(), t1.
zz() - st2.
ii()
763 return(st1.
ii()*t2.
xx() + st1.
ii()*t2.
yy() + st1.
ii()*t2.
zz());
772 return(t1.
xx()*st2.
ii() + t1.
yy()*st2.
ii() + t1.
zz()*st2.
ii());
820 st1.
xx() + t2.
xx(), st1.
xy() + t2.
xy(), st1.
xz() + t2.
xz(),
821 st1.
xy() + t2.
yx(), st1.
yy() + t2.
yy(), st1.
yz() + t2.
yz(),
822 st1.
xz() + t2.
zx(), st1.
yz() + t2.
zy(), st1.
zz() + t2.
zz()
833 t1.
xx() + st2.
xx(), t1.
xy() + st2.
xy(), t1.
xz() + st2.
xz(),
834 t1.
yx() + st2.
xy(), t1.
yy() + st2.
yy(), t1.
yz() + st2.
yz(),
835 t1.
zx() + st2.
xz(), t1.
zy() + st2.
yz(), t1.
zz() + st2.
zz()
846 st1.
xx() - t2.
xx(), st1.
xy() - t2.
xy(), st1.
xz() - t2.
xz(),
847 st1.
xy() - t2.
yx(), st1.
yy() - t2.
yy(), st1.
yz() - t2.
yz(),
848 st1.
xz() - t2.
zx(), st1.
yz() - t2.
zy(), st1.
zz() - t2.
zz()
859 t1.
xx() - st2.
xx(), t1.
xy() - st2.
xy(), t1.
xz() - st2.
xz(),
860 t1.
yx() - st2.
xy(), t1.
yy() - st2.
yy(), t1.
yz() - st2.
yz(),
861 t1.
zx() - st2.
xz(), t1.
zy() - st2.
yz(), t1.
zz() - st2.
zz()
917 st1.
xx()*t2.
xx() + st1.
xy()*t2.
xy() + st1.
xz()*t2.
xz() +
918 st1.
xy()*t2.
yx() + st1.
yy()*t2.
yy() + st1.
yz()*t2.
yz() +
931 t1.
xx()*st2.
xx() + t1.
xy()*st2.
xy() + t1.
xz()*st2.
xz() +
932 t1.
yx()*st2.
xy() + t1.
yy()*st2.
yy() + t1.
yz()*st2.
yz() +
innerProduct< Vector< Cmpt >, Tensor< Cmpt > >::type operator/(const Vector< Cmpt > &v, const Tensor< Cmpt > &t)
Cmpt tr(const Tensor< Cmpt > &t)
Return the trace of a tensor.
Templated 3D symmetric tensor derived from VectorSpace adding construction from 6 components...
Cmpt invariantIII(const Tensor< Cmpt > &t)
Return the 3rd invariant of a tensor.
void operator &=(const Tensor< Cmpt > &)
Inner-product with a Tensor.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Tensor< Cmpt > T() const
Return transpose.
Tensor< Cmpt > operator &(const Tensor< Cmpt > &t1, const SymmTensor< Cmpt > &st2)
Inner-product between a tensor and a symmetric tensor.
Tensor< Cmpt > dev(const Tensor< Cmpt > &t)
Return the deviatoric part of a tensor.
SphericalTensor< Cmpt > sph(const Tensor< Cmpt > &t)
Return the spherical part of a tensor.
Cmpt det(const Tensor< Cmpt > &t)
Return the determinant of a tensor.
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component, element access using th ii() member function and the inner-product (dot-product) and outer-product operators.
SymmTensor< Cmpt > symm(const Tensor< Cmpt > &t)
Return the symmetric part of a tensor.
void operator=(const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &)
Assign to an equivalent vector space.
SymmTensor< Cmpt > twoSymm(const Tensor< Cmpt > &t)
Return twice the symmetric part of a tensor.
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
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.
Cmpt operator &&(const Tensor< Cmpt > &t1, const SymmTensor< Cmpt > &st2)
Double-dot-product between a tensor and a symmetric tensor.
Tensor< Cmpt > cof(const Tensor< Cmpt > &t)
Return the cofactor tensor of a tensor.
outerProduct< Vector< Cmpt >, Vector< Cmpt > >::type operator*(const Vector< Cmpt > &v1, const Vector< Cmpt > &v2)
Cmpt invariantII(const Tensor< Cmpt > &t)
Return the 2nd invariant of a tensor.
Tensor< Cmpt > operator+(const Tensor< Cmpt > &t1, const SymmTensor< Cmpt > &st2)
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Vector< Cmpt > vectorComponent(const direction) const
Tensor< Cmpt > inv(const Tensor< Cmpt > &t)
Return the inverse of a tensor.
Templated 3D tensor derived from MatrixSpace adding construction from 9 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators.
const Tensor< Cmpt > & skew(const SymmTensor< Cmpt > &st)
Return the skew-symmetric part of a symmetric tensor.
Tensor< Cmpt > operator-(const Tensor< Cmpt > &t1, const SymmTensor< Cmpt > &st2)
Tensor< Cmpt > dev2(const Tensor< Cmpt > &t)
Return the deviatoric part of a tensor.
Cmpt invariantI(const Tensor< Cmpt > &t)
Return the 1st invariant of a tensor.