SimulatorState: export num_cells_ and num_faces_ and allow to register data from any

class. This is needed in the parallel output class. A formal interface for the state
class needs to be introduced.
This commit is contained in:
Robert Kloefkorn 2015-07-23 12:07:49 +02:00
parent af2f3a0a90
commit 67200b54e6
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ namespace Opm
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) {
for (int cellIdx = 0; cellIdx < grid.number_of_cells; ++cellIdx) {
if (grid.global_cell) {
compressedToCartesianIdx[cellIdx] = grid.global_cell[cellIdx];
}

View File

@ -470,7 +470,7 @@ namespace Opm
State& state)
{
initStateBasic(grid.number_of_cells, grid.global_cell, grid.cartdims,
grid.number_of_faces, UgGridHelpers::faceCells(grid),
grid.number_of_faces, UgGridHelpers::faceCells(grid),
grid.face_centroids, grid.cell_centroids, grid.dimensions,
props, param, gravity, state);
}
@ -716,7 +716,7 @@ namespace Opm
}
}
}
}
}
/// Initialize surface volume from pressure and saturation by z = As.
/// Here the solution gas/oil ratio or vapor oil/gas ratio is used to
/// compute an intial z for the computation of A.
@ -733,7 +733,7 @@ namespace Opm
const Props& props,
State& state)
{
if (props.numPhases() != 3) {
OPM_THROW(std::runtime_error, "initBlackoilSurfvol() is only supported in three-phase simulations.");
}