7 #include <dune/common/parallel/indexset.hh> 8 #include <dune/common/parallel/localindex.hh> 9 #include <dune/common/parallel/plocalindex.hh> 10 #include <dune/common/parallel/remoteindices.hh> 11 #include <dune/common/typeutilities.hh> 13 #include <amdis/functions/GlobalIdSet.hpp> 14 #include <amdis/linearalgebra/Communication.hpp> 15 #include <amdis/linearalgebra/DOFMapping.hpp> 16 #include <amdis/linearalgebra/ParallelIndexSet.hpp> 20 template <
class GlobalId,
class SizeType>
26 using LocalIndex = Dune::ParallelLocalIndex<DefaultAttributeSet::Type>;
27 using IndexSet = Dune::ParallelIndexSet<GlobalId, LocalIndex, 512>;
32 constexpr SizeType size()
const {
return size_; }
41 template <
class Basis,
42 Dune::disableCopyMove<Self, Basis> = 0>
44 : remoteIndices_(std::make_unique<RemoteIndices>())
65 template <
class Basis>
68 indexSet_ = std::make_unique<IndexSet>();
73 remoteIndices_->template rebuild<true>();
75 (*indexSet_).size_ = basis.dimension();
78 dofMap_.update(*
this);
82 std::unique_ptr<IndexSet> indexSet_ =
nullptr;
83 std::unique_ptr<RemoteIndices> remoteIndices_;
92 template <
class G,
class L>
97 template <
class Basis>
98 static Communication create(Basis
const& basis, std::string
const& prefix =
"")
Definition: Communication.hpp:30
IndexSet const & indexSet() const
Return the ParallelIndexSet.
Definition: Communication.hpp:53
RemoteIndices const & remoteIndices() const
Return the RemoteIndices.
Definition: Communication.hpp:57
Fallback for ParallelDofMapping in case there is only one mpi core.
Definition: DOFMapping.hpp:21
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
Implementation of a creator pattern for Communication types.
Definition: Communication.hpp:47
Definition: Communication.hpp:21
void update(Basis const &basis)
Update the indexSet, remoteIndices and dofmapping.
Definition: Communication.hpp:66
void buildParallelIndexSet(Basis const &basis, PIS ¶llelIndexSet)
Fills a parallelIndexSet with indices from a basis.
Definition: ParallelIndexSet.hpp:24
DofMap const & dofMap() const
Return the DofMapping.
Definition: Communication.hpp:61
Definition: Communication.hpp:36
static Dune::MPIHelper::MPICommunicator comm()
Return the MPI_Comm object (or a fake communicator)
Definition: Environment.hpp:86