From 5ea87082f120f83759c75a83ee7639aadbf880b3 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 15 Dec 2017 15:26:47 +0000 Subject: [PATCH] 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. --- src/ODE/ODESolvers/ODESolver/ODESolver.C | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ODE/ODESolvers/ODESolver/ODESolver.C b/src/ODE/ODESolvers/ODESolver/ODESolver.C index 69d8b5879..f903d6d1a 100644 --- a/src/ODE/ODESolvers/ODESolver/ODESolver.C +++ b/src/ODE/ODESolvers/ODESolver/ODESolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ Foam::ODESolver::ODESolver(const ODESystem& ode, const dictionary& dict) n_(ode.nEqns()), absTol_(n_, dict.lookupOrDefault("absTol", SMALL)), relTol_(n_, dict.lookupOrDefault("relTol", 1e-4)), - maxSteps_(10000) + maxSteps_(dict.lookupOrDefault("maxSteps", 10000)) {} @@ -189,8 +189,8 @@ void Foam::ODESolver::solve } FatalErrorInFunction - << "Integration steps greater than maximum " << maxSteps_ - << "xStart = " << xStart << ", xEnd = " << xEnd + << "Integration steps greater than maximum " << maxSteps_ << nl + << " xStart = " << xStart << ", xEnd = " << xEnd << ", x = " << x << ", dxDid = " << step.dxDid << exit(FatalError); }