mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -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:
parent
ba86dc191c
commit
635fea1cad
@ -90,7 +90,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
// For data that is dependant on the subgrid we simply allocate space
|
||||
// and initialize with obviously bogus numbers.
|
||||
cellPvtRegionIdx_.resize(number_of_cells, std::numeric_limits<int>::min());
|
||||
pvtTableIdx_.resize(number_of_cells, std::numeric_limits<int>::min());
|
||||
}
|
||||
|
||||
/// Initializes the properties.
|
||||
@ -139,7 +138,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
// first, calculate the PVT table index for each compressed
|
||||
// cell. This array is required to construct the PVT classes
|
||||
// below.
|
||||
Opm::extractPvtTableIndex(pvtTableIdx_,
|
||||
Opm::extractPvtTableIndex(cellPvtRegionIdx_,
|
||||
deck,
|
||||
number_of_cells,
|
||||
global_cell);
|
||||
|
@ -477,15 +477,7 @@ namespace Opm
|
||||
// The PVT properties. One object per active fluid phase.
|
||||
std::vector<std::shared_ptr<Opm::PvtInterface> > props_;
|
||||
|
||||
// The index of the PVT table which ought to be used for each
|
||||
// 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_;
|
||||
|
||||
// Densities, one std::array per PVT region.
|
||||
std::vector<std::array<double, BlackoilPhases::MaxNumPhases> > densities_;
|
||||
|
||||
// VAPPARS
|
||||
|
@ -145,12 +145,12 @@ public:
|
||||
BlackoilPropsDataHandle(const BlackoilPropsAdFromDeck& sendProps,
|
||||
BlackoilPropsAdFromDeck& recvProps)
|
||||
: sendProps_(sendProps), recvProps_(recvProps),
|
||||
size_(2)
|
||||
size_(1)
|
||||
{
|
||||
// satOilMax might be non empty. In this case we will need to send it, too.
|
||||
if ( sendProps.satOilMax_.size()>0 )
|
||||
{
|
||||
recvProps_.satOilMax_.resize(recvProps_.pvtTableIdx_.size(),
|
||||
recvProps_.satOilMax_.resize(recvProps_.satOilMax_.size(),
|
||||
-std::numeric_limits<double>::max());
|
||||
++size_;
|
||||
}
|
||||
@ -166,7 +166,7 @@ public:
|
||||
{
|
||||
if ( T::codimension == 0)
|
||||
{
|
||||
// We only send pvtTableIdx_, cellPvtRegionIdx_, and maybe satOilMax_
|
||||
// We only send cellPvtRegionIdx_, and maybe satOilMax_
|
||||
return size_;
|
||||
}
|
||||
else
|
||||
@ -180,12 +180,9 @@ public:
|
||||
assert( T::codimension == 0);
|
||||
|
||||
buffer.write(sendProps_.cellPvtRegionIndex()[e.index()]);
|
||||
buffer.write(sendProps_.pvtTableIdx_[e.index()]);
|
||||
if ( size_==2 )
|
||||
{
|
||||
return;
|
||||
if ( size_ > 1 ) {
|
||||
buffer.write(sendProps_.satOilMax_[e.index()]);
|
||||
}
|
||||
buffer.write(sendProps_.satOilMax_[e.index()]);
|
||||
}
|
||||
template<class B, class T>
|
||||
void scatter(B& buffer, const T& e, std::size_t size)
|
||||
@ -195,12 +192,10 @@ public:
|
||||
double val;
|
||||
buffer.read(val);
|
||||
recvProps_.cellPvtRegionIdx_[e.index()]=val;
|
||||
buffer.read(val);
|
||||
recvProps_.pvtTableIdx_[e.index()]=val;
|
||||
if ( size_==2 )
|
||||
return;
|
||||
buffer.read(val);
|
||||
recvProps_.satOilMax_[e.index()]=val;
|
||||
if ( size_ > 1 ) {
|
||||
buffer.read(val);
|
||||
recvProps_.satOilMax_[e.index()]=val;
|
||||
}
|
||||
}
|
||||
bool contains(int dim, int codim)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user