ENH: improve analytical eigendecompositions

- `tensor` and `tensor2D` returns complex eigenvalues/vectors
  - `symmTensor` and `symmTensor2D` returns real eigenvalues/vectors
  - adds new test routines for eigendecompositions
  - improves numerical stability by:
    - using new robust algorithms,
    - reordering the conditional branches in root-type selection
This commit is contained in:
Kutalmis Bercin
2020-02-11 16:22:09 +00:00
committed by Andrew Heather
parent 6a53794e0a
commit 55e7da670c
28 changed files with 1411 additions and 284 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -58,10 +58,13 @@ bool Foam::functionObjects::Lambda2::calc()
const tmp<volTensorField> tgradU(fvc::grad(U));
const volTensorField& gradU = tgradU();
const volTensorField SSplusWW
const volSymmTensorField SSplusWW
(
(symm(gradU) & symm(gradU))
+ (skew(gradU) & skew(gradU))
symm
(
(symm(gradU) & symm(gradU))
+ (skew(gradU) & skew(gradU))
)
);
return store