107 template<
class Cmpt2>
111 template<
class Cmpt2>
125 const bool transposed =
false
135 const bool transposed =
false
141 const Cmpt txx,
const Cmpt txy,
const Cmpt txz,
142 const Cmpt tyx,
const Cmpt tyy,
const Cmpt tyz,
143 const Cmpt tzx,
const Cmpt tzy,
const Cmpt tzz
149 template<
class, direction, direction>
class Block2,
199 template<direction Idx>
206 template<direction Idx>
233 template<direction Idx>
240 template<direction Idx>
276 inline bool is_identity(
const scalar tol = ROOTVSMALL)
const;
324 template<
class Cmpt2>
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
ConstBlock< SubTensor, BRowStart, BColStart > block() const
Return a const sub-block corresponding to the specified type.
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,...
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
void diag(const Vector< Cmpt > &v)
Set values of the diagonal.
scalar diagSqr() const
The L2-norm squared of the diagonal.
void row(const Vector< Cmpt > &v)
Set values of given row: compile-time check of index.
bool is_identity(const scalar tol=ROOTVSMALL) const
Is identity tensor?
Tensor< Cmpt > T() const
Return non-Hermitian transpose.
void col(const Vector< Cmpt > &v)
Set values of given column: compile-time check of index.
const Cmpt & yy() const noexcept
Tensor(const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt tyx, const Cmpt tyy, const Cmpt tyz, const Cmpt tzx, const Cmpt tzy, const Cmpt tzz)
Construct given the nine components.
Tensor< Cmpt > safeInv() const
Return inverse, with (ad hoc) failsafe handling of 2D tensors.
void addDiag(const Vector< Cmpt > &v)
Add to the diagonal.
Tensor< Cmpt > inv2D(const direction excludeCmpt) const
Return inverse of 2D tensor (by excluding given direction).
void rows(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set row values.
components
Component labeling enumeration.
void operator=(const Vector< Vector< Cmpt > > &)
Assign to a triad of row vectors.
Tensor< label > labelType
void operator&=(const Tensor< Cmpt > &t)
Assign inner-product of this with another Tensor.
Tensor & operator=(const Tensor &)=default
Copy assignment.
Tensor< Cmpt > adjunct() const
Return adjunct matrix (transpose of cofactor matrix).
Tensor(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z, const bool transposed=false)
Construct given the three row vectors, optionally treated as transposed (ie, column vectors).
Tensor(const Block2< Tensor< Cmpt >, BRowStart, BColStart > &block)
Construct from a block of another matrix space.
Cmpt det2D(const direction excludeCmpt) const
The 2D determinant by excluding given direction.
void operator=(const SymmTensor< Cmpt > &)
Assign to a SymmTensor.
void row(const direction r, const Vector< Cmpt > &v)
Set values of given row (0,1,2): runtime check of row.
Vector< Cmpt > row() const
Extract vector for given row: compile-time check of index.
void subtractDiag(const Vector< Cmpt > &v)
Subtract from the diagonal.
Vector< scalar > z() const
Tensor(Istream &is)
Construct from Istream.
Vector< Cmpt > cz() const
Extract vector for column 2.
static constexpr direction rank
Tensor(const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &vs)
Construct given VectorSpace of the same rank.
const Cmpt & zy() const noexcept
const Cmpt & yx() const noexcept
void col(const direction c, const Vector< Cmpt > &v)
Set values of given column (0,1,2): runtime check of index.
Tensor(const Tensor &)=default
Copy construct.
Tensor< Cmpt > adjunct2D(const direction excludeCmpt) const
Return 2D adjunct matrix by excluding given direction.
Tensor< Cmpt > inner(const Tensor< Cmpt > &t2) const
Inner-product of this with another Tensor.
void operator=(const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &)
Assign to an equivalent vector space.
Cmpt det() const
The determinate.
Tensor< Cmpt > inv() const
Return inverse.
Vector< Cmpt > cx() const
Extract vector for column 0.
Vector< Cmpt > row(const direction r) const
Extract vector for given row (0,1,2): runtime check of index.
Vector< Cmpt > cy() const
Extract vector for column 1.
void cols(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set column values.
Vector< scalar > y() const
const Cmpt & xx() const noexcept
Tensor(const SphericalTensor< Cmpt > &st)
Construct given SphericalTensor.
Tensor< Cmpt > cof() const
Return cofactor matrix (transpose of adjunct matrix).
Tensor(const SymmTensor< Cmpt > &st)
Construct given SymmTensor.
Vector< Cmpt > col() const
Extract vector for given column: compile-time check of index.
Tensor(const MatrixSpace< Tensor< Cmpt2 >, Cmpt2, 3, 3 > &vs)
Construct given MatrixSpace of the same rank.
const Cmpt & yz() const noexcept
Vector< scalar > vectorComponent(const direction cmpt) const
Tensor()=default
Default construct.
Tensor< Cmpt > schur(const Tensor< Cmpt > &t2) const
Schur-product of this with another Tensor.
Tensor(const Vector< Vector< Cmpt > > &vecs, const bool transposed=false)
Construct given triad of row vectors, optionally treated as transposed (ie, column vectors).
void operator=(const SphericalTensor< Cmpt > &)
Assign to a SphericalTensor.
Vector< Cmpt > diag() const
Extract the diagonal as a vector.
const Cmpt & zz() const noexcept
Vector< Cmpt > col(const direction c) const
Extract vector for given column (0,1,2): runtime check of index.
Tensor(Foam::zero)
Construct initialized to zero.
const Cmpt & xy() const noexcept
const Cmpt & xz() const noexcept
const Cmpt & zx() const noexcept
Vector< scalar > x() const
friend Ostream & operator(Ostream &, const VectorSpace< Form, Cmpt, Ncmpts > &)
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Tensor< solveScalar > type
The extended precision type (solveScalar for float).
Abstract template class to provide the transpose form of a form.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FOAM_DEPRECATED_FOR(since, replacement)
A template class to specify if a data type is composed solely of Foam::label elements.
A template class to specify if a data type is composed solely of Foam::scalar elements.
A template class to specify that a data type can be considered as being contiguous in memory.