mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
af2f3a0a90
commit
67200b54e6
@ -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];
|
||||
}
|
||||
|
@ -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.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user