WellGroupControls: optionally instantiate for float

This commit is contained in:
Arne Morten Kvarving 2024-04-12 13:11:09 +02:00
parent a30b0a3cf5
commit 9080130d80

View File

@ -549,50 +549,56 @@ getGroupProductionTargetRate(const Group& group,
return scale;
}
template class WellGroupControls<double>;
#define INSTANTIATE(T,...) \
template void WellGroupControls<T>:: \
getGroupInjectionControl(const Group&, \
const WellState<T>&, \
const GroupState<T>&, \
const Schedule&, \
const SummaryState&, \
const InjectorType&, \
const __VA_ARGS__& bhp, \
const __VA_ARGS__& injection_rate, \
const RateConvFunc& rateConverter, \
T efficiencyFactor, \
__VA_ARGS__& control_eq, \
DeferredLogger& deferred_logger) const; \
template void WellGroupControls<T>:: \
getGroupProductionControl(const Group&, \
const WellState<T>&, \
const GroupState<T>&, \
const Schedule&, \
const SummaryState&, \
const __VA_ARGS__& bhp, \
const std::vector<__VA_ARGS__>&, \
const RateConvFunc& rateConverter, \
T efficiencyFactor, \
__VA_ARGS__& control_eq, \
DeferredLogger& deferred_logger) const;
#define INSTANCE(...) \
template void WellGroupControls<double>:: \
getGroupInjectionControl<__VA_ARGS__>(const Group&, \
const WellState<double>&, \
const GroupState<double>&, \
const Schedule&, \
const SummaryState&, \
const InjectorType&, \
const __VA_ARGS__& bhp, \
const __VA_ARGS__& injection_rate, \
const RateConvFunc& rateConverter, \
double efficiencyFactor, \
__VA_ARGS__& control_eq, \
DeferredLogger& deferred_logger) const; \
template void WellGroupControls<double>:: \
getGroupProductionControl<__VA_ARGS__>(const Group&, \
const WellState<double>&, \
const GroupState<double>&, \
const Schedule&, \
const SummaryState&, \
const __VA_ARGS__& bhp, \
const std::vector<__VA_ARGS__>&, \
const RateConvFunc& rateConverter, \
double efficiencyFactor, \
__VA_ARGS__& control_eq, \
DeferredLogger& deferred_logger) const; \
#define INSTANTIATE_TYPE(T) \
template class WellGroupControls<T>; \
INSTANTIATE(T,DenseAd::Evaluation<T,3,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,4,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,5,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,6,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,7,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,8,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,9,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,10,0u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,4u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,5u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,6u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,7u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,8u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,9u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,10u>) \
INSTANTIATE(T,DenseAd::Evaluation<T,-1,11u>)
INSTANCE(DenseAd::Evaluation<double,3,0u>)
INSTANCE(DenseAd::Evaluation<double,4,0u>)
INSTANCE(DenseAd::Evaluation<double,5,0u>)
INSTANCE(DenseAd::Evaluation<double,6,0u>)
INSTANCE(DenseAd::Evaluation<double,7,0u>)
INSTANCE(DenseAd::Evaluation<double,8,0u>)
INSTANCE(DenseAd::Evaluation<double,9,0u>)
INSTANCE(DenseAd::Evaluation<double,10,0u>)
INSTANCE(DenseAd::Evaluation<double,-1,4u>)
INSTANCE(DenseAd::Evaluation<double,-1,5u>)
INSTANCE(DenseAd::Evaluation<double,-1,6u>)
INSTANCE(DenseAd::Evaluation<double,-1,7u>)
INSTANCE(DenseAd::Evaluation<double,-1,8u>)
INSTANCE(DenseAd::Evaluation<double,-1,9u>)
INSTANCE(DenseAd::Evaluation<double,-1,10u>)
INSTANCE(DenseAd::Evaluation<double,-1,11u>)
INSTANTIATE_TYPE(double)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_TYPE(float)
#endif
} // namespace Opm