Added method saveEGRID() on GridManager
This commit is contained in:
parent
8c32146093
commit
59b99f7444
@ -115,7 +115,19 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GridManager::saveEGRID(const std::string& filename , const Opm::EclipseGridParser& deck) {
|
||||
int global_size = ug_->cartdims[0] * ug_->cartdims[1] * ug_->cartdims[2];
|
||||
std::vector<int> actnum(global_size);
|
||||
|
||||
if (ug_->global_cell) {
|
||||
actnum.assign( actnum.size() , 0 );
|
||||
for (int c=0; c < ug_->number_of_cells; c++)
|
||||
actnum[ug_->global_cell[c]] = 1;
|
||||
} else
|
||||
actnum.assign( actnum.size() , 1 );
|
||||
|
||||
deck.saveEGRID( "FILE.EGRID" , actnum );
|
||||
}
|
||||
|
||||
|
||||
/// Destructor.
|
||||
@ -136,7 +148,6 @@ namespace Opm
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Construct corner-point grid from deck.
|
||||
void GridManager::initFromDeckCornerpoint(const Opm::EclipseGridParser& deck)
|
||||
{
|
||||
|
@ -65,6 +65,8 @@ namespace Opm
|
||||
/// Destructor.
|
||||
~GridManager();
|
||||
|
||||
void saveEGRID(const std::string& filename , const Opm::EclipseGridParser& deck);
|
||||
|
||||
/// Access the managed UnstructuredGrid.
|
||||
/// The method is named similarly to c_str() in std::string,
|
||||
/// to make it clear that we are returning a C-compatible struct.
|
||||
|
Loading…
Reference in New Issue
Block a user