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

2p2c model: allow updateStaticData to throw exceptions for parallel runs

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6497 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent a672e616
No related branches found
No related tags found
No related merge requests found
...@@ -66,9 +66,28 @@ public: ...@@ -66,9 +66,28 @@ public:
void newtonEndStep(SolutionVector &uCurrentIter, void newtonEndStep(SolutionVector &uCurrentIter,
const SolutionVector &uLastIter) const SolutionVector &uLastIter)
{ {
// call the method of the base class int succeeded;
this->method().model().updateStaticData(uCurrentIter, uLastIter); try {
ParentType::newtonEndStep(uCurrentIter, uLastIter); // call the method of the base class
this->method().model().updateStaticData(uCurrentIter, uLastIter);
ParentType::newtonEndStep(uCurrentIter, uLastIter);
succeeded = 1;
succeeded = this->problem_().gridView().comm().min(succeeded);
}
catch (Dumux::NumericalProblem &e)
{
std::cout << "rank " << this->problem_().gridView().comm().rank()
<< " caught an exception while assembling:" << e.what()
<< "\n";
succeeded = 0;
succeeded = this->problem_().gridView().comm().min(succeeded);
}
if (!succeeded) {
DUNE_THROW(NumericalProblem,
"A process did not succeed in linearizing the system");
};
} }
/*! /*!
......
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