Expand description
Full (non-symmetric) 3×3 tensor (Tensor).
Full (non-symmetric) 3×3 tensor (Tensor) and its OpenFOAM-style
operators, invariants, and decompositions.
Components are dimensionless f64 stored row-major
(xx, xy, xz, yx, yy, yz, zx, zy, zz). Operator names follow OpenFOAM:
mat_mul/mat_vec are the single inner product (&), double_inner
the double contraction (&&), and the dyadic/outer product is Mul
(*) of two vectors.
Structs§
- Tensor
- Full (non-symmetric) 3×3 tensor stored row-major.
Component order: xx, xy, xz, yx, yy, yz, zx, zy, zz.
Maps to
Foam::tensor(Foam::Tensor<scalar>).
Functions§
- det
- Determinant det(T).
- dev
- Deviatoric part
T - (tr/3)*I. - dev2
- Two-thirds deviatoric
T - (2*tr/3)*I. - dev_
symm - Deviatoric of the symmetric part
symm(T) - (tr/3)*I. - dev_
two_ symm - Deviatoric of twice the symmetric part
twoSymm(T) - (2*tr/3)*I. - hodge_
dual_ of_ vec - Hodge dual of a Vector as a skew-symmetric Tensor. C++
operator*(Vector). - inv
- Inverse T⁻¹ (panics in debug builds if singular).
- lerp
- Linear interpolation
(1-t)*a + t*bbetween two tensors. - outer
- Outer product v ⊗ w. Same as
v * wbut as a named function. - skew
- Skew-symmetric part
0.5*(T - Tᵀ). - symm
- Symmetric part
0.5*(T + Tᵀ). - tr
- Trace tr(T) = xx + yy + zz.
- two_
symm - Twice the symmetric part
T + Tᵀ.