mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Templatize to avoid hardcoded typedef
Prepare for changing the size of the blocks by templatize BVectors and Evalution
This commit is contained in:
@@ -36,7 +36,6 @@ namespace detail {
|
||||
|
||||
|
||||
typedef AutoDiffBlock<double> ADB;
|
||||
typedef DenseAd::Evaluation<double, /*size=*/6> EvalWell;
|
||||
|
||||
|
||||
/**
|
||||
@@ -49,6 +48,7 @@ inline double zeroIfNan(const double& value) {
|
||||
/**
|
||||
* Returns zero if input value is NaN
|
||||
*/
|
||||
template <class EvalWell>
|
||||
inline double zeroIfNan(const EvalWell& value) {
|
||||
return (std::isnan(value.value())) ? 0.0 : value.value();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user