mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
localBlended: Added support for "corrected" schemes
Resolves bug report: http://www.openfoam.com/mantisbt/view.php?id=30
This commit is contained in:
@ -60,6 +60,8 @@ void Foam::ODESolver::solve
|
||||
|
||||
scalar x = xStart;
|
||||
scalar h = hEst;
|
||||
scalar hNext = 0;
|
||||
scalar hPrev = 0;
|
||||
|
||||
for (label nStep=0; nStep<MAXSTP; nStep++)
|
||||
{
|
||||
@ -73,14 +75,24 @@ void Foam::ODESolver::solve
|
||||
if ((x + h - xEnd)*(x + h - xStart) > 0.0)
|
||||
{
|
||||
h = xEnd - x;
|
||||
hPrev = hNext;
|
||||
}
|
||||
|
||||
scalar hNext, hDid;
|
||||
hNext = 0;
|
||||
scalar hDid;
|
||||
solve(ode, x, y, dydx_, eps, yScale_, h, hDid, hNext);
|
||||
|
||||
if ((x - xEnd)*(xEnd - xStart) >= 0.0)
|
||||
{
|
||||
hEst = hNext;
|
||||
if (hPrev != 0)
|
||||
{
|
||||
hEst = hPrev;
|
||||
}
|
||||
else
|
||||
{
|
||||
hEst = hNext;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user