mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-08-06 05:16:51 -05:00
use finishInit() properly for all problems
this means that all code which could potentially throw an exception is moved to this method(). (In particular FluidSystem::init() proved troublesome in the past.) Besides avoiding segmentation the faults which stem from exceptions thrown in constructors, this also has the advantage that simulations which spend a noticable amount of time to initialize stop at the "correct" place, i.e. after the "Finish init of the problem" message was printed by the simulator...
This commit is contained in:
@@ -227,7 +227,15 @@ public:
|
||||
*/
|
||||
Co2InjectionProblem(Simulator &simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseProblem::finishInit
|
||||
*/
|
||||
void finishInit()
|
||||
{
|
||||
ParentType::finishInit();
|
||||
|
||||
eps_ = 1e-6;
|
||||
|
||||
temperatureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow);
|
||||
|
||||
Reference in New Issue
Block a user