51 this->v_[XX] = st.
xx(); this->v_[XY] = st.
xy();
52 this->v_[YX] = st.
xy(); this->v_[YY] = st.
yy();
59 this->v_[XX] = st.
ii(); this->v_[XY] =
Zero;
60 this->v_[YX] =
Zero; this->v_[YY] = st.
ii();
71 this->v_[XX] =
x.x(); this->v_[XY] =
x.y();
72 this->v_[YX] =
y.x(); this->v_[YY] =
y.y();
79 const Cmpt txx,
const Cmpt txy,
80 const Cmpt tyx,
const Cmpt tyy
83 this->v_[XX] = txx; this->v_[XY] = txy;
84 this->v_[YX] = tyx; this->v_[YY] = tyy;
174template<Foam::direction Idx>
177 if (Idx == 0)
return cx();
178 else if (Idx == 1)
return cy();
180 static_assert(Idx < 2,
"Invalid column access");
190 case 0:
return cx();
break;
191 case 1:
return cy();
break;
202template<Foam::direction Idx>
205 if (Idx == 0)
return x();
206 else if (Idx == 1)
return y();
208 static_assert(Idx < 2,
"Invalid row access");
218 case 0:
return x();
break;
219 case 1:
return y();
break;
230template<Foam::direction Idx>
235 this->v_[XX] = v.
x();
236 this->v_[YX] = v.
y();
240 this->v_[XY] = v.
x();
241 this->v_[YY] = v.
y();
244 static_assert(Idx < 2,
"Invalid column access");
249template<Foam::direction Idx>
254 this->v_[XX] = v.
x(); this->v_[XY] = v.
y();
258 this->v_[YX] = v.
x(); this->v_[YY] = v.
y();
261 static_assert(Idx < 2,
"Invalid row access");
272 this->v_[XX] =
x.x(); this->v_[XY] =
y.x();
273 this->v_[YX] =
x.y(); this->v_[YY] =
y.y();
284 this->v_[XX] =
x.x(); this->v_[XY] =
x.y();
285 this->v_[YX] =
y.x(); this->v_[YY] =
y.y();
298 case 0: col<0>(v);
break;
299 case 1: col<1>(v);
break;
316 case 0: row<0>(v);
break;
317 case 1: row<1>(v);
break;
335 this->v_[XX] = v.
x(); this->v_[YY] = v.
y();
388 this->v_[XX] = st.
xx(); this->v_[XY] = st.
xy();
389 this->v_[YX] = st.
xy(); this->v_[YY] = st.
yy();
396 this->v_[XX] = st.
ii(); this->v_[XY] =
Zero;
397 this->v_[YX] =
Zero; this->v_[YY] = st.
ii();
412 return t.
xx() + t.
yy();
433 t.
xx(), 0.5*(t.
xy() + t.
yx()),
483 return t.
xx()*t.
yy() - t.
xy()*t.
yx();
504 if (
mag(dett) < SMALL)
507 <<
"Tensor2D is not invertible due to the zero determinant:"
508 <<
"det(Tensor2D) = " <<
mag(dett)
513 return cof(t).
T()/dett;
550 st1.
ii() + t2.
xx(), t2.
xy(),
551 t2.
yx(), st1.
ii() + t2.
yy()
563 t1.
xx() + st2.
ii(), t1.
xy(),
564 t1.
yx(), t1.
yy() + st2.
ii()
576 st1.
xx() + t2.
xx(), st1.
xy() + t2.
xy(),
577 st1.
xy() + t2.
yx(), st1.
yy() + t2.
yy()
589 t1.
xx() + st2.
xx(), t1.
xy() + st2.
xy(),
590 t1.
yx() + st2.
xy(), t1.
yy() + st2.
yy()
602 st1.
ii() - t2.
xx(), -t2.
xy(),
603 -t2.
yx(), st1.
ii() - t2.
yy()
615 t1.
xx() - st2.
ii(), t1.
xy(),
616 t1.
yx(), t1.
yy() - st2.
ii()
628 st1.
xx() - t2.
xx(), st1.
xy() - t2.
xy(),
629 st1.
xy() - t2.
yx(), st1.
yy() - t2.
yy()
641 t1.
xx() - st2.
xx(), t1.
xy() - st2.
xy(),
642 t1.
yx() - st2.
xy(), t1.
yy() - st2.
yy()
656 <<
"Tensor2D = " << t
657 <<
" is not divisible due to a zero value in Cmpt:"
673inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>
::type
718 st1.
xx()*t2.
xx() + st1.
xy()*t2.
yx(),
719 st1.
xx()*t2.
xy() + st1.
xy()*t2.
yy(),
721 st1.
xy()*t2.
xx() + st1.
yy()*t2.
yx(),
734 t1.
xx()*st2.
xx() + t1.
xy()*st2.
xy(),
735 t1.
xx()*st2.
xy() + t1.
xy()*st2.
yy(),
737 t1.
yx()*st2.
xx() + t1.
yy()*st2.
xy(),
746inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>
::type
751 t.
xx()*v.
x() + t.
xy()*v.
y(),
752 t.
yx()*v.
x() + t.
yy()*v.
y()
759inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>
::type
764 v.
x()*t.
xx() + v.
y()*t.
yx(),
765 v.
x()*t.
xy() + v.
y()*t.
yy()
775 return (st1.
ii()*t2.
xx() + st1.
ii()*t2.
yy());
784 return (t1.
xx()*st2.
ii() + t1.
yy()*st2.
ii());
796 + st1.
xy()*t2.
yx() + st1.
yy()*t2.
yy()
809 + t1.
yx()*st2.
xy() + t1.
yy()*st2.
yy()
816inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>
::type
821 v1.
x()*v2.
x(), v1.
x()*v2.
y(),
822 v1.
y()*v2.
x(), v1.
y()*v2.
y()
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A templated (2 x 2) diagonal tensor of objects of <T>, effectively containing 1 element,...
A templated (2 x 2) symmetric tensor of objects of <T>, effectively containing 3 elements,...
A templated (2 x 2) tensor of objects of <T> derived from VectorSpace.
Vector2D< Cmpt > y() const
Extract vector for row 1.
Vector2D< Cmpt > cy() const
Extract vector for column 1.
void cols(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set column values.
Tensor2D()=default
Default construct.
Vector2D< Cmpt > row() const
Extract vector for given row: compile-time check of index.
Tensor2D< Cmpt > schur(const Tensor2D< Cmpt > &t2) const
Schur-product of this with another Tensor2D.
Vector2D< Cmpt > x() const
Extract vector for row 0.
void rows(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set row values.
Tensor2D & operator=(const Tensor2D &)=default
Copy assignment.
Vector2D< Cmpt > cx() const
Extract vector for column 0.
Tensor2D< Cmpt > T() const
Return non-Hermitian transpose.
Vector2D< Cmpt > diag() const
Extract the diagonal as a vector.
Vector2D< Cmpt > col() const
Extract vector for given column: compile-time check of index.
Tensor2D< Cmpt > inner(const Tensor2D< Cmpt > &t2) const
Inner-product of this with another Tensor2D.
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
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)
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 > &)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
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)
dimensioned< typename scalarProduct< Type1, Type2 >::type > operator&&(const dimensioned< Type1 > &, const dimensioned< Type2 > &)
dimensionedTensor skew(const dimensionedTensor &dt)