Added small method to check if cell is active.

This commit is contained in:
Joakim Hove
2014-11-16 20:07:03 +01:00
parent 56b7f4e8c0
commit b2fbbfc8a7
2 changed files with 12 additions and 0 deletions

View File

@@ -490,7 +490,17 @@ namespace Opm {
return static_cast<size_t>(ecl_grid_get_nactive( c_ptr() ));
}
bool EclipseGrid::cellActive( size_t globalIndex ) const {
assertGlobalIndex( globalIndex );
return ecl_grid_cell_active1( c_ptr() , static_cast<int>(globalIndex));
}
bool EclipseGrid::cellActive( size_t i , size_t j , size_t k ) const {
assertIJK(i,j,k);
return ecl_grid_cell_active3( c_ptr() , static_cast<int>(i),static_cast<int>(j),static_cast<int>(k));
}
double EclipseGrid::getCellVolume(size_t globalIndex) const {
assertGlobalIndex( globalIndex );
return ecl_grid_get_cell_volume1( c_ptr() , static_cast<int>(globalIndex));

View File

@@ -89,6 +89,8 @@ namespace Opm {
std::tuple<double,double,double> getCellCenter(size_t globalIndex) const;
double getCellVolume(size_t globalIndex) const;
double getCellVolume(size_t i , size_t j , size_t k) const;
bool cellActive( size_t globalIndex ) const;
bool cellActive( size_t i , size_t , size_t k ) const;
void exportMAPAXES( std::vector<double>& mapaxes) const;
void exportCOORD( std::vector<double>& coord) const;