Refactored RigActiveCellinfo to only have one set of information.

Fracture and Matrix separated information thus needs two such obejcts.
There still needs to remove some out-commented code
p4#: 20877
This commit is contained in:
Jacob Støren
2013-03-13 11:50:31 +01:00
parent 4358d87c09
commit 8a604aca24
23 changed files with 301 additions and 277 deletions

View File

@@ -130,7 +130,7 @@ private:
/*
//--------------------------------------------------------------------------------------------------
///
@@ -179,7 +179,7 @@ private:
*/
//--------------------------------------------------------------------------------------------------
///
@@ -194,11 +194,11 @@ cvf::ref<cvf::StructGridScalarDataAccess> RigGridScalarDataAccessFactory::create
CVF_ASSERT(gridIndex < eclipseCase->gridCount());
CVF_ASSERT(eclipseCase);
CVF_ASSERT(eclipseCase->results(porosityModel));
CVF_ASSERT(eclipseCase->activeCellInfo());
CVF_ASSERT(eclipseCase->activeCellInfo(porosityModel));
RigGridBase *grid = eclipseCase->grid(gridIndex);
if ( !eclipseCase || !eclipseCase->results(porosityModel) || !eclipseCase->activeCellInfo())
if ( !eclipseCase || !eclipseCase->results(porosityModel) || !eclipseCase->activeCellInfo(porosityModel))
{
return NULL;
}
@@ -215,16 +215,8 @@ cvf::ref<cvf::StructGridScalarDataAccess> RigGridScalarDataAccessFactory::create
bool useGlobalActiveIndex = eclipseCase->results(porosityModel)->isUsingGlobalActiveIndex(scalarSetIndex);
if (useGlobalActiveIndex)
{
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
{
cvf::ref<cvf::StructGridScalarDataAccess> object = new RigGridMatrixActiveCellsScalarDataAccess(grid, resultValues, eclipseCase->activeCellInfo());
return object;
}
else
{
cvf::ref<cvf::StructGridScalarDataAccess> object = new RigGridFractureActiveCellsScalarDataAccess(grid, resultValues, eclipseCase->activeCellInfo());
return object;
}
cvf::ref<cvf::StructGridScalarDataAccess> object = new RigGridMatrixActiveCellsScalarDataAccess(grid, resultValues, eclipseCase->activeCellInfo(porosityModel));
return object;
}
else
{