mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-24 08:20:01 -06:00
Improve out-of-range check for extra components.
This commit is contained in:
parent
dfae9d1b32
commit
12032203b3
@ -1146,7 +1146,7 @@ public:
|
||||
|
||||
Scalar getSolventSaturation(unsigned elemIdx) const
|
||||
{
|
||||
if (sSol_.size() > 0)
|
||||
if (sSol_.size() > elemIdx)
|
||||
return sSol_[elemIdx];
|
||||
|
||||
return 0;
|
||||
@ -1154,7 +1154,7 @@ public:
|
||||
|
||||
Scalar getPolymerConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (cPolymer_.size() > 0)
|
||||
if (cPolymer_.size() > elemIdx)
|
||||
return cPolymer_[elemIdx];
|
||||
|
||||
return 0;
|
||||
@ -1162,7 +1162,7 @@ public:
|
||||
|
||||
Scalar getFoamConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (cFoam_.size() > 0)
|
||||
if (cFoam_.size() > elemIdx)
|
||||
return cFoam_[elemIdx];
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user