Skip to content

Commit

Permalink
cleaning up EclBlackOilNewtonMethod
Browse files Browse the repository at this point in the history
it looks like there are only a few lines different from BlackOilNewtonMethod
  • Loading branch information
GitPaean committed Aug 21, 2020
1 parent bd70a6b commit b751342
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions ebos/eclblackoilnewtonmethod.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ namespace Opm {
* \brief A newton solver which is specific to the black oil model.
*/
template <class TypeTag>
class EclBlackOilNewtonMethod : public GET_PROP_TYPE(TypeTag, DiscNewtonMethod)
class EclBlackOilNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonMethod>
{
typedef typename GET_PROP_TYPE(TypeTag, DiscNewtonMethod) ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Linearizer) Linearizer;

static const unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
using ParentType = GetPropType<TypeTag, Properties::DiscNewtonMethod>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Linearizer = GetPropType<TypeTag, Properties::Linearizer>;

static const unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();

public:
EclBlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
Expand Down
10 changes: 5 additions & 5 deletions opm/simulators/flow/BlackoilModelParametersEbos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ namespace Opm
// name of json file for pressure setup
std::string pressure_solver_json_;
/// Construct from user parameters or defaults.

BlackoilModelParametersEbos()
{
dbhp_max_rel_= EWOMS_GET_PARAM(TypeTag, Scalar, DbhpMaxRel);
Expand Down Expand Up @@ -255,8 +255,8 @@ namespace Opm
tolerance_pressure_ = EWOMS_GET_PARAM(TypeTag, Scalar, TolerancePressure);
reuse_pressure_solver_ = EWOMS_GET_PARAM(TypeTag, int, ReusePressureSolver);
pressure_solver_json_ = EWOMS_GET_PARAM(TypeTag, std::string,PressureSolverJson);


}

static void registerParameters()
Expand Down Expand Up @@ -288,7 +288,7 @@ namespace Opm
EWOMS_REGISTER_PARAM(TypeTag, bool, UseUpdateStabilization, "Try to detect and correct oscillations or stagnation during the Newton method");
EWOMS_REGISTER_PARAM(TypeTag, bool, MatrixAddWellContributions, "Explicitly specify the influences of wells between cells in the Jacobian and preconditioner matrices");
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableWellOperabilityCheck, "Enable the well operability checking");


// for sequential
EWOMS_REGISTER_PARAM(TypeTag, int, MaxStrictIterSeq, "Maximum number of sequential iterations before relaxed tolerances are used for the CNV convergence criterion");
Expand All @@ -297,7 +297,7 @@ namespace Opm
EWOMS_REGISTER_PARAM(TypeTag, Scalar, TolerancePressure, "Relaxed local convergence tolerance that applies for iterations after the iterations with the strict tolerance for sequential transport");
EWOMS_REGISTER_PARAM(TypeTag, int, ReusePressureSolver, "Reuse policy for pressure");
EWOMS_REGISTER_PARAM(TypeTag, std::string, PressureSolverJson, "Json setupfile for pressure solver");
EWOMS_REGISTER_PARAM(TypeTag, std::string, SimulationType, "Define simulation type: default implicit");
EWOMS_REGISTER_PARAM(TypeTag, std::string, SimulationType, "Define simulation type: implicit, seq, fimseq, pressure");

}
};
Expand Down

0 comments on commit b751342

Please sign in to comment.