68 this->v_[XX] = st.
ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
69 this->v_[YX] = 0; this->v_[YY] = st.
ii(); this->v_[YZ] = 0;
70 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = st.
ii();
77 this->v_[XX] = st.
xx(); this->v_[XY] = st.
xy(); this->v_[XZ] = st.
xz();
78 this->v_[YX] = st.
xy(); this->v_[YY] = st.
yy(); this->v_[YZ] = st.
yz();
79 this->v_[ZX] = st.
xz(); this->v_[ZY] = st.
yz(); this->v_[ZZ] = st.
zz();
86 this->v_[XX] = st.
xx(); this->v_[XY] = 0; this->v_[XZ] = 0;
87 this->v_[YX] = 0; this->v_[YY] = st.
yy(); this->v_[YZ] = 0;
88 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = st.
zz();
95 this->v_[XX] =
tr.x().x();
96 this->v_[XY] =
tr.x().y();
97 this->v_[XZ] =
tr.x().z();
99 this->v_[YX] =
tr.y().x();
100 this->v_[YY] =
tr.y().y();
101 this->v_[YZ] =
tr.y().z();
103 this->v_[ZX] =
tr.z().x();
104 this->v_[ZY] =
tr.z().y();
105 this->v_[ZZ] =
tr.z().z();
117 this->v_[XX] = x.
x(); this->v_[XY] = x.
y(); this->v_[XZ] = x.
z();
118 this->v_[YX] = y.
x(); this->v_[YY] = y.
y(); this->v_[YZ] = y.
z();
119 this->v_[ZX] = z.
x(); this->v_[ZY] = z.
y(); this->v_[ZZ] = z.
z();
126 const Cmpt txx,
const Cmpt txy,
const Cmpt txz,
127 const Cmpt tyx,
const Cmpt tyy,
const Cmpt tyz,
128 const Cmpt tzx,
const Cmpt tzy,
const Cmpt tzz
131 this->v_[XX] = txx; this->v_[XY] = txy; this->v_[XZ] = txz;
132 this->v_[YX] = tyx; this->v_[YY] = tyy; this->v_[YZ] = tyz;
133 this->v_[ZX] = tzx; this->v_[ZY] = tzy; this->v_[ZZ] = tzz;
140 template<
class, Foam::direction, Foam::direction>
class Block2,
291 return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
298 return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
305 return Vector<Cmpt>(this->v_[ZX], this->v_[ZY], this->v_[ZZ]);
351 this->xx()*t.
xx() + this->xy()*t.
yx() + this->xz()*t.
zx(),
352 this->xx()*t.
xy() + this->xy()*t.
yy() + this->xz()*t.
zy(),
353 this->xx()*t.
xz() + this->xy()*t.
yz() + this->xz()*t.
zz(),
355 this->yx()*t.
xx() + this->yy()*t.
yx() + this->yz()*t.
zx(),
356 this->yx()*t.
xy() + this->yy()*t.
yy() + this->yz()*t.
zy(),
357 this->yx()*t.
xz() + this->yy()*t.
yz() + this->yz()*t.
zz(),
359 this->zx()*t.
xx() + this->zy()*t.
yx() + this->zz()*t.
zx(),
360 this->zx()*t.
xy() + this->zy()*t.
yy() + this->zz()*t.
zy(),
361 this->zx()*t.
xz() + this->zy()*t.
yz() + this->zz()*t.
zz()
368 template<
class Cmpt2>
369 inline void Foam::Tensor<Cmpt>::operator=
381 this->v_[XX] = st.
ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
382 this->v_[YX] = 0; this->v_[YY] = st.
ii(); this->v_[YZ] = 0;
383 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = st.
ii();
390 this->v_[XX] = dt.
xx(); this->v_[XY] = 0; this->v_[XZ] = 0;
391 this->v_[YX] = 0; this->v_[YY] = dt.
yy(); this->v_[YZ] = 0;
392 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = dt.
zz();
399 this->v_[XX] = st.
xx(); this->v_[XY] = st.
xy(); this->v_[XZ] = st.
xz();
400 this->v_[YX] = st.
xy(); this->v_[YY] = st.
yy(); this->v_[YZ] = st.
yz();
401 this->v_[ZX] = st.
xz(); this->v_[ZY] = st.
yz(); this->v_[ZZ] = st.
zz();
408 this->v_[XX] =
tr.x().x();
409 this->v_[XY] =
tr.x().y();
410 this->v_[XZ] =
tr.x().z();
412 this->v_[YX] =
tr.y().x();
413 this->v_[YY] =
tr.y().y();
414 this->v_[YZ] =
tr.y().z();
416 this->v_[ZX] =
tr.z().x();
417 this->v_[ZY] =
tr.z().y();
418 this->v_[ZZ] =
tr.z().z();
475 t.
xx()*v.
x() + t.
xy()*v.
y() + t.
xz()*v.
z(),
476 t.
yx()*v.
x() + t.
yy()*v.
y() + t.
yz()*v.
z(),
477 t.
zx()*v.
x() + t.
zy()*v.
y() + t.
zz()*v.
z()
488 v.
x()*t.
xx() + v.
y()*t.
yx() + v.
z()*t.
zx(),
489 v.
x()*t.
xy() + v.
y()*t.
yy() + v.
z()*t.
zy(),
490 v.
x()*t.
xz() + v.
y()*t.
yz() + v.
z()*t.
zz()
501 v1.
x()*v2.
x(), v1.
x()*v2.
y(), v1.
x()*v2.
z(),
502 v1.
y()*v2.
x(), v1.
y()*v2.
y(), v1.
y()*v2.
z(),
503 v1.
z()*v2.
x(), v1.
z()*v2.
y(), v1.
z()*v2.
z()
522 return t.
xx() + t.
yy() + t.
zz();
530 return (1.0/3.0)*
tr(t);
540 t.
xx(), 0.5*(t.
xy() + t.
yx()), 0.5*(t.
xz() + t.
zx()),
541 t.
yy(), 0.5*(t.
yz() + t.
zy()),
553 2*t.
xx(), (t.
xy() + t.
yx()), (t.
xz() + t.
zx()),
554 2*t.
yy(), (t.
yz() + t.
zy()),
566 0.0, 0.5*(t.
xy() - t.
yx()), 0.5*(t.
xz() - t.
zx()),
567 0.5*(t.
yx() - t.
xy()), 0.0, 0.5*(t.
yz() - t.
zy()),
568 0.5*(t.
zx() - t.
xz()), 0.5*(t.
zy() - t.
yz()), 0.0
703 st1.
ii() + t2.
xx(), t2.
xy(), t2.
xz(),
704 t2.
yx(), st1.
ii() + t2.
yy(), t2.
yz(),
705 t2.
zx(), t2.
zy(), st1.
ii() + t2.
zz()
716 t1.
xx() + st2.
ii(), t1.
xy(), t1.
xz(),
717 t1.
yx(), t1.
yy() + st2.
ii(), t1.
yz(),
718 t1.
zx(), t1.
zy(), t1.
zz() + st2.
ii()
729 st1.
ii() - t2.
xx(), -t2.
xy(), -t2.
xz(),
730 -t2.
yx(), st1.
ii() - t2.
yy(), -t2.
yz(),
731 -t2.
zx(), -t2.
zy(), st1.
ii() - t2.
zz()
742 t1.
xx() - st2.
ii(), t1.
xy(), t1.
xz(),
743 t1.
yx(), t1.
yy() - st2.
ii(), t1.
yz(),
744 t1.
zx(), t1.
zy(), t1.
zz() - st2.
ii()
782 return(st1.
ii()*t2.
xx() + st1.
ii()*t2.
yy() + st1.
ii()*t2.
zz());
791 return(t1.
xx()*st2.
ii() + t1.
yy()*st2.
ii() + t1.
zz()*st2.
ii());
839 st1.
xx() + t2.
xx(), st1.
xy() + t2.
xy(), st1.
xz() + t2.
xz(),
840 st1.
xy() + t2.
yx(), st1.
yy() + t2.
yy(), st1.
yz() + t2.
yz(),
841 st1.
xz() + t2.
zx(), st1.
yz() + t2.
zy(), st1.
zz() + t2.
zz()
852 t1.
xx() + st2.
xx(), t1.
xy() + st2.
xy(), t1.
xz() + st2.
xz(),
853 t1.
yx() + st2.
xy(), t1.
yy() + st2.
yy(), t1.
yz() + st2.
yz(),
854 t1.
zx() + st2.
xz(), t1.
zy() + st2.
yz(), t1.
zz() + st2.
zz()
865 st1.
xx() - t2.
xx(), st1.
xy() - t2.
xy(), st1.
xz() - t2.
xz(),
866 st1.
xy() - t2.
yx(), st1.
yy() - t2.
yy(), st1.
yz() - t2.
yz(),
867 st1.
xz() - t2.
zx(), st1.
yz() - t2.
zy(), st1.
zz() - t2.
zz()
878 t1.
xx() - st2.
xx(), t1.
xy() - st2.
xy(), t1.
xz() - st2.
xz(),
879 t1.
yx() - st2.
xy(), t1.
yy() - st2.
yy(), t1.
yz() - st2.
yz(),
880 t1.
zx() - st2.
xz(), t1.
zy() - st2.
yz(), t1.
zz() - st2.
zz()
936 st1.
xx()*t2.
xx() + st1.
xy()*t2.
xy() + st1.
xz()*t2.
xz() +
937 st1.
xy()*t2.
yx() + st1.
yy()*t2.
yy() + st1.
yz()*t2.
yz() +
950 t1.
xx()*st2.
xx() + t1.
xy()*st2.
xy() + t1.
xz()*st2.
xz() +
951 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.
Templated 3D DiagTensor derived from VectorSpace.
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.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
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.