Make getPinchThresholdThickness() throw if isPinchActive() is false.

This commit is contained in:
Atgeirr Flø Rasmussen
2014-08-20 09:34:44 +02:00
parent 9d22253166
commit 03a74ade2d

View File

@@ -124,7 +124,11 @@ namespace Opm {
}
double EclipseGrid::getPinchThresholdThickness( ) const {
return m_pinch_threshold_thickness;
if (isPinchActive()) {
return m_pinch_threshold_thickness;
} else {
throw std::logic_error("cannot call getPinchThresholdThickness() when isPinchActive() is false");
}
}
void EclipseGrid::assertGlobalIndex(size_t globalIndex) const {