mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
flow: refactor the specializations
The motivation for this PR is that currently the build fails on my Ubuntu 17.10 laptop with two processes because that machine "only" has 8 GB of RAM (granted, the optimization options may have been a bit too excessive). under the new scheme, each specialization of the simulator is put into a separate compile unit which is part of libopmsimulators. this has the advantages that the specialized simulators and the main binary automatically stay consistent, the compilation is faster (2m25s vs 4m16s on my machine) because all compile units can be built in parallel and that compilation takes up less RAM because there is no need to instantiate all specializations in a single compile unit. on the minus side, all specializations must now always be compiled, the approach means slightly more work for the maintainers and the flow_* startup code gets even more complicated.
This commit is contained in:
@@ -78,7 +78,6 @@ namespace Opm
|
||||
public:
|
||||
typedef typename GET_PROP(TypeTag, MaterialLaw)::EclMaterialLawManager MaterialLawManager;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) EbosSimulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SimulatorParameter) EbosSimulatorParameter;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
|
||||
@@ -419,10 +418,9 @@ namespace Opm
|
||||
char* ptr[2];
|
||||
ptr[ 0 ] = const_cast< char * > (progName.c_str());
|
||||
ptr[ 1 ] = const_cast< char * > (deckFile.c_str());
|
||||
EbosSimulatorParameter simParam( dck, eclipseState );
|
||||
EbosSimulator::registerParameters();
|
||||
Ewoms::setupParameters_< TypeTag > ( 2, ptr );
|
||||
ebosSimulator_.reset(new EbosSimulator(simParam, /*verbose=*/false));
|
||||
ebosSimulator_.reset(new EbosSimulator(/*verbose=*/false));
|
||||
ebosSimulator_->model().applyInitialSolution();
|
||||
|
||||
// Create a grid with a global view.
|
||||
|
||||
Reference in New Issue
Block a user