mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use correct matrix for flexible solver when parallel.
In this case matrix_ is a nullptr and noGhostMat_ is the optimized matrix to use. Before this commit we experienced a segmentation fault as the nullptr was dereferenced and passed to the solver.
This commit is contained in:
parent
1f177b33e7
commit
ddd947bf0a
@ -892,7 +892,8 @@ protected:
|
||||
if (recreate_solver || !flexibleSolver_) {
|
||||
if (isParallel()) {
|
||||
#if HAVE_MPI
|
||||
flexibleSolver_.reset(new FlexibleSolverType(prm_, *matrix_, weightsCalculator, *comm_));
|
||||
assert(noGhostMat_);
|
||||
flexibleSolver_.reset(new FlexibleSolverType(prm_, *noGhostMat_, weightsCalculator, *comm_));
|
||||
#endif
|
||||
} else {
|
||||
flexibleSolver_.reset(new FlexibleSolverType(prm_, *matrix_, weightsCalculator));
|
||||
|
Loading…
Reference in New Issue
Block a user