Satisfy all post-conditions of compute_densrat_update()

The total (accumulated) phase contributions must be available in
ratio->psum for each completion when leaving the function.
This commit is contained in:
Bård Skaflestad 2011-01-20 10:49:11 +01:00
parent fc41c37578
commit 07a453225d

View File

@ -540,6 +540,12 @@ compute_densrat_update_well(well_t *W ,
dgetrs_("No Transpose" , &nrows, &nrhs,
ratio->lu , &ldA, ratio->ipiv,
ratio->Ai_y + i*np, &ldX, &info);
/* Accumulate phase contributions */
ratio->psum[i] = 0.0;
for (p = 0; p < np; p++) {
ratio->psum[i] += ratio->Ai_y[i*np + p];
}
}
}