mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove pvtTableIdx_ from BlackoilPropsAdFromDeck.
It was not used by the properties, this commit also fixes the bug that pvtTableIdx_ was initialized instead of cellPvtRegionIdx_.
This commit is contained in:
@@ -90,7 +90,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
|||||||
// For data that is dependant on the subgrid we simply allocate space
|
// For data that is dependant on the subgrid we simply allocate space
|
||||||
// and initialize with obviously bogus numbers.
|
// and initialize with obviously bogus numbers.
|
||||||
cellPvtRegionIdx_.resize(number_of_cells, std::numeric_limits<int>::min());
|
cellPvtRegionIdx_.resize(number_of_cells, std::numeric_limits<int>::min());
|
||||||
pvtTableIdx_.resize(number_of_cells, std::numeric_limits<int>::min());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initializes the properties.
|
/// Initializes the properties.
|
||||||
@@ -139,7 +138,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
|||||||
// first, calculate the PVT table index for each compressed
|
// first, calculate the PVT table index for each compressed
|
||||||
// cell. This array is required to construct the PVT classes
|
// cell. This array is required to construct the PVT classes
|
||||||
// below.
|
// below.
|
||||||
Opm::extractPvtTableIndex(pvtTableIdx_,
|
Opm::extractPvtTableIndex(cellPvtRegionIdx_,
|
||||||
deck,
|
deck,
|
||||||
number_of_cells,
|
number_of_cells,
|
||||||
global_cell);
|
global_cell);
|
||||||
|
|||||||
@@ -477,15 +477,7 @@ namespace Opm
|
|||||||
// The PVT properties. One object per active fluid phase.
|
// The PVT properties. One object per active fluid phase.
|
||||||
std::vector<std::shared_ptr<Opm::PvtInterface> > props_;
|
std::vector<std::shared_ptr<Opm::PvtInterface> > props_;
|
||||||
|
|
||||||
// The index of the PVT table which ought to be used for each
|
// Densities, one std::array per PVT region.
|
||||||
// cell. Eclipse does not seem to allow specifying fluid-phase
|
|
||||||
// specific table indices, so for the sake of simplicity, we
|
|
||||||
// don't do this either. (if it turns out that Eclipes does in
|
|
||||||
// fact support it or if it by some miracle gains this feature
|
|
||||||
// in the future, this attribute needs to become a vector of
|
|
||||||
// vectors of ints.)
|
|
||||||
std::vector<int> pvtTableIdx_;
|
|
||||||
|
|
||||||
std::vector<std::array<double, BlackoilPhases::MaxNumPhases> > densities_;
|
std::vector<std::array<double, BlackoilPhases::MaxNumPhases> > densities_;
|
||||||
|
|
||||||
// VAPPARS
|
// VAPPARS
|
||||||
|
|||||||
@@ -145,12 +145,12 @@ public:
|
|||||||
BlackoilPropsDataHandle(const BlackoilPropsAdFromDeck& sendProps,
|
BlackoilPropsDataHandle(const BlackoilPropsAdFromDeck& sendProps,
|
||||||
BlackoilPropsAdFromDeck& recvProps)
|
BlackoilPropsAdFromDeck& recvProps)
|
||||||
: sendProps_(sendProps), recvProps_(recvProps),
|
: sendProps_(sendProps), recvProps_(recvProps),
|
||||||
size_(2)
|
size_(1)
|
||||||
{
|
{
|
||||||
// satOilMax might be non empty. In this case we will need to send it, too.
|
// satOilMax might be non empty. In this case we will need to send it, too.
|
||||||
if ( sendProps.satOilMax_.size()>0 )
|
if ( sendProps.satOilMax_.size()>0 )
|
||||||
{
|
{
|
||||||
recvProps_.satOilMax_.resize(recvProps_.pvtTableIdx_.size(),
|
recvProps_.satOilMax_.resize(recvProps_.satOilMax_.size(),
|
||||||
-std::numeric_limits<double>::max());
|
-std::numeric_limits<double>::max());
|
||||||
++size_;
|
++size_;
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ public:
|
|||||||
{
|
{
|
||||||
if ( T::codimension == 0)
|
if ( T::codimension == 0)
|
||||||
{
|
{
|
||||||
// We only send pvtTableIdx_, cellPvtRegionIdx_, and maybe satOilMax_
|
// We only send cellPvtRegionIdx_, and maybe satOilMax_
|
||||||
return size_;
|
return size_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -180,12 +180,9 @@ public:
|
|||||||
assert( T::codimension == 0);
|
assert( T::codimension == 0);
|
||||||
|
|
||||||
buffer.write(sendProps_.cellPvtRegionIndex()[e.index()]);
|
buffer.write(sendProps_.cellPvtRegionIndex()[e.index()]);
|
||||||
buffer.write(sendProps_.pvtTableIdx_[e.index()]);
|
if ( size_ > 1 ) {
|
||||||
if ( size_==2 )
|
buffer.write(sendProps_.satOilMax_[e.index()]);
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
buffer.write(sendProps_.satOilMax_[e.index()]);
|
|
||||||
}
|
}
|
||||||
template<class B, class T>
|
template<class B, class T>
|
||||||
void scatter(B& buffer, const T& e, std::size_t size)
|
void scatter(B& buffer, const T& e, std::size_t size)
|
||||||
@@ -195,12 +192,10 @@ public:
|
|||||||
double val;
|
double val;
|
||||||
buffer.read(val);
|
buffer.read(val);
|
||||||
recvProps_.cellPvtRegionIdx_[e.index()]=val;
|
recvProps_.cellPvtRegionIdx_[e.index()]=val;
|
||||||
buffer.read(val);
|
if ( size_ > 1 ) {
|
||||||
recvProps_.pvtTableIdx_[e.index()]=val;
|
buffer.read(val);
|
||||||
if ( size_==2 )
|
recvProps_.satOilMax_[e.index()]=val;
|
||||||
return;
|
}
|
||||||
buffer.read(val);
|
|
||||||
recvProps_.satOilMax_[e.index()]=val;
|
|
||||||
}
|
}
|
||||||
bool contains(int dim, int codim)
|
bool contains(int dim, int codim)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user