Response to review comments.

This commit is contained in:
Atgeirr Flø Rasmussen 2020-11-17 12:53:04 +01:00
parent 82ecb1e7cd
commit d69dbf598e
2 changed files with 6 additions and 9 deletions

View File

@ -80,7 +80,7 @@ namespace mswellhelpers
/// Applies umfpack and checks for singularity
template <typename MatrixType, typename VectorType>
MatrixType
Dune::Matrix<typename MatrixType::block_type>
invertWithUMFPack(const MatrixType& D, std::shared_ptr<Dune::UMFPack<MatrixType> >& linsolver)
{
#if HAVE_UMFPACK
@ -89,13 +89,8 @@ namespace mswellhelpers
VectorType e(sz);
e = 0.0;
// Make a block matrix with a full pattern.
MatrixType inv(sz, sz, sz*sz, MatrixType::row_wise);
for (auto row = inv.createbegin(); row != inv.createend(); ++row) {
for (int c = 0; c < sz; ++c) {
row.insert(c);
}
}
// Make a full block matrix.
Dune::Matrix<typename MatrixType::block_type> inv(sz, sz);
// Create inverse by passing basis vectors to the solver.
for (int ii = 0; ii < sz; ++ii) {

View File

@ -1188,7 +1188,9 @@ namespace Opm
// D is a (nseg x nseg) block matrix with (4 x 4) blocks.
// B and C are (nseg x ncells) block matrices with (4 x 4 blocks).
// They have nonzeros at (i, j) only if this well has a
// perforation at cell j connected to segment i.
// perforation at cell j connected to segment i. The code
// assumes that no cell is connected to more than one segment,
// i.e. the columns of B/C have no more than one nonzero.
for (int rowC = 0; rowC < duneC_.N(); ++rowC) {
for (auto colC = duneC_[rowC].begin(), endC = duneC_[rowC].end(); colC != endC; ++colC) {
const auto row_index = colC.index();