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]);
353 this->xx()*t.
xx() + this->xy()*t.
yx() + this->xz()*t.
zx(),
354 this->xx()*t.
xy() + this->xy()*t.
yy() + this->xz()*t.
zy(),
355 this->xx()*t.
xz() + this->xy()*t.
yz() + this->xz()*t.
zz(),
357 this->yx()*t.
xx() + this->yy()*t.
yx() + this->yz()*t.
zx(),
358 this->yx()*t.
xy() + this->yy()*t.
yy() + this->yz()*t.
zy(),
359 this->yx()*t.
xz() + this->yy()*t.
yz() + this->yz()*t.
zz(),
361 this->zx()*t.
xx() + this->zy()*t.
yx() + this->zz()*t.
zx(),
362 this->zx()*t.
xy() + this->zy()*t.
yy() + this->zz()*t.
zy(),
363 this->zx()*t.
xz() + this->zy()*t.
yz() + this->zz()*t.
zz()
370 template<
class Cmpt2>
383 this->v_[XX] = st.
ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
384 this->v_[YX] = 0; this->v_[YY] = st.
ii(); this->v_[YZ] = 0;
385 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = st.
ii();
392 this->v_[XX] = dt.
xx(); this->v_[XY] = 0; this->v_[XZ] = 0;
393 this->v_[YX] = 0; this->v_[YY] = dt.
yy(); this->v_[YZ] = 0;
394 this->v_[ZX] = 0; this->v_[ZY] = 0; this->v_[ZZ] = dt.
zz();
401 this->v_[XX] = st.
xx(); this->v_[XY] = st.
xy(); this->v_[XZ] = st.
xz();
402 this->v_[YX] = st.
xy(); this->v_[YY] = st.
yy(); this->v_[YZ] = st.
yz();
403 this->v_[ZX] = st.
xz(); this->v_[ZY] = st.
yz(); this->v_[ZZ] = st.
zz();
410 this->v_[XX] =
tr.x().x();
411 this->v_[XY] =
tr.x().y();
412 this->v_[XZ] =
tr.x().z();
414 this->v_[YX] =
tr.y().x();
415 this->v_[YY] =
tr.y().y();
416 this->v_[YZ] =
tr.y().z();
418 this->v_[ZX] =
tr.z().x();
419 this->v_[ZY] =
tr.z().y();
420 this->v_[ZZ] =
tr.z().z();
451 inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt>>
::type
472 inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt>>
::type
477 t.
xx()*v.
x() + t.
xy()*v.
y() + t.
xz()*v.
z(),
478 t.
yx()*v.
x() + t.
yy()*v.
y() + t.
yz()*v.
z(),
479 t.
zx()*v.
x() + t.
zy()*v.
y() + t.
zz()*v.
z()
485 inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt>>
::type
490 v.
x()*t.
xx() + v.
y()*t.
yx() + v.
z()*t.
zx(),
491 v.
x()*t.
xy() + v.
y()*t.
yy() + v.
z()*t.
zy(),
492 v.
x()*t.
xz() + v.
y()*t.
yz() + v.
z()*t.
zz()
498 inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt>>
::type
503 v1.
x()*v2.
x(), v1.
x()*v2.
y(), v1.
x()*v2.
z(),
504 v1.
y()*v2.
x(), v1.
y()*v2.
y(), v1.
y()*v2.
z(),
505 v1.
z()*v2.
x(), v1.
z()*v2.
y(), v1.
z()*v2.
z()
511 inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt>>
::type
524 return t.
xx() + t.
yy() + t.
zz();
532 return (1.0/3.0)*
tr(t);
542 t.
xx(), 0.5*(t.
xy() + t.
yx()), 0.5*(t.
xz() + t.
zx()),
543 t.
yy(), 0.5*(t.
yz() + t.
zy()),
555 2*t.
xx(), (t.
xy() + t.
yx()), (t.
xz() + t.
zx()),
556 2*t.
yy(), (t.
yz() + t.
zy()),
568 0.0, 0.5*(t.
xy() - t.
yx()), 0.5*(t.
xz() - t.
zx()),
569 0.5*(t.
yx() - t.
xy()), 0.0, 0.5*(t.
yz() - t.
zy()),
570 0.5*(t.
zx() - t.
xz()), 0.5*(t.
zy() - t.
yz()), 0.0
705 st1.
ii() + t2.
xx(), t2.
xy(), t2.
xz(),
706 t2.
yx(), st1.
ii() + t2.
yy(), t2.
yz(),
707 t2.
zx(), t2.
zy(), st1.
ii() + t2.
zz()
718 t1.
xx() + st2.
ii(), t1.
xy(), t1.
xz(),
719 t1.
yx(), t1.
yy() + st2.
ii(), t1.
yz(),
720 t1.
zx(), t1.
zy(), t1.
zz() + st2.
ii()
731 st1.
ii() - t2.
xx(), -t2.
xy(), -t2.
xz(),
732 -t2.
yx(), st1.
ii() - t2.
yy(), -t2.
yz(),
733 -t2.
zx(), -t2.
zy(), st1.
ii() - t2.
zz()
744 t1.
xx() - st2.
ii(), t1.
xy(), t1.
xz(),
745 t1.
yx(), t1.
yy() - st2.
ii(), t1.
yz(),
746 t1.
zx(), t1.
zy(), t1.
zz() - st2.
ii()
784 return(st1.
ii()*t2.
xx() + st1.
ii()*t2.
yy() + st1.
ii()*t2.
zz());
793 return(t1.
xx()*st2.
ii() + t1.
yy()*st2.
ii() + t1.
zz()*st2.
ii());
841 st1.
xx() + t2.
xx(), st1.
xy() + t2.
xy(), st1.
xz() + t2.
xz(),
842 st1.
xy() + t2.
yx(), st1.
yy() + t2.
yy(), st1.
yz() + t2.
yz(),
843 st1.
xz() + t2.
zx(), st1.
yz() + t2.
zy(), st1.
zz() + t2.
zz()
854 t1.
xx() + st2.
xx(), t1.
xy() + st2.
xy(), t1.
xz() + st2.
xz(),
855 t1.
yx() + st2.
xy(), t1.
yy() + st2.
yy(), t1.
yz() + st2.
yz(),
856 t1.
zx() + st2.
xz(), t1.
zy() + st2.
yz(), t1.
zz() + st2.
zz()
867 st1.
xx() - t2.
xx(), st1.
xy() - t2.
xy(), st1.
xz() - t2.
xz(),
868 st1.
xy() - t2.
yx(), st1.
yy() - t2.
yy(), st1.
yz() - t2.
yz(),
869 st1.
xz() - t2.
zx(), st1.
yz() - t2.
zy(), st1.
zz() - t2.
zz()
880 t1.
xx() - st2.
xx(), t1.
xy() - st2.
xy(), t1.
xz() - st2.
xz(),
881 t1.
yx() - st2.
xy(), t1.
yy() - st2.
yy(), t1.
yz() - st2.
yz(),
882 t1.
zx() - st2.
xz(), t1.
zy() - st2.
yz(), t1.
zz() - st2.
zz()
938 st1.
xx()*t2.
xx() + st1.
xy()*t2.
xy() + st1.
xz()*t2.
xz() +
939 st1.
xy()*t2.
yx() + st1.
yy()*t2.
yy() + st1.
yz()*t2.
yz() +
952 t1.
xx()*st2.
xx() + t1.
xy()*st2.
xy() + t1.
xz()*st2.
xz() +
953 t1.
yx()*st2.
xy() + t1.
yy()*st2.
yy() + t1.
yz()*st2.
yz() +
Templated 3D DiagTensor derived from VectorSpace.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component,...
Templated 3D symmetric tensor derived from VectorSpace adding construction from 6 components,...
Templated 3D tensor derived from MatrixSpace adding construction from 9 components,...
Tensor< Cmpt > T() const
Return transpose.
void operator&=(const Tensor< Cmpt > &)
Inner-product with a Tensor.
Tensor< Cmpt > inv() const
Return inverse.
void operator=(const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &)
Assign to an equivalent vector space.
Vector< Cmpt > vectorComponent(const direction) const
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
void skew(pointPatchField< tensor > &, const pointPatchField< tensor > &)
Cmpt invariantI(const SymmTensor< Cmpt > &st)
Return the 1st invariant of a symmetric tensor.
tmp< DimensionedField< Type, GeoMesh, Field > > operator/(const DimensionedField< Type, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &df2)
SphericalTensor< Cmpt > sph(const DiagTensor< Cmpt > &dt)
Return the spherical part of a diagonal tensor.
tmp< DimensionedField< typename typeOfSum< Type1, Type2 >::type, GeoMesh, Field > > operator+(const DimensionedField< Type1, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< Type2, GeoMesh, PrimitiveField2 > &df2)
tmp< DimensionedField< Type, GeoMesh, Field > > operator*(const DimensionedField< Type, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &df2)
void dev2(pointPatchField< tensor > &, const pointPatchField< tensor > &)
Cmpt invariantIII(const SymmTensor< Cmpt > &st)
Return the 3rd invariant of a symmetric tensor.
void tr(pointPatchField< scalar > &, const pointPatchField< tensor > &)
dimensionedSymmTensor cof(const dimensionedSymmTensor &dt)
tmp< DimensionedField< Type, GeoMesh, Field > > operator-(const DimensionedField< Type, GeoMesh, PrimitiveField > &df1)
void inv(pointPatchField< tensor > &, const pointPatchField< tensor > &)
Cmpt tr(const Tensor< Cmpt > &t)
Return the trace of a tensor.
void dev(pointPatchField< tensor > &, const pointPatchField< tensor > &)
tmp< DimensionedField< typename scalarProduct< Type1, Type2 >::type, GeoMesh, Field > > operator&&(const DimensionedField< Type1, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< Type2, GeoMesh, PrimitiveField2 > &df2)
Cmpt invariantII(const SymmTensor< Cmpt > &st)
Return the 2nd invariant of a symmetric tensor.
void symm(pointPatchField< tensor > &, const pointPatchField< tensor > &)
void det(pointPatchField< scalar > &, const pointPatchField< tensor > &)
void twoSymm(pointPatchField< tensor > &, const pointPatchField< tensor > &)
tmp< DimensionedField< typename innerProduct< Type1, Type2 >::type, GeoMesh, Field > > operator&(const DimensionedField< Type1, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< Type2, GeoMesh, PrimitiveField2 > &df2)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.