mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ODESolvers: Use the ODESystem protected data rather than pass redundant argument to solve
This commit is contained in:
@ -142,7 +142,7 @@ int main(int argc, char *argv[])
|
||||
scalar dxNext = dxEst;
|
||||
|
||||
odeSolver->relTol() = relTol;
|
||||
odeSolver->solve(ode, x, y, dxNext);
|
||||
odeSolver->solve(x, y, dxNext);
|
||||
|
||||
Info<< scientific << setw(13) << relTol;
|
||||
Info<< fixed << setw(11) << dxEst;
|
||||
@ -165,7 +165,7 @@ int main(int argc, char *argv[])
|
||||
scalar dxEst = 0.5;
|
||||
|
||||
odeSolver->relTol() = 1e-4;
|
||||
odeSolver->solve(ode, x, xEnd, y, dxEst);
|
||||
odeSolver->solve(x, xEnd, y, dxEst);
|
||||
|
||||
Info<< nl << "Analytical: y(2.0) = " << yEnd << endl;
|
||||
Info << "Numerical: y(2.0) = " << y << ", dxEst = " << dxEst << endl;
|
||||
|
||||
Reference in New Issue
Block a user