mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Updates interface to fix issues not resolved in the latest merge.
Namely the template parameter was missing for the added methods. In addition there were still various instances where the grid was used directly rather than via the functions in GridHelpers.hh.
This commit is contained in:
parent
a784d50f1e
commit
bccc7c1350
@ -562,6 +562,7 @@ namespace {
|
|||||||
void FullyImplicitBlackoilSolver<T>::computeWellConnectionPressures(const SolutionState& state,
|
void FullyImplicitBlackoilSolver<T>::computeWellConnectionPressures(const SolutionState& state,
|
||||||
const WellStateFullyImplicitBlackoil& xw)
|
const WellStateFullyImplicitBlackoil& xw)
|
||||||
{
|
{
|
||||||
|
using namespace Opm::AutoDiffGrid;
|
||||||
// 1. Compute properties required by computeConnectionPressureDelta().
|
// 1. Compute properties required by computeConnectionPressureDelta().
|
||||||
// Note that some of the complexity of this part is due to the function
|
// Note that some of the complexity of this part is due to the function
|
||||||
// taking std::vector<double> arguments, and not Eigen objects.
|
// taking std::vector<double> arguments, and not Eigen objects.
|
||||||
@ -599,7 +600,7 @@ namespace {
|
|||||||
// b is row major, so can just copy data.
|
// b is row major, so can just copy data.
|
||||||
std::vector<double> b_perf(b.data(), b.data() + nperf * pu.num_phases);
|
std::vector<double> b_perf(b.data(), b.data() + nperf * pu.num_phases);
|
||||||
// Extract well connection depths.
|
// Extract well connection depths.
|
||||||
const V depth = Eigen::Map<DataBlock>(grid_.cell_centroids, grid_.number_of_cells, grid_.dimensions).rightCols<1>();
|
const V depth = cellCentroidsZ(grid_);
|
||||||
const V pdepth = subset(depth, well_cells);
|
const V pdepth = subset(depth, well_cells);
|
||||||
std::vector<double> perf_depth(pdepth.data(), pdepth.data() + nperf);
|
std::vector<double> perf_depth(pdepth.data(), pdepth.data() + nperf);
|
||||||
// Surface density.
|
// Surface density.
|
||||||
@ -607,7 +608,7 @@ namespace {
|
|||||||
// Gravity
|
// Gravity
|
||||||
double grav = 0.0;
|
double grav = 0.0;
|
||||||
const double* g = geo_.gravity();
|
const double* g = geo_.gravity();
|
||||||
const int dim = grid_.dimensions;
|
const int dim = dimensions(grid_);
|
||||||
if (g) {
|
if (g) {
|
||||||
// Guard against gravity in anything but last dimension.
|
// Guard against gravity in anything but last dimension.
|
||||||
for (int dd = 0; dd < dim - 1; ++dd) {
|
for (int dd = 0; dd < dim - 1; ++dd) {
|
||||||
@ -702,10 +703,12 @@ namespace {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void FullyImplicitBlackoilSolver::addWellEq(const SolutionState& state,
|
template <class T>
|
||||||
|
void FullyImplicitBlackoilSolver<T>::addWellEq(const SolutionState& state,
|
||||||
WellStateFullyImplicitBlackoil& xw)
|
WellStateFullyImplicitBlackoil& xw)
|
||||||
{
|
{
|
||||||
const int nc = grid_.number_of_cells;
|
using namespace Opm::AutoDiffGrid;
|
||||||
|
const int nc = numCells(grid_);
|
||||||
const int np = wells_.number_of_phases;
|
const int np = wells_.number_of_phases;
|
||||||
const int nw = wells_.number_of_wells;
|
const int nw = wells_.number_of_wells;
|
||||||
const int nperf = wells_.well_connpos[nw];
|
const int nperf = wells_.well_connpos[nw];
|
||||||
@ -953,8 +956,8 @@ namespace {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
void FullyImplicitBlackoilSolver::updateWellControls(const ADB& bhp,
|
void FullyImplicitBlackoilSolver<T>::updateWellControls(const ADB& bhp,
|
||||||
const ADB& well_phase_flow_rate,
|
const ADB& well_phase_flow_rate,
|
||||||
WellStateFullyImplicitBlackoil& xw) const
|
WellStateFullyImplicitBlackoil& xw) const
|
||||||
{
|
{
|
||||||
@ -1007,8 +1010,8 @@ namespace {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
void FullyImplicitBlackoilSolver::addWellControlEq(const SolutionState& state,
|
void FullyImplicitBlackoilSolver<T>::addWellControlEq(const SolutionState& state,
|
||||||
const WellStateFullyImplicitBlackoil& xw)
|
const WellStateFullyImplicitBlackoil& xw)
|
||||||
{
|
{
|
||||||
// Handling BHP and SURFACE_RATE wells.
|
// Handling BHP and SURFACE_RATE wells.
|
||||||
@ -1052,8 +1055,8 @@ namespace {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
void FullyImplicitBlackoilSolver::addOldWellEq(const SolutionState& state)
|
void FullyImplicitBlackoilSolver<T>::addOldWellEq(const SolutionState& state)
|
||||||
{
|
{
|
||||||
// -------- Well equation, and well contributions to the mass balance equations --------
|
// -------- Well equation, and well contributions to the mass balance equations --------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user