mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Follow minor API changes in opm-autodiff.
This commit is contained in:
parent
b7ef3b7f57
commit
d7de9894e0
@ -69,7 +69,7 @@ namespace Opm {
|
||||
typedef WellStateFullyImplicitBlackoilPolymer WellState;
|
||||
|
||||
/// Model-specific solver parameters.
|
||||
struct ModelParameter
|
||||
struct ModelParameters
|
||||
{
|
||||
double dp_max_rel_;
|
||||
double ds_max_;
|
||||
@ -79,8 +79,8 @@ namespace Opm {
|
||||
double tolerance_cnv_;
|
||||
double tolerance_wells_;
|
||||
|
||||
ModelParameter( const parameter::ParameterGroup& param );
|
||||
ModelParameter();
|
||||
explicit ModelParameters( const parameter::ParameterGroup& param );
|
||||
ModelParameters();
|
||||
|
||||
void reset();
|
||||
};
|
||||
@ -101,7 +101,7 @@ namespace Opm {
|
||||
/// \param[in] has_vapoil turn on vaporized oil feature
|
||||
/// \param[in] has_polymer turn on polymer feature
|
||||
/// \param[in] terminal_output request output to cout/cerr
|
||||
BlackoilPolymerModel(const ModelParameter& param,
|
||||
BlackoilPolymerModel(const ModelParameters& param,
|
||||
const Grid& grid ,
|
||||
const BlackoilPropsAdInterface& fluid,
|
||||
const DerivedGeology& geo ,
|
||||
@ -173,7 +173,7 @@ namespace Opm {
|
||||
WellState& well_state);
|
||||
|
||||
/// 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
|
||||
/// residual mass balance (tol_cnv).
|
||||
@ -252,7 +252,7 @@ namespace Opm {
|
||||
const bool has_polymer_;
|
||||
const int poly_pos_;
|
||||
|
||||
ModelParameter param_;
|
||||
ModelParameters param_;
|
||||
bool use_threshold_pressure_;
|
||||
V threshold_pressures_by_interior_face_;
|
||||
|
||||
|
@ -151,7 +151,7 @@ namespace detail {
|
||||
} // namespace detail
|
||||
|
||||
template <class Grid>
|
||||
void BlackoilPolymerModel<Grid>::ModelParameter::
|
||||
void BlackoilPolymerModel<Grid>::ModelParameters::
|
||||
reset()
|
||||
{
|
||||
// default values for the solver parameters
|
||||
@ -165,16 +165,16 @@ namespace detail {
|
||||
}
|
||||
|
||||
template <class Grid>
|
||||
BlackoilPolymerModel<Grid>::ModelParameter::
|
||||
ModelParameter()
|
||||
BlackoilPolymerModel<Grid>::ModelParameters::
|
||||
ModelParameters()
|
||||
{
|
||||
// set default values
|
||||
reset();
|
||||
}
|
||||
|
||||
template <class Grid>
|
||||
BlackoilPolymerModel<Grid>::ModelParameter::
|
||||
ModelParameter( const parameter::ParameterGroup& param )
|
||||
BlackoilPolymerModel<Grid>::ModelParameters::
|
||||
ModelParameters( const parameter::ParameterGroup& param )
|
||||
{
|
||||
// set default values
|
||||
reset();
|
||||
@ -192,7 +192,7 @@ namespace detail {
|
||||
|
||||
template <class Grid>
|
||||
BlackoilPolymerModel<Grid>::
|
||||
BlackoilPolymerModel(const ModelParameter& param,
|
||||
BlackoilPolymerModel(const ModelParameters& param,
|
||||
const Grid& grid ,
|
||||
const BlackoilPropsAdInterface& fluid,
|
||||
const DerivedGeology& geo ,
|
||||
@ -310,7 +310,7 @@ namespace detail {
|
||||
template <class Grid>
|
||||
bool
|
||||
BlackoilPolymerModel<Grid>::
|
||||
terminalOutput() const
|
||||
terminalOutputEnabled() const
|
||||
{
|
||||
return terminal_output_;
|
||||
}
|
||||
|
@ -249,11 +249,11 @@ namespace Opm
|
||||
|
||||
typedef T Grid;
|
||||
typedef BlackoilPolymerModel<Grid> Model;
|
||||
typedef typename Model::ModelParameter ModelParam;
|
||||
ModelParam modelParam( param_ );
|
||||
typedef typename Model::ModelParameters ModelParams;
|
||||
ModelParams modelParams( param_ );
|
||||
typedef NewtonSolver<Model> Solver;
|
||||
typedef typename Solver::SolverParameter SolverParam;
|
||||
SolverParam solverParam( param_ );
|
||||
typedef typename Solver::SolverParameters SolverParams;
|
||||
SolverParams solverParams( param_ );
|
||||
|
||||
//adaptive time stepping
|
||||
// std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping;
|
||||
@ -330,11 +330,11 @@ namespace Opm
|
||||
// Run a multiple steps of the solver depending on the time step control.
|
||||
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()) {
|
||||
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
|
||||
// in case the report steps are to large for the solver to converge
|
||||
|
Loading…
Reference in New Issue
Block a user