mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
using template instead of pointer to function
for functions checkMaxRatioLimitWell and checkMaxRatioLimitCompletions
This commit is contained in:
parent
b27a646b98
commit
e0bd33db43
@ -392,13 +392,15 @@ namespace Opm
|
|||||||
const WellState& well_state,
|
const WellState& well_state,
|
||||||
Opm::DeferredLogger& deferred_logger) const;
|
Opm::DeferredLogger& deferred_logger) const;
|
||||||
|
|
||||||
|
template <typename RatioFunc>
|
||||||
bool checkMaxRatioLimitWell(const WellState& well_state,
|
bool checkMaxRatioLimitWell(const WellState& well_state,
|
||||||
const double max_ratio_limit,
|
const double max_ratio_limit,
|
||||||
double (*ratioFunc)(const std::vector<double>&, const PhaseUsage&) ) const;
|
const RatioFunc& ratioFunc) const;
|
||||||
|
|
||||||
|
template <typename RatioFunc>
|
||||||
void checkMaxRatioLimitCompletions(const WellState& well_state,
|
void checkMaxRatioLimitCompletions(const WellState& well_state,
|
||||||
const double max_ratio_limit,
|
const double max_ratio_limit,
|
||||||
double (*ratioFunc)(const std::vector<double>&, const PhaseUsage&),
|
const RatioFunc& ratioFunc,
|
||||||
int& worst_offending_completion,
|
int& worst_offending_completion,
|
||||||
double& violation_extent) const;
|
double& violation_extent) const;
|
||||||
|
|
||||||
|
@ -706,11 +706,12 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
|
template<typename RatioFunc>
|
||||||
bool
|
bool
|
||||||
WellInterface<TypeTag>::
|
WellInterface<TypeTag>::
|
||||||
checkMaxRatioLimitWell(const WellState& well_state,
|
checkMaxRatioLimitWell(const WellState& well_state,
|
||||||
const double max_ratio_limit,
|
const double max_ratio_limit,
|
||||||
double (*ratioFunc)(const std::vector<double>&, const PhaseUsage&)) const
|
const RatioFunc& ratioFunc) const
|
||||||
{
|
{
|
||||||
const int np = number_of_phases_;
|
const int np = number_of_phases_;
|
||||||
|
|
||||||
@ -729,11 +730,12 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
|
template<typename RatioFunc>
|
||||||
void
|
void
|
||||||
WellInterface<TypeTag>::
|
WellInterface<TypeTag>::
|
||||||
checkMaxRatioLimitCompletions(const WellState& well_state,
|
checkMaxRatioLimitCompletions(const WellState& well_state,
|
||||||
const double max_ratio_limit,
|
const double max_ratio_limit,
|
||||||
double (*ratioFunc)(const std::vector<double>&, const PhaseUsage&),
|
const RatioFunc& ratioFunc,
|
||||||
int& worst_offending_completion,
|
int& worst_offending_completion,
|
||||||
double& violation_extent) const
|
double& violation_extent) const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user