Added RigHugeValResultAccessor

Linux: Added include of cmath for define of HUGE_VAL
This commit is contained in:
Magne Sjaastad
2014-08-12 11:16:46 +02:00
parent 20d70d0565
commit 0941834da9
3 changed files with 34 additions and 1 deletions

View File

@@ -144,9 +144,10 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createResultAccessor(RigCa
if (!grid) return NULL;
std::vector< std::vector<double> >& scalarSetResults = eclipseCase->results(porosityModel)->cellScalarResults(resultIndex);
if (timeStepIndex >= scalarSetResults.size())
{
return NULL;
return new RigHugeValResultAccessor;
}
std::vector<double>* resultValues = NULL;
@@ -155,6 +156,11 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createResultAccessor(RigCa
resultValues = &(scalarSetResults[timeStepIndex]);
}
if (!resultValues || resultValues->size() == 0)
{
return new RigHugeValResultAccessor;
}
bool useGlobalActiveIndex = eclipseCase->results(porosityModel)->isUsingGlobalActiveIndex(resultIndex);
if (useGlobalActiveIndex)
{