Implement low-level init() routines

These are needed by the initialisation routines of the refactored
opm-core (PR OPM/opm-core#518) that introduces support for parallel
grids.
This commit is contained in:
Bård Skaflestad 2014-04-14 23:52:50 +02:00
parent cd6a51cb29
commit 4c0e0c8361
2 changed files with 16 additions and 6 deletions

View File

@ -35,9 +35,14 @@ namespace Opm
public:
void init(const UnstructuredGrid& g, int num_phases)
{
state_blackoil_.init(g, num_phases);
concentration_.resize(g.number_of_cells, 0.0);
cmax_.resize(g.number_of_cells, 0.0);
this->init(g.number_of_cells, g.number_of_faces, num_phases);
}
void init(int number_of_cells, int number_of_faces, int num_phases)
{
state_blackoil_.init(number_of_cells, number_of_faces, num_phases);
concentration_.resize(number_of_cells, 0.0);
cmax_.resize(number_of_cells, 0.0);
}
enum ExtremalSat { MinSat = BlackoilState::MinSat, MaxSat = BlackoilState::MaxSat };

View File

@ -34,9 +34,14 @@ namespace Opm
public:
void init(const UnstructuredGrid& g, int num_phases)
{
state2p_.init(g, num_phases);
concentration_.resize(g.number_of_cells, 0.0);
cmax_.resize(g.number_of_cells, 0.0);
this->init(g.number_of_cells, g.number_of_faces, num_phases);
}
void init(int number_of_cells, int number_of_faces, int num_phases)
{
state2p_.init(number_of_cells, number_of_faces, num_phases);
concentration_.resize(number_of_cells, 0.0);
cmax_.resize(number_of_cells, 0.0);
}
enum ExtremalSat { MinSat = TwophaseState::MinSat, MaxSat = TwophaseState::MaxSat };