Allow the rock properties to be zero initialized without a deck.

This is needed in parallel runs where the rock properties will not
be read from the deck but be communicated from a master process. Nevertheless
we need to be able to initialize the data structures with the correct
container size. In addition we need to be able to change the container values
from opm-autodiff's BlackoilPropsDataHandle.
This commit is contained in:
Markus Blatt 2015-10-26 10:28:42 +01:00
parent c65ad8292b
commit c0e2d7748c
2 changed files with 14 additions and 1 deletions

View File

@ -72,6 +72,13 @@ namespace Opm
{
}
RockFromDeck::RockFromDeck(std::size_t number_of_cells)
: porosity_(number_of_cells, 0),
permeability_(number_of_cells*9, 0.0),
permfield_valid_(number_of_cells, false)
{
}
void RockFromDeck::init(Opm::EclipseStateConstPtr eclState,
int number_of_cells, const int* global_cell,
const int* cart_dims)

View File

@ -31,10 +31,16 @@ namespace Opm
class RockFromDeck
{
// BlackoilPropsDataHandle needs mutable
// access to porosity and permeability
friend class BlackoilPropsDataHandle;
public:
/// Default constructor.
RockFromDeck();
/// Creates rock properties with zero porosity and permeability
/// \param number_of_cells The number of cells
RockFromDeck(std::size_t number_of_cells);
/// Initialize from deck and cell mapping.
/// \param eclState The EclipseState (processed deck) produced by the opm-parser code
/// \param number_of_cells The number of cells in the grid.