38#ifndef Foam_Tensor2D_H
39#define Foam_Tensor2D_H
120 const Cmpt txx,
const Cmpt txy,
121 const Cmpt tyx,
const Cmpt tyy
152 template<direction Idx>
159 template<direction Idx>
178 template<direction Idx>
185 template<direction Idx>
213 inline Cmpt
det()
const;
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.
scalar diagSqr() const
The L2-norm squared of the diagonal.
Vector2D< Cmpt > col(const direction c) const
Extract vector for given column (0,1): runtime check of index.
Tensor2D< label > labelType
Tensor2D(Foam::zero)
Construct initialized to zero.
const Cmpt & yy() const noexcept
Tensor2D(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Construct given the two row vectors.
Vector2D< Cmpt > row(const direction r) const
Extract vector for given row (0,1): runtime check of index.
void row(const direction r, const Vector2D< Cmpt > &v)
Set values of given row (0,1): compile-time check of index.
Tensor2D(const SphericalTensor2D< Cmpt > &st)
Construct given SphericalTensor2D.
components
Component labeling enumeration.
void col(const Vector2D< Cmpt > &v)
Set values of given column: compile-time check of index.
Tensor2D< Cmpt > adjunct() const
Return adjunct matrix (transpose of cofactor matrix).
void col(const direction c, const Vector2D< Cmpt > &v)
Set values of given column (0,1): runtime check of index.
Vector2D< scalar > y() const
Vector2D< Cmpt > cy() const
Extract vector for column 1.
Vector2D< scalar > vectorComponent(const direction cmpt) const
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.
static constexpr direction rank
Tensor2D< Cmpt > schur(const Tensor2D< Cmpt > &t2) const
Schur-product of this with another Tensor2D.
const Cmpt & yx() const noexcept
Tensor2D< Cmpt > cof() const
Return cofactor matrix (transpose of adjunct matrix).
Vector2D< scalar > x() const
void rows(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set row values.
Tensor2D & operator=(const Tensor2D &)=default
Copy assignment.
Cmpt det() const
The determinate.
Vector2D< Cmpt > cx() const
Extract vector for column 0.
Tensor2D(const Tensor2D &)=default
Copy construct.
void diag(const Vector2D< Cmpt > &v)
Set values of the diagonal.
Tensor2D< Cmpt > T() const
Return non-Hermitian transpose.
Tensor2D(const Cmpt txx, const Cmpt txy, const Cmpt tyx, const Cmpt tyy)
Construct given the four components.
Tensor2D(Istream &is)
Construct from Istream.
Tensor2D< Cmpt > inv() const
Return inverse.
void operator=(const SymmTensor2D< Cmpt > &)
Copy assign from SymmTensor2D.
const Cmpt & xx() const noexcept
Tensor2D(const SymmTensor2D< Cmpt > &st)
Construct given SymmTensor2D.
void operator=(const SphericalTensor2D< Cmpt > &)
Copy assign from SphericalTensor2D.
Tensor2D(const VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 > &vs)
Construct given VectorSpace.
Vector2D< Cmpt > diag() const
Extract the diagonal as a vector.
void row(const Vector2D< Cmpt > &v)
Set values of given row: compile-time check of index.
const Cmpt & xy() const noexcept
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,...
Cmpt v_[Ncmpts]
The components of this vector space.
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.