Reset ACTNUM at EclipseState Level

This method avoids resorting to const_cast tricks.
This commit is contained in:
Bård Skaflestad 2021-10-05 21:30:52 +02:00
parent 9cde5ec9e7
commit c7d7fa1146

View File

@ -291,9 +291,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(Ecl
equilGrid_.reset(new Dune::CpGrid(*grid_));
equilCartesianIndexMapper_ = std::make_unique<CartesianIndexMapper>(*equilGrid_);
std::vector<int> actnum = UgGridHelpers::createACTNUM(*grid_);
auto &field_props = eclState.fieldProps();
const_cast<FieldPropsManager&>(field_props).reset_actnum(actnum);
eclState.reset_actnum(UgGridHelpers::createACTNUM(*grid_));
}
{