Added const to GridProperty::containsNan()

This commit is contained in:
Joakim Hove
2014-12-12 19:43:22 +01:00
parent 867fdb2de5
commit a100d94608
2 changed files with 4 additions and 3 deletions

View File

@@ -33,12 +33,13 @@ void GridProperty<double>::setDataPoint(size_t sourceIdx, size_t targetIdx, Opm:
}
template<>
bool GridProperty<int>::containsNaN( ) {
bool GridProperty<int>::containsNaN( ) const {
throw std::logic_error("Only <double> and can be meaningfully queried for nan");
}
template<>
bool GridProperty<double>::containsNaN( ) {
bool GridProperty<double>::containsNaN( ) const {
bool return_value = false;
size_t size = m_data.size();
size_t index = 0;

View File

@@ -205,7 +205,7 @@ public:
iset(g,value);
}
bool containsNaN();
bool containsNaN() const;
void multiplyWith(const GridProperty<T>& other) {
if ((m_nx == other.m_nx) && (m_ny == other.m_ny) && (m_nz == other.m_nz)) {