Merge pull request #1207 from atgeirr/utility-fixes

Utility fixes
This commit is contained in:
Arne Morten Kvarving 2018-01-11 16:02:20 +01:00 committed by GitHub
commit 6c9365ac17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 35 deletions

View File

@ -27,7 +27,6 @@
#include <utility>
#include <opm/common/ErrorMacros.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp>
#include <opm/core/utility/linearInterpolation.hpp>
@ -50,14 +49,9 @@ namespace Opm
/// @brief Construct from vectors of x and y values.
/// @param x_values vector of domain values
/// @param y_values vector of corresponding range values.
NonuniformTableLinear(const std::vector<double>& x_values,
const std::vector<T>& y_values);
NonuniformTableLinear(const TableColumn& x_column,
const std::vector<T>& y_values);
NonuniformTableLinear(const TableColumn& x_column,
const TableColumn& y_column);
template<class XContainer, class YContainer>
NonuniformTableLinear(const XContainer& x_values,
const YContainer& y_values);
/// @brief Get the domain.
/// @return the domain as a pair of doubles.
@ -130,10 +124,11 @@ namespace Opm
template<typename T>
template<class XContainer, class YContainer>
inline
NonuniformTableLinear<T>
::NonuniformTableLinear(const TableColumn& x_column,
const TableColumn& y_column)
::NonuniformTableLinear(const XContainer& x_column,
const YContainer& y_column)
: x_values_( x_column.begin() , x_column.end()),
y_values_( y_column.begin() , y_column.end())
{
@ -141,29 +136,6 @@ namespace Opm
}
template<typename T>
inline
NonuniformTableLinear<T>
::NonuniformTableLinear(const TableColumn& x_column,
const std::vector<T>& y_values)
: x_values_( x_column.begin() , x_column.end()),
y_values_(y_values)
{
assert(isNondecreasing(x_values_.begin(), x_values_.end()));
}
template<typename T>
inline
NonuniformTableLinear<T>
::NonuniformTableLinear(const std::vector<double>& x_values,
const std::vector<T>& y_values)
: x_values_(x_values), y_values_(y_values)
{
assert(isNondecreasing(x_values.begin(), x_values.end()));
}
template<typename T>
inline std::pair<double, double>
NonuniformTableLinear<T>

View File

@ -40,7 +40,6 @@
#include <vector>
#include <numeric>
#include <algorithm>
#include <boost/range/iterator_range.hpp>
#include <opm/common/ErrorMacros.hpp>
namespace Opm