Follow minor API changes in opm-autodiff.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-05-21 09:50:54 +02:00
parent b7ef3b7f57
commit d7de9894e0
3 changed files with 19 additions and 19 deletions

View File

@ -69,7 +69,7 @@ namespace Opm {
typedef WellStateFullyImplicitBlackoilPolymer WellState; typedef WellStateFullyImplicitBlackoilPolymer WellState;
/// Model-specific solver parameters. /// Model-specific solver parameters.
struct ModelParameter struct ModelParameters
{ {
double dp_max_rel_; double dp_max_rel_;
double ds_max_; double ds_max_;
@ -79,8 +79,8 @@ namespace Opm {
double tolerance_cnv_; double tolerance_cnv_;
double tolerance_wells_; double tolerance_wells_;
ModelParameter( const parameter::ParameterGroup& param ); explicit ModelParameters( const parameter::ParameterGroup& param );
ModelParameter(); ModelParameters();
void reset(); void reset();
}; };
@ -101,7 +101,7 @@ namespace Opm {
/// \param[in] has_vapoil turn on vaporized oil feature /// \param[in] has_vapoil turn on vaporized oil feature
/// \param[in] has_polymer turn on polymer feature /// \param[in] has_polymer turn on polymer feature
/// \param[in] terminal_output request output to cout/cerr /// \param[in] terminal_output request output to cout/cerr
BlackoilPolymerModel(const ModelParameter& param, BlackoilPolymerModel(const ModelParameters& param,
const Grid& grid , const Grid& grid ,
const BlackoilPropsAdInterface& fluid, const BlackoilPropsAdInterface& fluid,
const DerivedGeology& geo , const DerivedGeology& geo ,
@ -173,7 +173,7 @@ namespace Opm {
WellState& well_state); WellState& well_state);
/// Return true if output to cout is wanted. /// Return true if output to cout is wanted.
bool terminalOutput() const; bool terminalOutputEnabled() const;
/// Compute convergence based on total mass balance (tol_mb) and maximum /// Compute convergence based on total mass balance (tol_mb) and maximum
/// residual mass balance (tol_cnv). /// residual mass balance (tol_cnv).
@ -252,7 +252,7 @@ namespace Opm {
const bool has_polymer_; const bool has_polymer_;
const int poly_pos_; const int poly_pos_;
ModelParameter param_; ModelParameters param_;
bool use_threshold_pressure_; bool use_threshold_pressure_;
V threshold_pressures_by_interior_face_; V threshold_pressures_by_interior_face_;

View File

@ -151,7 +151,7 @@ namespace detail {
} // namespace detail } // namespace detail
template <class Grid> template <class Grid>
void BlackoilPolymerModel<Grid>::ModelParameter:: void BlackoilPolymerModel<Grid>::ModelParameters::
reset() reset()
{ {
// default values for the solver parameters // default values for the solver parameters
@ -165,16 +165,16 @@ namespace detail {
} }
template <class Grid> template <class Grid>
BlackoilPolymerModel<Grid>::ModelParameter:: BlackoilPolymerModel<Grid>::ModelParameters::
ModelParameter() ModelParameters()
{ {
// set default values // set default values
reset(); reset();
} }
template <class Grid> template <class Grid>
BlackoilPolymerModel<Grid>::ModelParameter:: BlackoilPolymerModel<Grid>::ModelParameters::
ModelParameter( const parameter::ParameterGroup& param ) ModelParameters( const parameter::ParameterGroup& param )
{ {
// set default values // set default values
reset(); reset();
@ -192,7 +192,7 @@ namespace detail {
template <class Grid> template <class Grid>
BlackoilPolymerModel<Grid>:: BlackoilPolymerModel<Grid>::
BlackoilPolymerModel(const ModelParameter& param, BlackoilPolymerModel(const ModelParameters& param,
const Grid& grid , const Grid& grid ,
const BlackoilPropsAdInterface& fluid, const BlackoilPropsAdInterface& fluid,
const DerivedGeology& geo , const DerivedGeology& geo ,
@ -310,7 +310,7 @@ namespace detail {
template <class Grid> template <class Grid>
bool bool
BlackoilPolymerModel<Grid>:: BlackoilPolymerModel<Grid>::
terminalOutput() const terminalOutputEnabled() const
{ {
return terminal_output_; return terminal_output_;
} }

View File

@ -249,11 +249,11 @@ namespace Opm
typedef T Grid; typedef T Grid;
typedef BlackoilPolymerModel<Grid> Model; typedef BlackoilPolymerModel<Grid> Model;
typedef typename Model::ModelParameter ModelParam; typedef typename Model::ModelParameters ModelParams;
ModelParam modelParam( param_ ); ModelParams modelParams( param_ );
typedef NewtonSolver<Model> Solver; typedef NewtonSolver<Model> Solver;
typedef typename Solver::SolverParameter SolverParam; typedef typename Solver::SolverParameters SolverParams;
SolverParam solverParam( param_ ); SolverParams solverParams( param_ );
//adaptive time stepping //adaptive time stepping
// std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping; // std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping;
@ -330,11 +330,11 @@ namespace Opm
// Run a multiple steps of the solver depending on the time step control. // Run a multiple steps of the solver depending on the time step control.
solver_timer.start(); solver_timer.start();
Model model(modelParam, grid_, props_, geo_, rock_comp_props_, polymer_props_, wells, solver_, has_disgas_, has_vapoil_, has_polymer_, terminal_output_); Model model(modelParams, grid_, props_, geo_, rock_comp_props_, polymer_props_, wells, solver_, has_disgas_, has_vapoil_, has_polymer_, terminal_output_);
if (!threshold_pressures_by_face_.empty()) { if (!threshold_pressures_by_face_.empty()) {
model.setThresholdPressures(threshold_pressures_by_face_); model.setThresholdPressures(threshold_pressures_by_face_);
} }
Solver solver(solverParam, model); Solver solver(solverParams, model);
// If sub stepping is enabled allow the solver to sub cycle // If sub stepping is enabled allow the solver to sub cycle
// in case the report steps are to large for the solver to converge // in case the report steps are to large for the solver to converge