following interface change for processEcipseFormat

This commit is contained in:
Kai Bao
2021-04-15 23:36:21 +02:00
parent 9f360c5c6d
commit 06fa81f4e3
3 changed files with 9 additions and 10 deletions

View File

@@ -181,9 +181,6 @@ public:
protected: protected:
void createGrids_() void createGrids_()
{ {
const auto& gridProps = this->eclState().get3DProperties();
const std::vector<double>& porv = gridProps.getDoubleGridProperty("PORV").getData();
// we use separate grid objects: one for the calculation of the initial condition // we use separate grid objects: one for the calculation of the initial condition
// via EQUIL and one for the actual simulation. The reason is that the EQUIL code // via EQUIL and one for the actual simulation. The reason is that the EQUIL code
// cannot cope with arbitrary Dune grids and is also allergic to distributed // cannot cope with arbitrary Dune grids and is also allergic to distributed
@@ -194,10 +191,10 @@ protected:
///// /////
equilGrid_ = new EquilGrid(); equilGrid_ = new EquilGrid();
equilGrid_->processEclipseFormat(&(this->eclState().getInputGrid()), equilGrid_->processEclipseFormat(&(this->eclState().getInputGrid()),
&(this->eclState()),
/*isPeriodic=*/false, /*isPeriodic=*/false,
/*flipNormals=*/false, /*flipNormals=*/false,
/*clipZ=*/false, /*clipZ=*/false);
porv);
cartesianCellId_ = equilGrid_->globalCell(); cartesianCellId_ = equilGrid_->globalCell();

View File

@@ -344,18 +344,20 @@ public:
protected: protected:
void createGrids_() void createGrids_()
{ {
const EclipseGrid* input_grid = nullptr;
std::vector<double> global_porv; std::vector<double> global_porv;
// At this stage the ParallelEclipseState instance is still in global // At this stage the ParallelEclipseState instance is still in global
// view; on rank 0 we have undistributed data for the entire grid, on // view; on rank 0 we have undistributed data for the entire grid, on
// the other ranks the EclipseState is empty. // the other ranks the EclipseState is empty.
if (mpiRank == 0) { if (mpiRank == 0) {
input_grid = &this->eclState().getInputGrid();
global_porv = this->eclState().fieldProps().porv(true); global_porv = this->eclState().fieldProps().porv(true);
OpmLog::info("\nProcessing grid"); OpmLog::info("\nProcessing grid");
} }
grid_.reset(new Dune::CpGrid()); grid_.reset(new Dune::CpGrid());
const auto& removed_cells = grid_->processEclipseFormat(&this->eclState(), const auto& removed_cells = grid_->processEclipseFormat(input_grid,
&this->deck(), &this->eclState(),
/*isPeriodic=*/false, /*isPeriodic=*/false,
/*flipNormals=*/false, /*flipNormals=*/false,
/*clipZ=*/false); /*clipZ=*/false);
@@ -391,7 +393,7 @@ protected:
if (has_numerical_aquifer && mpiSize > 1) { if (has_numerical_aquifer && mpiSize > 1) {
auto nnc_input = this->eclState().getInputNNC(); auto nnc_input = this->eclState().getInputNNC();
Opm::EclMpiSerializer ser(Dune::MPIHelper::getCollectiveCommunication()); Opm::EclMpiSerializer ser(Dune::MPIHelper::getCollectiveCommunication());
ser.template broadcast(nnc_input); ser.broadcast(nnc_input);
if (mpiRank > 0) { if (mpiRank > 0) {
this->eclState().setInputNNC(nnc_input); this->eclState().setInputNNC(nnc_input);
} }

View File

@@ -71,8 +71,8 @@ BOOST_AUTO_TEST_CASE(diagnosis)
EclipseState eclState(deck); EclipseState eclState(deck);
typedef Dune::CpGrid Grid; typedef Dune::CpGrid Grid;
Grid grid = Grid(); Grid grid = Grid();
grid.processEclipseFormat(&eclState, grid.processEclipseFormat(&eclState.getInputGrid(),
&deck, &eclState,
/*isPeriodic=*/false, /*isPeriodic=*/false,
/*flipNormals=*/false, /*flipNormals=*/false,
/*clipZ=*/false); /*clipZ=*/false);