mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2627 from blattms/istl-solver-ebos-write-matrix
Write out the linear system when ultra high verbosity is requested.
This commit is contained in:
commit
e32a397a42
@ -31,6 +31,7 @@
|
||||
#include <opm/simulators/linalg/findOverlapRowsAndColumns.hpp>
|
||||
#include <opm/simulators/linalg/setupPropertyTree.hpp>
|
||||
#include <opm/simulators/linalg/FlexibleSolver.hpp>
|
||||
#include <opm/simulators/linalg/WriteSystemMatrixHelper.hpp>
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
#include <opm/simulators/linalg/ParallelIstlInformation.hpp>
|
||||
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||
@ -485,6 +486,8 @@ protected:
|
||||
}
|
||||
|
||||
bool solve(Vector& x) {
|
||||
const int verbosity = useFlexible_ ? prm_.get<int>("verbosity", 0) : parameters_.linear_solver_verbosity_;
|
||||
const bool write_matrix = verbosity > 10;
|
||||
// Solve system.
|
||||
|
||||
if (useFlexible_)
|
||||
@ -493,6 +496,13 @@ protected:
|
||||
assert(flexibleSolver_);
|
||||
flexibleSolver_->apply(x, *rhs_, res);
|
||||
iterations_ = res.iterations;
|
||||
if (write_matrix) {
|
||||
Opm::Helper::writeSystem(simulator_, //simulator is only used to get names
|
||||
getMatrix(),
|
||||
*rhs_,
|
||||
comm_.get());
|
||||
}
|
||||
|
||||
return converged_ = res.converged;
|
||||
}
|
||||
|
||||
@ -530,6 +540,13 @@ protected:
|
||||
scaleSolution(x);
|
||||
}
|
||||
|
||||
if (write_matrix) {
|
||||
Opm::Helper::writeSystem(simulator_, //simulator is only used to get names
|
||||
getMatrix(),
|
||||
*rhs_,
|
||||
comm_.get());
|
||||
}
|
||||
|
||||
return converged_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user