Do not compute SOIL if none of SGAS or SWAT is present

p4#: 19303
This commit is contained in:
Magne Sjaastad 2012-10-25 07:25:43 +02:00
parent 15044a4db4
commit fa2fceccf4

View File

@ -395,6 +395,12 @@ void RigReservoirCellResults::loadOrComputeSOIL()
sgas = &(cellScalarResults(scalarIndexSGAS));
}
// Early exit if none of SWAT or SGAS is present
if (scalarIndexSWAT == cvf::UNDEFINED_SIZE_T && scalarIndexSGAS == cvf::UNDEFINED_SIZE_T)
{
return;
}
size_t soilResultValueCount = 0;
size_t soilTimeStepCount = 0;
if (swat)