Merge pull request #918 from blattms/allow-zero-initialization-of-rock-properties

Allow the rock properties to be zero initialized without a deck.
This commit is contained in:
Atgeirr Flø Rasmussen 2015-10-28 13:21:16 +01:00
commit 9de17c38d3
2 changed files with 15 additions and 1 deletions

View File

@ -72,6 +72,14 @@ namespace Opm
{
}
RockFromDeck::RockFromDeck(std::size_t number_of_cells)
: porosity_(number_of_cells, 0),
// full permeability tensor in 3D stores 9 scalars
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
explicit 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.