mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 09:55:34 -06:00
Response to review comments.
This commit is contained in:
parent
82ecb1e7cd
commit
d69dbf598e
@ -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) {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user