Communicate rock properties, too.

Somehow I was mislead by the name rock properties that the data stored in
them is not associated to grid cells, but to rock regions. With this commit
we determine the porosity and permeability by communication.
This commit is contained in:
Markus Blatt 2015-10-26 10:39:59 +01:00
parent fe1ba16e40
commit 87e02a1059
2 changed files with 17 additions and 4 deletions

View File

@ -119,6 +119,7 @@ namespace Opm
/// Constructor for properties on a subgrid
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck& props,
const int number_of_cells)
: rock_(number_of_cells)
{
const int original_size = props.cellPvtRegionIdx_.size();
if (number_of_cells > original_size) {
@ -131,7 +132,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
materialLawManager_ = props.materialLawManager_;
// Copy properties that do not depend on the postion within the grid.
rock_ = props.rock_;
satprops_ = props.satprops_;
phase_usage_ = props.phase_usage_;
props_ = props.props_;

View File

@ -242,7 +242,7 @@ public:
BlackoilPropsDataHandle(const BlackoilPropsAdFromDeck& sendProps,
BlackoilPropsAdFromDeck& recvProps)
: sendProps_(sendProps), recvProps_(recvProps),
size_(1)
size_(11)
{
// satOilMax might be non empty. In this case we will need to send it, too.
// It has to have the same size as the cellPvtRegionIdx_
@ -278,7 +278,12 @@ public:
assert( T::codimension == 0);
buffer.write(sendProps_.cellPvtRegionIndex()[e.index()]);
if ( size_ > 1 ) {
for( std::size_t i = 0; i < 9; ++i )
{
buffer.write(sendProps_.rock_.permeability_[e.index()*9+i]);
}
buffer.write(sendProps_.rock_.porosity_[e.index()]);
if ( size_ > 11 ) {
buffer.write(sendProps_.satOilMax_[e.index()]);
}
}
@ -290,7 +295,15 @@ public:
double val;
buffer.read(val);
recvProps_.cellPvtRegionIdx_[e.index()]=val;
if ( size_ > 1 ) {
for( std::size_t i = 0; i < 9; ++i )
{
buffer.read(val);
recvProps_.rock_.permeability_[e.index()*9+i]
= val;
}
buffer.read(val);
recvProps_.rock_.porosity_[e.index()]=val;
if ( size_ > 11 ) {
buffer.read(val);
recvProps_.satOilMax_[e.index()]=val;
}