7#include <dune/istl/owneroverlapcopy.hh>
8#include <dune/istl/solvercategory.hh>
9#include <dune/istl/paamg/pinfo.hh>
11#include <amdis/Environment.hpp>
12#include <amdis/functions/GlobalIdSet.hpp>
13#include <amdis/linearalgebra/IndexDistribution.hpp>
14#include <amdis/linearalgebra/ParallelIndexSet.hpp>
21 using Impl = Dune::Amg::SequentialInformation;
28 template <
class Basis>
32 typename Dune::SolverCategory::Category category()
const
34 return Dune::SolverCategory::sequential;
37 Impl const& impl()
const
47 template <
class Basis>
48 void update(Basis
const&) { }
55 template <
class G,
class L,
class Comm>
63 template <
class GlobalId,
class LocalIndex>
64 class ISTLIndexDistribution
66 using Impl = Dune::OwnerOverlapCopyCommunication<GlobalId, LocalIndex>;
70 using IndexSet =
typename Impl::ParallelIndexSet;
71 using RemoteIndices =
typename Impl::RemoteIndices;
74 template <
class Basis>
75 ISTLIndexDistribution(Basis
const& basis);
77 IndexSet
const& indexSet()
const
80 return impl_->indexSet();
83 RemoteIndices
const& remoteIndices()
const
86 return impl_->remoteIndices();
89 typename Dune::SolverCategory::Category category()
const
94 Impl const& impl()
const
100 Sequential sequential()
const
105 template <
class Basis>
106 void update(Basis
const& basis)
108 impl_ = std::make_unique<Impl>(MPI_Comm(basis.gridView().comm()), cat_);
110 auto& pis = impl_->indexSet();
111 buildParallelIndexSet(basis, pis);
113 auto& ris = impl_->remoteIndices();
114 ris.setIndexSets(pis, pis, impl_->communicator());
115 ris.template rebuild<true>();
119 typename Dune::SolverCategory::Category cat_;
120 std::unique_ptr<Impl> impl_ =
nullptr;
123 template <
class G,
class L>
124 struct ISTLIndexDistributionType<G,L,Dune::Communication<MPI_Comm>>
126 using type = ISTLIndexDistribution<G,L>;
132 using ISTLIndexDistribution_t
133 =
typename ISTLIndexDistributionType<GlobalIdType_t<B>,
typename B::size_type,
typename B::GridView::CollectiveCommunication>::type;
137#include <amdis/linearalgebra/istl/IndexDistribution.inc.hpp>
Dummy implementation for ISTL-specific index distribution when no MPI is found.
Definition: IndexDistribution.hpp:20
Definition: IndexDistribution.hpp:57