mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
bugfix: Detect exception during beginReportStep in parallel a. abort
Previously, exceptions happening at this stage have deadlocked flow. E.g. UniformTabulated2DFunction in opm-material throws a NumericalIssue if the values passed are outside the tabulated reason. This function is e.g. called in 2-phase CO2-storage cases during BlackoilModel::initializeWellState BTW: This is only the first step as it is not very user friendly that a simulation aborts at this (late) stage.
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <opm/simulators/utils/DeferredLogger.hpp>
|
||||
|
||||
#include <opm/material/common/Exceptions.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
|
||||
@@ -64,6 +66,9 @@ void _throw(Opm::ExceptionType::ExcEnum exc_type, const std::string& message) {
|
||||
case Opm::ExceptionType::INVALID_ARGUMENT:
|
||||
throw std::invalid_argument(message);
|
||||
break;
|
||||
case Opm::ExceptionType::NUMERICAL_ISSUE:
|
||||
throw Opm::NumericalIssue(message);
|
||||
break;
|
||||
case Opm::ExceptionType::DEFAULT:
|
||||
case Opm::ExceptionType::LOGIC_ERROR:
|
||||
throw std::logic_error(message);
|
||||
|
||||
Reference in New Issue
Block a user