mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Change eigenvalue ordering to be ascending value rather than ascending magnitude
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -183,17 +183,17 @@ vector eigenValues(const tensor& t)
|
|||||||
|
|
||||||
|
|
||||||
// Sort the eigenvalues into ascending order
|
// Sort the eigenvalues into ascending order
|
||||||
if (mag(i) > mag(ii))
|
if (i > ii)
|
||||||
{
|
{
|
||||||
Swap(i, ii);
|
Swap(i, ii);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mag(ii) > mag(iii))
|
if (ii > iii)
|
||||||
{
|
{
|
||||||
Swap(ii, iii);
|
Swap(ii, iii);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mag(i) > mag(ii))
|
if (i > ii)
|
||||||
{
|
{
|
||||||
Swap(i, ii);
|
Swap(i, ii);
|
||||||
}
|
}
|
||||||
@ -384,17 +384,17 @@ vector eigenValues(const symmTensor& t)
|
|||||||
|
|
||||||
|
|
||||||
// Sort the eigenvalues into ascending order
|
// Sort the eigenvalues into ascending order
|
||||||
if (mag(i) > mag(ii))
|
if (i > ii)
|
||||||
{
|
{
|
||||||
Swap(i, ii);
|
Swap(i, ii);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mag(ii) > mag(iii))
|
if (ii > iii)
|
||||||
{
|
{
|
||||||
Swap(ii, iii);
|
Swap(ii, iii);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mag(i) > mag(ii))
|
if (i > ii)
|
||||||
{
|
{
|
||||||
Swap(i, ii);
|
Swap(i, ii);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -116,7 +116,7 @@ vector2D eigenValues(const tensor2D& t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sort the eigenvalues into ascending order
|
// Sort the eigenvalues into ascending order
|
||||||
if (mag(i) > mag(ii))
|
if (i > ii)
|
||||||
{
|
{
|
||||||
Swap(i, ii);
|
Swap(i, ii);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user