mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
SaturationPropsFromDeck: add the code to calculate all saturation properties using opm-material
also remove the now obsolete code in that class.
This commit is contained in:
@@ -32,7 +32,20 @@ namespace Opm
|
||||
{
|
||||
rock_.init(eclState, grid.number_of_cells, grid.global_cell, grid.cartdims);
|
||||
pvt_.init(deck);
|
||||
satprops_.init(deck, eclState, grid);
|
||||
auto materialLawManager = std::make_shared<typename SaturationPropsFromDeck::MaterialLawManager>();
|
||||
|
||||
std::vector<int> compressedToCartesianIdx(grid.number_of_cells);
|
||||
for (unsigned cellIdx = 0; cellIdx < grid.number_of_cells; ++cellIdx) {
|
||||
if (grid.global_cell) {
|
||||
compressedToCartesianIdx[cellIdx] = grid.global_cell[cellIdx];
|
||||
}
|
||||
else {
|
||||
compressedToCartesianIdx[cellIdx] = cellIdx;
|
||||
}
|
||||
}
|
||||
materialLawManager->initFromDeck(deck, eclState, compressedToCartesianIdx);
|
||||
|
||||
satprops_.init(deck, eclState, materialLawManager, grid);
|
||||
if (pvt_.numPhases() != satprops_.numPhases()) {
|
||||
OPM_THROW(std::runtime_error, "IncompPropertiesFromDeck::IncompPropertiesFromDeck() - Inconsistent number of phases in pvt data ("
|
||||
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
||||
|
||||
Reference in New Issue
Block a user