Merge remote-tracking branch 'atgeirr/master'

This commit is contained in:
Bård Skaflestad 2013-05-15 10:10:01 +02:00
commit 9139d8a48b
2 changed files with 7 additions and 1 deletions

View File

@ -286,6 +286,8 @@ superset(const Eigen::Array<Scalar, Eigen::Dynamic, 1>& x,
/// Construct square sparse matrix with the
/// elements of d on the diagonal.
/// Need to mark this as inline since it is defined in a header and not a template.
inline
AutoDiff::ForwardBlock<double>::M
spdiag(const AutoDiff::ForwardBlock<double>::V& d);

View File

@ -346,8 +346,10 @@ namespace Opm {
const V delta_t = dt * V::Ones(nc, 1);
const V transi = subset(geo_.transmissibility(),
ops_.internal_faces);
const int num_perf = wells_.well_connpos[nw];
const std::vector<int> well_cells(wells_.well_cells,
wells_.well_cells + wells_.well_connpos[nw]);
wells_.well_cells + num_perf);
const V transw = Eigen::Map<const V>(wells_.WI, num_perf, 1);
// Initialize AD variables: p (cell pressures) and bhp (well bhp).
const V p0 = Eigen::Map<const V>(&state.pressure()[0], nc, 1);
@ -380,6 +382,8 @@ namespace Opm {
// Finally construct well perforation pressures.
const ADB p_perfwell = well_to_perf*bhp + well_perf_dp;
// const ADB nkgradp_well = transw * (p_perfcell - p_perfwell);
cell_residual_ = ADB::constant(pv, bpat);
for (int phase = 0; phase < np; ++phase) {
const ADB cell_B = pdepfdata_.fvf(phase, p);