Commit 8ec70bcf authored by Timo Koch's avatar Timo Koch
Browse files

[amg] Move ghost and owner computation to solveParallel

parent 5692afc9
......@@ -166,10 +166,13 @@ private:
using LinearOperator = typename ParallelTraits::LinearOperator;
using ScalarProduct = typename ParallelTraits::ScalarProduct;
if (firstCall_)
phelper_->initGhostsAndOwners();
std::shared_ptr<Comm> comm;
std::shared_ptr<LinearOperator> linearOperator;
std::shared_ptr<ScalarProduct> scalarProduct;
prepareLinearAlgebraParallel<LinearSolverTraits, ParallelTraits>(A, b, comm, linearOperator, scalarProduct, *phelper_, firstCall_);
prepareLinearAlgebraParallel<LinearSolverTraits, ParallelTraits>(A, b, comm, linearOperator, scalarProduct, *phelper_);
using SeqSmoother = Dune::SeqSSOR<Matrix, Vector, Vector>;
using Smoother = typename ParallelTraits::template Preconditioner<SeqSmoother>;
......
......@@ -792,11 +792,8 @@ void prepareLinearAlgebraParallel(Matrix& A, Vector& b,
std::shared_ptr<typename ParallelTraits::Comm>& comm,
std::shared_ptr<typename ParallelTraits::LinearOperator>& fop,
std::shared_ptr<typename ParallelTraits::ScalarProduct>& sp,
ParallelHelper& pHelper,
const bool firstCall)
ParallelHelper& pHelper)
{
if (firstCall) pHelper.initGhostsAndOwners();
if constexpr (ParallelTraits::isNonOverlapping)
{
// extend the matrix pattern such that it is usable for a parallel solver
......
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