making init() function for WellInterface virtual.

This commit is contained in:
Kai Bao 2017-06-28 15:20:25 +02:00
parent 4e4e383107
commit 033fe70620
3 changed files with 13 additions and 12 deletions

View File

@ -114,11 +114,11 @@ namespace Opm
std::vector<EvalWell>& mob) const;
// TODO: the parameters need to be optimized/adjusted
void init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const double gravity_arg,
const int num_cells);
virtual void init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const double gravity_arg,
const int num_cells);
// Update the well_state based on solution
void updateWellState(const BVector& dwells,

View File

@ -47,8 +47,9 @@ namespace Opm
const double gravity_arg,
const int num_cells)
{
WellInterface<TypeTag>(phase_usage_arg, active_arg,
vfp_properties_arg, gravity_arg, num_cells);
WellInterface<TypeTag>::init(phase_usage_arg, active_arg,
vfp_properties_arg, gravity_arg, num_cells);
// setup sparsity pattern for the matrices
// TODO: C and B are opposite compared with the notations used in the paper.

View File

@ -112,11 +112,11 @@ namespace Opm
virtual std::vector<double>& perfPressureDiffs() = 0;
// TODO: the parameters need to be optimized/adjusted
void init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const double gravity_arg,
const int num_cells);
virtual void init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const double gravity_arg,
const int num_cells);
// TODO: temporary
virtual void setWellVariables(const WellState& well_state) = 0;