Merge pull request #2761 from akva2/fix_flexible_serial

fixed: use the proper linear operator without wells in matrix in serial
This commit is contained in:
Markus Blatt 2020-09-03 17:08:40 +02:00 committed by GitHub
commit ba8782eeca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -768,9 +768,16 @@ DenseMatrix transposeDenseMatrix(const DenseMatrix& M)
}
#endif
} else {
if (useWellConn_) {
using SeqLinearOperator = Dune::MatrixAdapter<Matrix, Vector, Vector>;
linearOperatorForFlexibleSolver_ = std::make_unique<SeqLinearOperator>(getMatrix());
flexibleSolver_ = std::make_unique<FlexibleSolverType>(*linearOperatorForFlexibleSolver_, prm_, weightsCalculator);
} else {
using SeqLinearOperator = WellModelMatrixAdapter<Matrix, Vector, Vector, false>;
wellOperator_ = std::make_unique<WellModelOperator>(simulator_.problem().wellModel());
linearOperatorForFlexibleSolver_ = std::make_unique<SeqLinearOperator>(getMatrix(), *wellOperator_);
flexibleSolver_ = std::make_unique<FlexibleSolverType>(*linearOperatorForFlexibleSolver_, prm_, weightsCalculator);
}
}
}
else