mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 01:01:00 -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,
|
||||
Opm::DeferredLogger& deferred_logger) const;
|
||||
|
||||
template <typename RatioFunc>
|
||||
bool checkMaxRatioLimitWell(const WellState& well_state,
|
||||
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,
|
||||
const double max_ratio_limit,
|
||||
double (*ratioFunc)(const std::vector<double>&, const PhaseUsage&),
|
||||
const RatioFunc& ratioFunc,
|
||||
int& worst_offending_completion,
|
||||
double& violation_extent) const;
|
||||
|
||||
|
@ -706,11 +706,12 @@ namespace Opm
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
template<typename RatioFunc>
|
||||
bool
|
||||
WellInterface<TypeTag>::
|
||||
checkMaxRatioLimitWell(const WellState& well_state,
|
||||
const double max_ratio_limit,
|
||||
double (*ratioFunc)(const std::vector<double>&, const PhaseUsage&)) const
|
||||
const RatioFunc& ratioFunc) const
|
||||
{
|
||||
const int np = number_of_phases_;
|
||||
|
||||
@ -729,11 +730,12 @@ namespace Opm
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
template<typename RatioFunc>
|
||||
void
|
||||
WellInterface<TypeTag>::
|
||||
checkMaxRatioLimitCompletions(const WellState& well_state,
|
||||
const double max_ratio_limit,
|
||||
double (*ratioFunc)(const std::vector<double>&, const PhaseUsage&),
|
||||
const RatioFunc& ratioFunc,
|
||||
int& worst_offending_completion,
|
||||
double& violation_extent) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user