putting Vector and ADB to be inside StandardWells and wellhelpers

This commit is contained in:
Kai Bao 2016-04-12 11:35:03 +02:00
parent 14d774e08f
commit 75b73a893e
4 changed files with 22 additions and 21 deletions

View File

@ -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<double> depth_perf(pdepth.data(), pdepth.data() + nperf);

View File

@ -37,16 +37,6 @@
namespace Opm {
// --------- Types ---------
typedef AutoDiffBlock<double> ADB;
typedef ADB::V Vector;
// copied from BlackoilModelBase
// should put to somewhere better
typedef Eigen::Array<double,
Eigen::Dynamic,
Eigen::Dynamic,
Eigen::RowMajor> DataBlock;
/// Class for handling the standard well model.
class StandardWells {
@ -59,6 +49,16 @@ namespace Opm {
};
public:
// --------- Types ---------
using ADB = AutoDiffBlock<double>;
using Vector = ADB::V;
// copied from BlackoilModelBase
// should put to somewhere better
using DataBlock = Eigen::Array<double,
Eigen::Dynamic,
Eigen::Dynamic,
Eigen::RowMajor>;
// --------- 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 <class SolutionState, class WellState>

View File

@ -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_;

View File

@ -31,9 +31,6 @@
namespace Opm {
// --------- Types ---------
typedef AutoDiffBlock<double> ADB;
typedef ADB::V Vector;
namespace wellhelpers
@ -120,6 +117,10 @@ namespace Opm {
return broken;
}
// --------- Types ---------
using Vector = AutoDiffBlock<double>::V;
/**
* Simple hydrostatic correction for VFP table
* @param wells - wells struct