Skip to content
Snippets Groups Projects
Commit 5c69b02d authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

ENH: ODESolver: maxSteps now an optional input

e.g.

odeCoeffs
{
    solver          seulex;
    absTol          1e-12;
    relTol          0.0001;
    maxSteps        1e+06;
}

maxSteps defaults to 10000 for backward compatibility.
parent fe595af8
Branches
Tags
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -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-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -64,7 +64,7 @@ Foam::ODESolver::ODESolver(const ODESystem& ode, const dictionary& dict) ...@@ -64,7 +64,7 @@ Foam::ODESolver::ODESolver(const ODESystem& ode, const dictionary& dict)
n_(ode.nEqns()), n_(ode.nEqns()),
absTol_(n_, dict.lookupOrDefault<scalar>("absTol", SMALL)), absTol_(n_, dict.lookupOrDefault<scalar>("absTol", SMALL)),
relTol_(n_, dict.lookupOrDefault<scalar>("relTol", 1e-4)), relTol_(n_, dict.lookupOrDefault<scalar>("relTol", 1e-4)),
maxSteps_(10000) maxSteps_(dict.lookupOrDefault<scalar>("maxSteps", 10000))
{} {}
...@@ -189,8 +189,8 @@ void Foam::ODESolver::solve ...@@ -189,8 +189,8 @@ void Foam::ODESolver::solve
} }
FatalErrorInFunction FatalErrorInFunction
<< "Integration steps greater than maximum " << maxSteps_ << "Integration steps greater than maximum " << maxSteps_ << nl
<< "xStart = " << xStart << ", xEnd = " << xEnd << " xStart = " << xStart << ", xEnd = " << xEnd
<< ", x = " << x << ", dxDid = " << step.dxDid << ", x = " << x << ", dxDid = " << step.dxDid
<< exit(FatalError); << exit(FatalError);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment