mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
committed by
Andrew Heather
parent
6a53794e0a
commit
55e7da670c
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -386,7 +386,7 @@ void Foam::edgeCollapser::faceCollapseAxisAndAspectRatio
|
||||
{
|
||||
const pointField& pts = mesh_.points();
|
||||
|
||||
tensor J = f.inertia(pts, fC);
|
||||
symmTensor J(symm(f.inertia(pts, fC)));
|
||||
|
||||
// Find the dominant collapse direction by finding the eigenvector
|
||||
// that corresponds to the normal direction, discarding it. The
|
||||
@ -423,7 +423,7 @@ void Foam::edgeCollapser::faceCollapseAxisAndAspectRatio
|
||||
}
|
||||
else
|
||||
{
|
||||
vector eVals = eigenValues(J);
|
||||
vector eVals(eigenValues(J));
|
||||
|
||||
if (mag(eVals.y() - eVals.x()) < 100*SMALL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user