Commit 16aeb73a authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'fix/linear-solver-parallel-traits' into 'master'

[parallel][solver] Use passed ParallelTraits instead of local alias

Closes #845

See merge request !1923
parents b52068c7 93f42d79
......@@ -847,22 +847,20 @@ void prepareLinearAlgebraParallel(Matrix& A, Vector& b,
pHelper.makeNonOverlappingConsistent(b);
// create commicator, operator, scalar product
using Traits = typename LinearSolverTraits::template ParallelNonoverlapping<Matrix, Vector>;
const auto category = Dune::SolverCategory::nonoverlapping;
comm = std::make_shared<typename Traits::Comm>(pHelper.gridView().comm(), category);
comm = std::make_shared<typename ParallelTraits::Comm>(pHelper.gridView().comm(), category);
pHelper.createParallelIndexSet(*comm);
fop = std::make_shared<typename Traits::LinearOperator>(A, *comm);
sp = std::make_shared<typename Traits::ScalarProduct>(*comm);
fop = std::make_shared<typename ParallelTraits::LinearOperator>(A, *comm);
sp = std::make_shared<typename ParallelTraits::ScalarProduct>(*comm);
}
else
{
// create commicator, operator, scalar product
using Traits = typename LinearSolverTraits::template ParallelOverlapping<Matrix, Vector>;
const auto category = Dune::SolverCategory::overlapping;
comm = std::make_shared<typename Traits::Comm>(pHelper.gridView().comm(), category);
comm = std::make_shared<typename ParallelTraits::Comm>(pHelper.gridView().comm(), category);
pHelper.createParallelIndexSet(*comm);
fop = std::make_shared<typename Traits::LinearOperator>(A, *comm);
sp = std::make_shared<typename Traits::ScalarProduct>(*comm);
fop = std::make_shared<typename ParallelTraits::LinearOperator>(A, *comm);
sp = std::make_shared<typename ParallelTraits::ScalarProduct>(*comm);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment