Skip to content
Snippets Groups Projects
Commit 86b0755c authored by Andreas Lauser's avatar Andreas Lauser
Browse files

hopefully last grr on time step size of retries

This issue seems to be jinxed.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7313 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 5e0c722f
No related branches found
No related tags found
No related merge requests found
......@@ -465,20 +465,17 @@ public:
void timeIntegration()
{
const int maxFails = 10;
Scalar dt = timeManager().timeStepSize();
for (int i = 0; i < maxFails; ++i) {
Scalar nextDt = dt / 2;
// update failed
if (i > 0 && gridView().comm().rank() == 0)
std::cout << "Newton solver did not converge with dt="<<dt<<" seconds. Retrying with time step of "
<< nextDt << " seconds\n";
if (model_.update(newtonMethod_, newtonCtl_))
return;
Scalar dt = timeManager().timeStepSize();
Scalar nextDt = dt / 2;
timeManager().setTimeStepSize(nextDt);
dt = nextDt;
// update failed
std::cout << "Newton solver did not converge with dt="<<dt<<" seconds. Retrying with time step of "
<< nextDt << " seconds\n";
}
DUNE_THROW(Dune::MathError,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment