mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Pass a mutable matrix to BdaBridge::solve_system
That function will overwrite zero diagonal values with small nonzero ones.
This commit is contained in:
parent
d54268513e
commit
85fffee06e
@ -616,7 +616,8 @@ protected:
|
||||
if (!useWellConn_) {
|
||||
simulator_.problem().wellModel().getWellContributions(wellContribs);
|
||||
}
|
||||
bdaBridge->solve_system(&getMatrix(), istlb, wellContribs, result);
|
||||
// Const_cast needed since the CUDA stuff overwrites values for better matrix condition..
|
||||
bdaBridge->solve_system(const_cast<Matrix*>(&getMatrix()), istlb, wellContribs, result);
|
||||
if (result.converged) {
|
||||
// get result vector x from non-Dune backend, iff solve was successful
|
||||
bdaBridge->get_result(x);
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
|
||||
|
||||
/// Solve linear system, A*x = b
|
||||
/// \warning Values of A might get overwritten!
|
||||
/// \param[in] mat matrix A, should be of type Dune::BCRSMatrix
|
||||
/// \param[in] b vector b, should be of type Dune::BlockVector
|
||||
/// \param[in] wellContribs contains all WellContributions, to apply them separately, instead of adding them to matrix A
|
||||
|
Loading…
Reference in New Issue
Block a user