38 #ifndef Foam_Tensor2D_H 39 #define Foam_Tensor2D_H 50 template<
class Cmpt>
class SymmTensor2D;
120 const Cmpt txx,
const Cmpt txy,
121 const Cmpt tyx,
const Cmpt tyy
146 inline Vector2D<Cmpt>
cx()
const;
149 inline Vector2D<Cmpt>
cy()
const;
152 template<direction Idx>
159 template<direction Idx>
178 template<direction Idx>
185 template<direction Idx>
213 inline Cmpt
det()
const;
255 struct is_contiguous<Tensor2D<Cmpt>> : is_contiguous<Cmpt> {};
259 struct is_contiguous_label<Tensor2D<Cmpt>> : is_contiguous_label<Cmpt> {};
263 struct is_contiguous_scalar<Tensor2D<Cmpt>> : is_contiguous_scalar<Cmpt> {};
components
Component labeling enumeration.
Tensor2D< Cmpt > T() const
Return non-Hermitian transpose.
const Cmpt & xy() const noexcept
Vector2D< Cmpt > x() const
Extract vector for row 0.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Tensor2D< Cmpt > adjunct() const
Return adjunct matrix (transpose of cofactor matrix)
Tensor2D< Cmpt > schur(const Tensor2D< Cmpt > &t2) const
Schur-product of this with another Tensor2D.
Tensor2D< Cmpt > inv() const
Return inverse.
Vector2D< Cmpt > col() const
Extract vector for given column: compile-time check of index.
Vector2D< Cmpt > y() const
Extract vector for row 1.
A templated (2 x 2) tensor of objects of <T> derived from VectorSpace.
const Cmpt & yx() const noexcept
scalar diagSqr() const
The L2-norm squared of the diagonal.
Vector2D< Cmpt > vectorComponent(const direction cmpt) const
Deprecated(2018-12) Return vector for given row (0,1)
Cmpt det() const
The determinate.
Tensor2D< Cmpt > inner(const Tensor2D< Cmpt > &t2) const
Inner-product of this with another Tensor2D.
Vector2D< Cmpt > cy() const
Extract vector for column 1.
void rows(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set row values.
Vector2D< Cmpt > row() const
Extract vector for given row: compile-time check of index.
Tensor2D & operator=(const Tensor2D &)=default
Copy assignment.
Vector2D< Cmpt > cx() const
Extract vector for column 0.
void cols(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set column values.
Tensor2D()=default
Default construct.
A templated (2 x 2) diagonal tensor of objects of <T>, effectively containing 1 element, derived from VectorSpace.
const Cmpt & xx() const noexcept
const dimensionedScalar c
Speed of light in a vacuum.
A templated (2 x 2) symmetric tensor of objects of <T>, effectively containing 3 elements, derived from VectorSpace.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Templated 2D Vector derived from VectorSpace adding construction from 2 components, element access using x() and y() member functions and the inner-product (dot-product).
const Cmpt & yy() const noexcept
Tensor2D< label > labelType
Equivalent type of labels used for valid component indexing.
static constexpr direction rank
Rank of Tensor2D is 2.
Vector2D< Cmpt > diag() const
Extract the diagonal as a vector.
Cmpt v_[Ncmpts]
The components of this vector space.
Tensor2D< Cmpt > cof() const
Return cofactor matrix (transpose of adjunct matrix)