Commit 1cac1aae authored by Henry's avatar Henry
Browse files

localBlended: Added support for "corrected" schemes

Resolves bug report: http://www.openfoam.com/mantisbt/view.php?id=30
parent 4e7fa498
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment