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:
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
// 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
@ -194,10 +191,10 @@ protected:
/////
equilGrid_ = new EquilGrid();
equilGrid_->processEclipseFormat(&(this->eclState().getInputGrid()),
&(this->eclState()),
/*isPeriodic=*/false,
/*flipNormals=*/false,
/*clipZ=*/false,
porv);
/*clipZ=*/false);
cartesianCellId_ = equilGrid_->globalCell();

View File

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

View File

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