Modified sim_fibo_ad_cp to also allow running with EQUIL keyword.

With now generic implementation of the initStateEquil in opm-core
we added the necessary grid helper functionlality for CpGrid and activated
the processing if the EQUIL keyword is there.
This commit is contained in:
Markus Blatt
2015-02-20 12:23:35 +01:00
parent 1ba856ebfe
commit 007acfe018
3 changed files with 171 additions and 22 deletions

View File

@@ -198,7 +198,10 @@ try
}
}
} else if (deck->hasKeyword("EQUIL") && props->numPhases() == 3) {
OPM_THROW(std::logic_error, "sim_fibo_ad_cp does not support EQUIL initialization.");
state.init(grid->numCells(), grid->numFaces(), props->numPhases());
const double grav = param.getDefault("gravity", unit::gravity);
initStateEquil(*grid, *props, deck, eclipseState, grav, state);
state.faceflux().resize(grid->numFaces(), 0.0);
} else {
initBlackoilStateFromDeck(grid->numCells(), &(grid->globalCell())[0],
grid->numFaces(), UgGridHelpers::faceCells(*grid),