mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06: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:
@@ -193,11 +193,7 @@ public:
|
||||
*/
|
||||
FingerProblem(Simulator &simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
eps_ = 3e-6;
|
||||
|
||||
temperature_ = 273.15 + 20; // -> 20°C
|
||||
}
|
||||
{ }
|
||||
|
||||
/*!
|
||||
* \name Auxiliary methods
|
||||
@@ -229,6 +225,10 @@ public:
|
||||
{
|
||||
ParentType::finishInit();
|
||||
|
||||
eps_ = 3e-6;
|
||||
|
||||
temperature_ = 273.15 + 20; // -> 20°C
|
||||
|
||||
FluidSystem::init();
|
||||
|
||||
// parameters for the Van Genuchten law of the main imbibition
|
||||
|
||||
Reference in New Issue
Block a user