mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Write out the linear system when ultra high verbosity is requested.
This added to ISTLSolverEbosFlexible and should be available form ISTLSolverEbos for consistency reasons, too. Done with this commit.
This commit is contained in:
@@ -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 = prm_.get<int>("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_;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user