diff --git a/opm/autodiff/BlackoilModelBase_impl.hpp b/opm/autodiff/BlackoilModelBase_impl.hpp index 9f158d243..c4e77413d 100644 --- a/opm/autodiff/BlackoilModelBase_impl.hpp +++ b/opm/autodiff/BlackoilModelBase_impl.hpp @@ -780,8 +780,8 @@ namespace detail { asImpl().stdWells().computePropertiesForWellConnectionPressures(state, xw, fluid_, active_, phaseCondition_, b_perf, rsmax_perf, rvmax_perf, surf_dens_perf); // Extract well connection depths. - const Vector depth = cellCentroidsZToEigen(grid_); - const Vector pdepth = subset(depth, asImpl().stdWells().wellOps().well_cells); + const StandardWells::Vector depth = cellCentroidsZToEigen(grid_); + const StandardWells::Vector pdepth = subset(depth, asImpl().stdWells().wellOps().well_cells); const int nperf = wells().well_connpos[wells().number_of_wells]; const std::vector depth_perf(pdepth.data(), pdepth.data() + nperf); diff --git a/opm/autodiff/StandardWells.hpp b/opm/autodiff/StandardWells.hpp index 6adba9d16..33a15812f 100644 --- a/opm/autodiff/StandardWells.hpp +++ b/opm/autodiff/StandardWells.hpp @@ -37,16 +37,6 @@ namespace Opm { - // --------- Types --------- - typedef AutoDiffBlock ADB; - typedef ADB::V Vector; - - // copied from BlackoilModelBase - // should put to somewhere better - typedef Eigen::Array DataBlock; /// Class for handling the standard well model. class StandardWells { @@ -59,6 +49,16 @@ namespace Opm { }; public: + // --------- Types --------- + using ADB = AutoDiffBlock; + using Vector = ADB::V; + + // copied from BlackoilModelBase + // should put to somewhere better + using DataBlock = Eigen::Array; // --------- Public methods --------- explicit StandardWells(const Wells* wells); @@ -73,11 +73,11 @@ namespace Opm { const WellOps& wellOps() const; /// Density of each well perforation - Vector& wellPerforationDensities(); + Vector& wellPerforationDensities(); // mutable version kept for BlackoilMultisegmentModel const Vector& wellPerforationDensities() const; /// Diff to bhp for each well perforation. - Vector& wellPerforationPressureDiffs(); + Vector& wellPerforationPressureDiffs(); // mutable version kept for BlackoilMultisegmentModel const Vector& wellPerforationPressureDiffs() const; template diff --git a/opm/autodiff/StandardWells_impl.hpp b/opm/autodiff/StandardWells_impl.hpp index 2466b0166..b086984f5 100644 --- a/opm/autodiff/StandardWells_impl.hpp +++ b/opm/autodiff/StandardWells_impl.hpp @@ -130,7 +130,7 @@ namespace Opm - Vector& StandardWells::wellPerforationDensities() + StandardWells::Vector& StandardWells::wellPerforationDensities() { return well_perforation_densities_; } @@ -139,7 +139,7 @@ namespace Opm - const Vector& + const StandardWells::Vector& StandardWells::wellPerforationDensities() const { return well_perforation_densities_; @@ -149,7 +149,7 @@ namespace Opm - Vector& + StandardWells::Vector& StandardWells::wellPerforationPressureDiffs() { return well_perforation_pressure_diffs_; @@ -159,7 +159,7 @@ namespace Opm - const Vector& + const StandardWells::Vector& StandardWells::wellPerforationPressureDiffs() const { return well_perforation_pressure_diffs_; diff --git a/opm/autodiff/WellHelpers.hpp b/opm/autodiff/WellHelpers.hpp index a580f2c53..b92bb0682 100644 --- a/opm/autodiff/WellHelpers.hpp +++ b/opm/autodiff/WellHelpers.hpp @@ -31,9 +31,6 @@ namespace Opm { - // --------- Types --------- - typedef AutoDiffBlock ADB; - typedef ADB::V Vector; namespace wellhelpers @@ -120,6 +117,10 @@ namespace Opm { return broken; } + + // --------- Types --------- + using Vector = AutoDiffBlock::V; + /** * Simple hydrostatic correction for VFP table * @param wells - wells struct