ODESolver: Add more diagnostics when the max number of iterations is reached

This commit is contained in:
Henry
2015-05-19 14:35:15 +01:00
parent 549e419a23
commit 9f3b170085

View File

@ -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-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,7 +89,9 @@ void Foam::ODESolver::solve
stepState& step stepState& step
) const ) const
{ {
scalar x0 = x;
solve(x, y, step.dxTry); solve(x, y, step.dxTry);
step.dxDid = x - x0;
} }
@ -149,6 +151,8 @@ void Foam::ODESolver::solve
"(const scalar xStart, const scalar xEnd," "(const scalar xStart, const scalar xEnd,"
"scalarField& y, scalar& dxTry) const" "scalarField& y, scalar& dxTry) const"
) << "Integration steps greater than maximum " << maxSteps_ ) << "Integration steps greater than maximum " << maxSteps_
<< "xStart = " << xStart << ", xEnd = " << xEnd
<< ", x = " << x << ", dxDid = " << step.dxDid
<< exit(FatalError); << exit(FatalError);
} }