39 #ifndef Foam_SymmTensor_H 40 #define Foam_SymmTensor_H 100 template<
class Cmpt2>
112 const bool transposed =
false 118 const Cmpt txx,
const Cmpt txy,
const Cmpt txz,
119 const Cmpt tyy,
const Cmpt tyz,
164 template<direction Idx>
197 template<direction Row>
204 template<direction Idx>
243 inline Cmpt
det()
const;
281 struct is_contiguous<SymmTensor<Cmpt>> : is_contiguous<Cmpt> {};
285 struct is_contiguous_label<SymmTensor<Cmpt>> : is_contiguous_label<Cmpt> {};
289 struct is_contiguous_scalar<SymmTensor<Cmpt>> : is_contiguous_scalar<Cmpt> {};
293 class symmTypeOfRank<Cmpt, 2>
297 typedef SymmTensor<Cmpt>
type;
Vector< Cmpt > x() const
Extract vector for row 0.
const Cmpt & xz() const noexcept
components
Component labeling enumeration.
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.
static constexpr direction rank
Rank of SymmTensor is 2.
SymmTensor< label > labelType
Equivalent type of labels used for valid component indexing.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
SymmTensor< Cmpt > safeInv() const
Return inverse, with (ad hoc) failsafe handling of 2D tensors.
Cmpt det() const
The determinate.
const Cmpt & zz() const noexcept
SymmTensor< Cmpt > adjunct() const
Return adjunct matrix (transpose of cofactor matrix)
void subtractDiag(const Vector< Cmpt > &v)
Subtract from the diagonal.
Vector< Cmpt > diag() const
Extract the diagonal as a vector.
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 1 element, derived from VectorSpace.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
static const SymmTensor I
const Cmpt & zy() const noexcept
SymmTensor< Cmpt > inv2D(const direction excludeCmpt) const
Return inverse of 2D tensor (by excluding given direction)
The extended precision type (solveScalar for float)
scalar diagSqr() const
The L2-norm squared of the diagonal.
Vector< Cmpt > y() const
Extract vector for row 1.
SymmTensor< Cmpt > adjunct2D(const direction excludeCmpt) const
Return 2D adjunct matrix by excluding given direction.
SymmTensor< Cmpt > cof() const
Return cofactor matrix (transpose of adjunct matrix)
Vector< Cmpt > cy() const
Extract vector for column 1.
const Cmpt & xx() const noexcept
SymmTensor & operator=(const SymmTensor &)=default
Copy assignment.
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.
Cmpt det2D(const direction excludeCmpt) const
The 2D determinant by excluding given direction.
friend Ostream & operator(Ostream &, const VectorSpace< Form, Cmpt, Ncmpts > &)
const SymmTensor< Cmpt > & T() const noexcept
Return non-Hermitian transpose.
Vector< Cmpt > cz() const
Extract vector for column 2.
Vector< Cmpt > col() const
Extract vector for given column: compile-time check of index.
void addDiag(const Vector< Cmpt > &v)
Add to the diagonal.
const Cmpt & yy() const noexcept
void cols(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set column values.
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 ...
const Cmpt & zx() const noexcept
SymmTensor< Cmpt > inv() const
Return inverse.
const Cmpt & yx() const noexcept
Vector< Cmpt > row() const
Extract vector for given row: compile-time check of index.
const Cmpt & xy() const noexcept
Cmpt v_[Ncmpts]
The components of this vector space.
void rows(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set row values.
Vector< Cmpt > z() const
Extract vector for row 2.
const Cmpt & yz() const noexcept
SymmTensor()=default
Default construct.