mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
replace boost::optional with std::optional
This commit is contained in:
@@ -462,15 +462,15 @@ namespace Opm
|
||||
bool allDrawDownWrongDirection(const Simulator& ebos_simulator) const;
|
||||
|
||||
|
||||
boost::optional<double> computeBhpAtThpLimitProd(const Simulator& ebos_simulator,
|
||||
const std::vector<Scalar>& B_avg,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
std::optional<double> computeBhpAtThpLimitProd(const Simulator& ebos_simulator,
|
||||
const std::vector<Scalar>& B_avg,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
boost::optional<double> computeBhpAtThpLimitInj(const Simulator& ebos_simulator,
|
||||
const std::vector<Scalar>& B_avg,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
std::optional<double> computeBhpAtThpLimitInj(const Simulator& ebos_simulator,
|
||||
const std::vector<Scalar>& B_avg,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
double maxPerfPress(const Simulator& ebos_simulator) const;
|
||||
|
||||
|
||||
@@ -3546,7 +3546,7 @@ namespace Opm
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
boost::optional<double>
|
||||
std::optional<double>
|
||||
MultisegmentWell<TypeTag>::
|
||||
computeBhpAtThpLimitProd(const Simulator& ebos_simulator,
|
||||
const std::vector<Scalar>& B_avg,
|
||||
@@ -3628,7 +3628,7 @@ namespace Opm
|
||||
// empty optional.
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE_INOPERABLE",
|
||||
"Robust bhp(thp) solve failed due to inoperability for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
} else {
|
||||
// Still producing, even at high bhp.
|
||||
assert(f_high < 0.0);
|
||||
@@ -3712,7 +3712,7 @@ namespace Opm
|
||||
// Return failure.
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE_BRACKETING_FAILURE",
|
||||
"Robust bhp(thp) solve failed due to bracketing failure for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3738,7 +3738,7 @@ namespace Opm
|
||||
catch (...) {
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE",
|
||||
"Robust bhp(thp) solve failed for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3746,7 +3746,7 @@ namespace Opm
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
boost::optional<double>
|
||||
std::optional<double>
|
||||
MultisegmentWell<TypeTag>::
|
||||
computeBhpAtThpLimitInj(const Simulator& ebos_simulator,
|
||||
const std::vector<Scalar>& B_avg,
|
||||
@@ -3906,7 +3906,7 @@ namespace Opm
|
||||
|
||||
// Handle the no solution case.
|
||||
if (sign_change_index == -1) {
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
|
||||
// Solve for the proper solution in the given interval.
|
||||
@@ -3925,7 +3925,7 @@ namespace Opm
|
||||
assert(low == controls.bhp_limit);
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE",
|
||||
"Robust bhp(thp) solve failed for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
try {
|
||||
const double solved_bhp = RegulaFalsiBisection<WarnAndContinueOnError>::
|
||||
@@ -3939,7 +3939,7 @@ namespace Opm
|
||||
catch (...) {
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE",
|
||||
"Robust bhp(thp) solve failed for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <dune/common/dynvector.hh>
|
||||
#include <dune/common/dynmatrix.hh>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <optional>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@@ -509,13 +509,13 @@ namespace Opm
|
||||
DeferredLogger& deferred_logger);
|
||||
|
||||
|
||||
boost::optional<double> computeBhpAtThpLimitProd(const Simulator& ebos_simulator,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
std::optional<double> computeBhpAtThpLimitProd(const Simulator& ebos_simulator,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
boost::optional<double> computeBhpAtThpLimitInj(const Simulator& ebos_simulator,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
std::optional<double> computeBhpAtThpLimitInj(const Simulator& ebos_simulator,
|
||||
const SummaryState& summary_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -3759,7 +3759,7 @@ namespace Opm
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
boost::optional<double>
|
||||
std::optional<double>
|
||||
StandardWell<TypeTag>::
|
||||
computeBhpAtThpLimitProd(const Simulator& ebos_simulator,
|
||||
const SummaryState& summary_state,
|
||||
@@ -3923,7 +3923,7 @@ namespace Opm
|
||||
|
||||
// Handle the no solution case.
|
||||
if (sign_change_index == -1) {
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
|
||||
// Solve for the proper solution in the given interval.
|
||||
@@ -3942,7 +3942,7 @@ namespace Opm
|
||||
assert(low == controls.bhp_limit);
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE",
|
||||
"Robust bhp(thp) solve failed for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
try {
|
||||
const double solved_bhp = RegulaFalsiBisection<>::
|
||||
@@ -3956,7 +3956,7 @@ namespace Opm
|
||||
catch (...) {
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE",
|
||||
"Robust bhp(thp) solve failed for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3964,7 +3964,7 @@ namespace Opm
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
boost::optional<double>
|
||||
std::optional<double>
|
||||
StandardWell<TypeTag>::
|
||||
computeBhpAtThpLimitInj(const Simulator& ebos_simulator,
|
||||
const SummaryState& summary_state,
|
||||
@@ -4123,7 +4123,7 @@ namespace Opm
|
||||
|
||||
// Handle the no solution case.
|
||||
if (sign_change_index == -1) {
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
|
||||
// Solve for the proper solution in the given interval.
|
||||
@@ -4142,7 +4142,7 @@ namespace Opm
|
||||
assert(low == controls.bhp_limit);
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE",
|
||||
"Robust bhp(thp) solve failed for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
try {
|
||||
const double solved_bhp = RegulaFalsiBisection<>::
|
||||
@@ -4156,7 +4156,7 @@ namespace Opm
|
||||
catch (...) {
|
||||
deferred_logger.warning("FAILED_ROBUST_BHP_THP_SOLVE",
|
||||
"Robust bhp(thp) solve failed for well " + name());
|
||||
return boost::optional<double>();
|
||||
return std::optional<double>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user