flow_ebos: do not use (smart) pointers for opm-parser objects anymore

this patch also includes code to make FlowMainEbos more autonomous
(i.e. it does not derive from FlowMainBase anymore). this allows more
flexibility how and what stuff gets created.
This commit is contained in:
Andreas Lauser
2016-12-05 18:27:31 +01:00
parent 5730e4f56a
commit f7910af7d7
3 changed files with 632 additions and 56 deletions

View File

@@ -84,7 +84,6 @@ public:
///
/// \param[in] geo derived geological properties
/// \param[in] props fluid and rock properties
/// \param[in] rock_comp_props if non-null, rock compressibility properties
/// \param[in] linsolver linear solver
/// \param[in] gravity if non-null, gravity vector
/// \param[in] has_disgas true for dissolved gas option
@@ -96,20 +95,17 @@ public:
const parameter::ParameterGroup& param,
DerivedGeology& geo,
BlackoilPropsAdInterface& props,
const RockCompressibility* rock_comp_props,
NewtonIterationBlackoilInterface& linsolver,
const double* gravity,
const bool has_disgas,
const bool has_vapoil,
std::shared_ptr<EclipseState> eclipse_state,
BlackoilOutputWriterEbos& output_writer,
const std::vector<double>& threshold_pressures_by_face)
const EclipseState& eclState,
BlackoilOutputWriterEbos& output_writer)
: ebosSimulator_(ebosSimulator),
param_(param),
model_param_(param),
solver_param_(param),
props_(props),
rock_comp_props_(rock_comp_props),
gravity_(gravity),
geo_(geo),
solver_(linsolver),
@@ -117,10 +113,9 @@ public:
has_vapoil_(has_vapoil),
terminal_output_(param.getDefault("output_terminal", true)),
output_writer_(output_writer),
threshold_pressures_by_face_(threshold_pressures_by_face),
is_parallel_run_( false )
{
DUNE_UNUSED_PARAMETER(eclipse_state);
DUNE_UNUSED_PARAMETER(eclState);
// Misc init.
const int num_cells = AutoDiffGrid::numCells(grid());
allcells_.resize(num_cells);
@@ -395,7 +390,6 @@ protected:
model_param_,
props_,
geo_,
rock_comp_props_,
well_model,
solver_,
terminal_output_));
@@ -699,10 +693,10 @@ protected:
const EclipseState& eclState() const
{ return *ebosSimulator_.gridManager().eclState(); }
{ return ebosSimulator_.gridManager().eclState(); }
EclipseState& eclState()
{ return *ebosSimulator_.gridManager().eclState(); }
{ return ebosSimulator_.gridManager().eclState(); }
// Data.
Simulator& ebosSimulator_;
@@ -718,7 +712,6 @@ protected:
// Observed objects.
BlackoilPropsAdInterface& props_;
const RockCompressibility* rock_comp_props_;
const double* gravity_;
// Solvers
DerivedGeology& geo_;
@@ -731,8 +724,6 @@ protected:
// output_writer
OutputWriter& output_writer_;
std::unique_ptr<RateConverterType> rateConverter_;
// Threshold pressures.
std::vector<double> threshold_pressures_by_face_;
// Whether this a parallel simulation or not
bool is_parallel_run_;