mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add 2D det() / inv() methods for Tensor/SymmTensor (#2724)
- for cases where a 3D tensor is being used to represent 2D content, the determinant is zero. Can use inv2D(excludeDirection) to compensate and invert as if it were only 2D. ENH: consistent definitions for magSqr of symmTensors, diagSqr() norm COMP: return scalar not component type for magSqr - had inconsistent definitions with SymmTensor returning the component type and Tensor returning scalar. Only evident with complex.
This commit is contained in:
@ -325,7 +325,7 @@ void test_global_funcs(Type)
|
||||
Type(13)
|
||||
)
|
||||
);
|
||||
cmp(" Square of Frobenius norm = ", magSqr(sT), Type(17.999999999999996));
|
||||
cmp(" Square of Frobenius norm = ", magSqr(sT), scalar(17.999999999999996));
|
||||
cmp
|
||||
(
|
||||
" Outer-product of a Vector2D with itself = ",
|
||||
|
||||
Reference in New Issue
Block a user