Added EclipseGrid::allActive() convenience method.

This commit is contained in:
Joakim Hove
2016-09-07 16:09:19 +02:00
parent 489602c51c
commit 15588fe7ca
2 changed files with 5 additions and 0 deletions

View File

@@ -574,6 +574,10 @@ namespace Opm {
return static_cast<size_t>(ecl_grid_get_nactive( c_ptr() ));
}
bool EclipseGrid::allActive( ) const {
return (getNumActive() == getCartesianSize());
}
bool EclipseGrid::cellActive( size_t globalIndex ) const {
assertGlobalIndex( globalIndex );
return ecl_grid_cell_active1( c_ptr() , static_cast<int>(globalIndex));

View File

@@ -83,6 +83,7 @@ namespace Opm {
static bool hasCornerPointKeywords(const Deck&);
static bool hasCartesianKeywords(const Deck&);
size_t getNumActive( ) const;
bool allActive() const;
size_t activeIndex(size_t i, size_t j, size_t k) const;
size_t activeIndex(size_t globalIndex) const;