mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Using the CriticalException in PreconditionerFactory and ISTLSolver
This commit is contained in:
parent
5181a06219
commit
8b84bc6b4b
@ -25,6 +25,7 @@
|
|||||||
#include <dune/istl/owneroverlapcopy.hh>
|
#include <dune/istl/owneroverlapcopy.hh>
|
||||||
#include <dune/istl/solver.hh>
|
#include <dune/istl/solver.hh>
|
||||||
|
|
||||||
|
#include <opm/common/CriticalError.hpp>
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
#include <opm/common/Exceptions.hpp>
|
#include <opm/common/Exceptions.hpp>
|
||||||
#include <opm/common/TimingMacros.hpp>
|
#include <opm/common/TimingMacros.hpp>
|
||||||
@ -377,10 +378,11 @@ std::unique_ptr<Matrix> blockJacobiAdjacency(const Grid& grid,
|
|||||||
void prepare(const Matrix& M, Vector& b)
|
void prepare(const Matrix& M, Vector& b)
|
||||||
{
|
{
|
||||||
OPM_TIMEBLOCK(istlSolverPrepare);
|
OPM_TIMEBLOCK(istlSolverPrepare);
|
||||||
|
OPM_BEGIN_TRY_CATCH_RETHROW_AS_CRITICAL_ERROR();
|
||||||
initPrepare(M,b);
|
initPrepare(M,b);
|
||||||
|
|
||||||
prepareFlexibleSolver();
|
prepareFlexibleSolver();
|
||||||
|
OPM_END_TRY_CATCH_RETHROW_AS_CRITICAL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <opm/common/CriticalError.hpp>
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
#include <opm/common/TimingMacros.hpp>
|
#include <opm/common/TimingMacros.hpp>
|
||||||
|
|
||||||
@ -776,7 +777,7 @@ PreconditionerFactory<Operator, Comm>::create(const Operator& op,
|
|||||||
const std::function<Vector()>& weightsCalculator,
|
const std::function<Vector()>& weightsCalculator,
|
||||||
std::size_t pressureIndex)
|
std::size_t pressureIndex)
|
||||||
{
|
{
|
||||||
return instance().doCreate(op, prm, weightsCalculator, pressureIndex);
|
OPM_TRY_THROW_AS_CRITICAL_ERROR(return instance().doCreate(op, prm, weightsCalculator, pressureIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Operator, class Comm>
|
template <class Operator, class Comm>
|
||||||
@ -787,7 +788,7 @@ PreconditionerFactory<Operator, Comm>::create(const Operator& op,
|
|||||||
const Comm& comm,
|
const Comm& comm,
|
||||||
std::size_t pressureIndex)
|
std::size_t pressureIndex)
|
||||||
{
|
{
|
||||||
return instance().doCreate(op, prm, weightsCalculator, pressureIndex, comm);
|
OPM_TRY_THROW_AS_CRITICAL_ERROR(return instance().doCreate(op, prm, weightsCalculator, pressureIndex, comm));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -798,7 +799,7 @@ PreconditionerFactory<Operator, Comm>::create(const Operator& op,
|
|||||||
const Comm& comm,
|
const Comm& comm,
|
||||||
std::size_t pressureIndex)
|
std::size_t pressureIndex)
|
||||||
{
|
{
|
||||||
return instance().doCreate(op, prm, std::function<Vector()>(), pressureIndex, comm);
|
OPM_TRY_THROW_AS_CRITICAL_ERROR(return instance().doCreate(op, prm, std::function<Vector()>(), pressureIndex, comm));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Operator, class Comm>
|
template <class Operator, class Comm>
|
||||||
|
Loading…
Reference in New Issue
Block a user