diff --git a/ebos/eclalugridvanguard.hh b/ebos/eclalugridvanguard.hh index 7ddf8ab5e..8fa62d3b6 100644 --- a/ebos/eclalugridvanguard.hh +++ b/ebos/eclalugridvanguard.hh @@ -85,7 +85,7 @@ template class EclAluGridVanguard : public EclBaseVanguard { friend class EclBaseVanguard; - typedef EclBaseVanguard ParentType; + using ParentType = EclBaseVanguard; using ElementMapper = GetPropType; using Scalar = GetPropType; @@ -95,13 +95,13 @@ public: using Grid = GetPropType; using EquilGrid = GetPropType; using GridView = GetPropType; - typedef Dune::CartesianIndexMapper CartesianIndexMapper; - typedef Dune::CartesianIndexMapper EquilCartesianIndexMapper; + using CartesianIndexMapper = Dune::CartesianIndexMapper; + using EquilCartesianIndexMapper = Dune::CartesianIndexMapper; using TransmissibilityType = EclTransmissibility; - typedef Dune::FromToGridFactory Factory; + using Factory = Dune::FromToGridFactory; - static const int dimension = Grid::dimension; - static const int dimensionworld = Grid::dimensionworld; + static constexpr int dimension = Grid::dimension; + static constexpr int dimensionworld = Grid::dimensionworld; public: EclAluGridVanguard(Simulator& simulator) : EclBaseVanguard(simulator) @@ -146,10 +146,10 @@ public: void releaseEquilGrid() { delete equilCartesianIndexMapper_; - equilCartesianIndexMapper_ = 0; + equilCartesianIndexMapper_ = nullptr; delete equilGrid_; - equilGrid_ = 0; + equilGrid_ = nullptr; } /*! @@ -170,17 +170,17 @@ public: if (grid().size(0)) { - globalTrans_.reset(new TransmissibilityType(this->eclState(), - this->gridView(), - this->cartesianIndexMapper(), - this->grid(), - this->cellCentroids(), - getPropValue(), - getPropValue())); - // Re-ordering for ALUGrid - globalTrans_->update(false, [&](unsigned int i) { return gridEquilIdxToGridIdx(i);}); + globalTrans_ = std::make_unique(this->eclState(), + this->gridView(), + this->cartesianIndexMapper(), + this->grid(), + this->cellCentroids(), + getPropValue(), + getPropValue()); + // Re-ordering for ALUGrid + globalTrans_->update(false, [&](unsigned int i) { return gridEquilIdxToGridIdx(i);}); } } @@ -293,7 +293,7 @@ protected: } this->equilGrid_ = std::make_unique(EclGenericVanguard::comm()); - // Note: removed_cells is guaranteed to be empty on ranks other than 0. + // Note: removed_cells is guaranteed to be empty on ranks other than 0. auto removed_cells = this->equilGrid_->processEclipseFormat(input_grid, &this->eclState(),