Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions opm/simulators/flow/FlowGenericProblem_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,25 @@ FlowGenericProblem(const EclipseState& eclState,
// 2. EQLDIMS item 2. Default value from
// opm-common/opm/input/eclipse/share/keywords/000_Eclipse100/E/EQLDIMS

numPressurePointsEquil_ = Parameters::IsSet<Parameters::NumPressurePointsEquil>()
? Parameters::Get<Parameters::NumPressurePointsEquil>()
: eclState.getTableManager().getEqldims().getNumDepthNodesP();
if (Parameters::IsSet<Parameters::NumPressurePointsEquil>()) {
numPressurePointsEquil_ = Parameters::Get<Parameters::NumPressurePointsEquil>();
if (numPressurePointsEquil_ < 1) {
throw std::invalid_argument {
fmt::format("--num-pressure-points-equil must be at least 1, "
"but {} was given.", numPressurePointsEquil_)
};
}
}
else {
numPressurePointsEquil_ = eclState.getTableManager().getEqldims().getNumDepthNodesP();
if (numPressurePointsEquil_ < 1) {
throw std::invalid_argument {
fmt::format("EQLDIMS item 2, the number of depth nodes in the "
"equilibration pressure tables, must be at least 1, "
"but {} was given.", numPressurePointsEquil_)
};
}
}

explicitRockCompaction_ = Parameters::Get<Parameters::ExplicitRockCompaction>();
}
Expand Down
5 changes: 5 additions & 0 deletions opm/simulators/flow/equil/InitStateEquil_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ RK4IVP<Scalar,RHS>::RK4IVP(const RHS& f,
: N_(N)
, span_(span)
{
// stepsize() divides by N_ and operator() evaluates interval N_ - 1. A
// non-positive sample count is rejected when the value is loaded in
// FlowGenericProblem, where its source is known.
assert(N >= 1);

const Scalar h = stepsize();
const Scalar h2 = h / 2;
const Scalar h6 = h / 6;
Expand Down