DUNE PDELab (git)
multicommdatahandle.hh
40 int remote_index = std::distance(_neighbor_ranks.begin(), std::find(_neighbor_ranks.begin(), _neighbor_ranks.end(), remote_rank));
42 DUNE_THROW(Exception,"Received remote rank " << remote_rank << ", but it's not in the given neighbor set!");
50 if (target_view.cache().gridFunctionSpace().entitySet().partitions().contains(e.partitionType())) {
52 DUNE_THROW(Exception,"size mismatch in GridFunctionSpace data handle, have " << target_view.size() << "DOFs, but received " << n);
65 DUNE_THROW(Exception,"expected no DOFs in partition '" << e.partitionType() << "', but have " << target_view.size());
76 // enhanced scatter with support for function spaces with different structure on sender and receiver side
78 bool scatter(MessageBuffer& buff, const Offsets& remote_offsets, const Offsets& local_offsets, const Entity& e, LocalView& local_view) const
83 // the compile time structure of the overall function space (and its ordering) will be identical on both sides
84 // of the communication, but one side may be missing information on some leaf orderings, e.g. because the DOF
85 // belongs to a MultiDomain subdomain that only has an active grid cell on one side of the communication.
86 // So we step through the leaves and simply ignore any block where one of the two sides is of size 0.
87 // Otherwise, it's business as usual: we make sure that the sizes from both sides match and then process all
93 int remote_index = std::distance(_neighbor_ranks.begin(), std::find(_neighbor_ranks.begin(), _neighbor_ranks.end(), remote_rank));
95 DUNE_THROW(Exception,"Received remote rank " << remote_rank << ", but it's not in the given neighbor set!");
127 DUNE_THROW(Exception,"size mismatch in GridFunctionSpace data handle block " << block << ", have " << local_offsets[block] - local_i << "DOFs, but received " << remote_offsets[block] - remote_i);
144 DUNE_THROW(Exception,"expected no DOFs in partition '" << e.partitionType() << "', but have " << local_view.size());
202 MultiCommDataHandle(const GFS& gfs_, V& v_, std::vector<std::shared_ptr<V> > target_vectors, std::vector<RankIndex> neighbor_ranks)
203 : BaseT(gfs_,v_,MultiCommGatherScatter<GFS, RankIndex, V>(gfs_, gfs_.gridView().comm().rank(), target_vectors, neighbor_ranks),
Implement a data handle with a grid function space.
Definition: genericdatahandle.hh:132
Gather/scatter communication that passes a single function from each subdomain to all its neighbors....
Definition: multicommdatahandle.hh:189
MultiCommDataHandle(const GFS &gfs_, V &v_, std::vector< std::shared_ptr< V > > target_vectors, std::vector< RankIndex > neighbor_ranks)
Definition: multicommdatahandle.hh:202
Gather/scatter communication that passes a single function from each subdomain to all its neighbors.
Definition: multicommdatahandle.hh:15
MultiCommGatherScatter(const GFS &gfs, RankIndex rank, std::vector< std::shared_ptr< V > > target_vectors, std::vector< RankIndex > neighbor_ranks)
Definition: multicommdatahandle.hh:161
Communication descriptor for sending one item of type E per DOF.
Definition: genericdatahandle.hh:25
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 24, 23:30, 2024)