55 template<
class Cmpt>
class SymmTensor;
64 public MatrixSpace<Tensor<Cmpt>, Cmpt, 3, 3>
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,
190 inline Vector<Cmpt>
cx()
const;
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;
285 inline Cmpt
det()
const;
324 template<
class Cmpt2>
352 struct is_contiguous<Tensor<Cmpt>> : is_contiguous<Cmpt> {};
356 struct is_contiguous_label<Tensor<Cmpt>> : is_contiguous_label<Cmpt> {};
360 struct is_contiguous_scalar<Tensor<Cmpt>> : is_contiguous_scalar<Cmpt> {};
364 class typeOfRank<Cmpt, 2>
368 typedef Tensor<Cmpt>
type;
373 class typeOfTranspose<Cmpt, Tensor<Cmpt>>
377 typedef Tensor<Cmpt>
type;
382 class typeOfSolve<Tensor<Cmpt>>
386 typedef Tensor<solveScalar>
type;
Tensor< Cmpt > adjunct2D(const direction excludeCmpt) const
Return 2D adjunct matrix by excluding given direction.
Vector< Cmpt > cx() const
Extract vector for column 0.
A templated (3 x 3) symmetric tensor of objects of <T>, effectively containing 6 elements, derived from VectorSpace.
const Cmpt & yx() const noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Vector< Cmpt > cz() const
Extract vector for column 2.
Tensor< Cmpt > T() const
Return non-Hermitian transpose.
Vector< Cmpt > x() const
Extract vector for row 0.
void subtractDiag(const Vector< Cmpt > &v)
Subtract from the diagonal.
Cmpt det() const
The determinate.
const Cmpt & xy() const noexcept
Vector< Cmpt > y() const
Extract vector for row 1.
components
Component labeling enumeration.
Tensor()=default
Default construct.
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 1 element, derived from VectorSpace.
Tensor< Cmpt > inv2D(const direction excludeCmpt) const
Return inverse of 2D tensor (by excluding given direction)
Vector< Cmpt > z() const
Extract vector for row 2.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const Cmpt & yz() const noexcept
const Cmpt & xx() const noexcept
const Cmpt & yy() const noexcept
void cols(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set column values.
Vector< Cmpt > col() const
Extract vector for given column: compile-time check of index.
bool is_identity(const scalar tol=ROOTVSMALL) const
Is identity tensor?
const Cmpt & zx() const noexcept
void rows(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set row values.
void addDiag(const Vector< Cmpt > &v)
Add to the diagonal.
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.
Tensor< Cmpt > adjunct() const
Return adjunct matrix (transpose of cofactor matrix)
Tensor< label > labelType
Equivalent type of labels used for valid component indexing.
Tensor< Cmpt > inv() const
Return inverse.
friend Ostream & operator(Ostream &, const VectorSpace< Form, Cmpt, Ncmpts > &)
const Cmpt & zy() const noexcept
Tensor< Cmpt > schur(const Tensor< Cmpt > &t2) const
Schur-product of this with another Tensor.
Vector< Cmpt > vectorComponent(const direction cmpt) const
Deprecated(2018-12) Return vector for given row (0,1)
Tensor< Cmpt > safeInv() const
Return inverse, with (ad hoc) failsafe handling of 2D tensors.
Tensor & operator=(const Tensor &)=default
Copy assignment.
Vector< Cmpt > diag() const
Extract the diagonal as a vector.
const Cmpt & zz() const noexcept
const dimensionedScalar c
Speed of light in a vacuum.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
void operator &=(const Tensor< Cmpt > &t)
Assign inner-product of this with another Tensor.
Tensor< Cmpt > cof() const
Return cofactor matrix (transpose of adjunct matrix)
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
static constexpr direction rank
Rank of Tensor is 2.
Cmpt det2D(const direction excludeCmpt) const
The 2D determinant by excluding given direction.
const Cmpt & xz() const noexcept
Tensor< Cmpt > inner(const Tensor< Cmpt > &t2) const
Inner-product of this with another Tensor.
scalar diagSqr() const
The L2-norm squared of the diagonal.
Vector< Cmpt > cy() const
Extract vector for column 1.
Cmpt v_[Ncmpts]
The components of this vector space.
Vector< Cmpt > row() const
Extract vector for given row: compile-time check of index.