mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Improve out-of-range check for extra components.
This commit is contained in:
@@ -1146,7 +1146,7 @@ public:
|
|||||||
|
|
||||||
Scalar getSolventSaturation(unsigned elemIdx) const
|
Scalar getSolventSaturation(unsigned elemIdx) const
|
||||||
{
|
{
|
||||||
if (sSol_.size() > 0)
|
if (sSol_.size() > elemIdx)
|
||||||
return sSol_[elemIdx];
|
return sSol_[elemIdx];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1154,7 +1154,7 @@ public:
|
|||||||
|
|
||||||
Scalar getPolymerConcentration(unsigned elemIdx) const
|
Scalar getPolymerConcentration(unsigned elemIdx) const
|
||||||
{
|
{
|
||||||
if (cPolymer_.size() > 0)
|
if (cPolymer_.size() > elemIdx)
|
||||||
return cPolymer_[elemIdx];
|
return cPolymer_[elemIdx];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1162,7 +1162,7 @@ public:
|
|||||||
|
|
||||||
Scalar getFoamConcentration(unsigned elemIdx) const
|
Scalar getFoamConcentration(unsigned elemIdx) const
|
||||||
{
|
{
|
||||||
if (cFoam_.size() > 0)
|
if (cFoam_.size() > elemIdx)
|
||||||
return cFoam_[elemIdx];
|
return cFoam_[elemIdx];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user