mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Ensure non-null model in constructor.
This commit is contained in:
parent
87330984aa
commit
88fbe5e9b6
@ -37,6 +37,9 @@ namespace Opm
|
||||
nonlinearIterationsLast_(0),
|
||||
linearIterationsLast_(0)
|
||||
{
|
||||
if (!model_) {
|
||||
OPM_THROW(std::logic_error, "Must provide a non-null model argument for NonlinearSolver.");
|
||||
}
|
||||
}
|
||||
|
||||
template <class PhysicalModel>
|
||||
@ -54,7 +57,6 @@ namespace Opm
|
||||
template <class PhysicalModel>
|
||||
const PhysicalModel& NonlinearSolver<PhysicalModel>::model() const
|
||||
{
|
||||
assert( model_ );
|
||||
return *model_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user