|
dune-pdelab 2.10-git
|
Loading...
Searching...
No Matches
subdomainprojectedcoarsespace.hh
Go to the documentation of this file.
42 SubdomainProjectedCoarseSpace (const GFS& gfs, const M& AF_exterior_, std::shared_ptr<SubdomainBasis<X> > subdomainbasis, const PIH& parallelhelper, int verbosity = 1)
74 rank_type max_local_basis_size = *std::max_element(local_basis_sizes_.begin(),local_basis_sizes_.end());
76 if (my_rank_ == 0 && verbosity_ > 0) std::cout << "Global basis size B=" << global_basis_size_ << std::endl;
79 coarse_system_ = std::make_shared<COARSE_M>(global_basis_size_, global_basis_size_, COARSE_M::row_wise);
82 // Hierarchy: Own basis functions -> Current other basis function from each neighbor -> Actual entries
95 for (rank_type basis_index_remote = 0; basis_index_remote < max_local_basis_size; basis_index_remote++) {
100 Dune::PDELab::MultiCommDataHandle<GFS,X,rank_type> commdh(gfs_, *subdomainbasis_->get_basis_vector(basis_index_remote), neighbor_basis, neighbor_ranks_);
104 Dune::PDELab::MultiCommDataHandle<GFS,X,rank_type> commdh(gfs_, dummy, neighbor_basis, neighbor_ranks_);
163 for (rank_type basis_index2 = 0; basis_index2 < local_basis_sizes_[neighbor_ranks_[neighbor_id]]; basis_index2++) {
180 for (rank_type basis_index2 = 0; basis_index2 < local_basis_sizes_[neighbor_ranks_[neighbor_id]]; basis_index2++) {
203 if (my_rank_ == 0 && verbosity_ > 0) std::cout << "Matrix setup finished: M=" << timer_setup.elapsed() << std::endl;
239 buf_defect_local[basis_index] += native(*subdomainbasis_->get_basis_vector(basis_index))[i] * native(fine)[i];
242 MPI_Allgatherv(buf_defect_local.data(), local_basis_sizes_[my_rank_], MPITraits<field_type>::getType(), buf_defect.data(), recvcounts.data(), displs.data(), MPITraits<field_type>::getType(), gfs_.gridView().comm());
int size() const
static constexpr size_type M()
std::enable_if< std::is_base_of< impl::WrapperBase, T >::value, Native< T > & >::type native(T &t)
Definition backend/interface.hh:192
For backward compatibility – Do not use this!
ForwardCommunication
All_All_Interface
typename Imp::BlockTraits< B >::field_type field_type
row_wise
double elapsed() const noexcept
Representation of a coarse space intended for two-level Schwarz preconditioners.
Definition coarsespace.hh:8
Gather/scatter communication that passes a single function from each subdomain to all its neighbors....
Definition multicommdatahandle.hh:189
This represents a general per-subdomain basis.
Definition subdomainbasis.hh:12
This constructs a coarse space from a per-subdomain local basis.
Definition subdomainprojectedcoarsespace.hh:28
void prolongate(const COARSE_V &coarse, X &prolongated) const override
Prolongates a vector defined on the coarse space to the subdomain.
Definition subdomainprojectedcoarsespace.hh:248
rank_type basis_size() override
Returns the size of the coarse basis.
Definition subdomainprojectedcoarsespace.hh:265
COARSE_M::field_type field_type
Definition subdomainprojectedcoarsespace.hh:34
CoarseSpace< X >::COARSE_M COARSE_M
Definition subdomainprojectedcoarsespace.hh:33
void restrict(const X &fine, COARSE_V &restricted) const override
Restricts a vector defined on a subdomain to the coarse space.
Definition subdomainprojectedcoarsespace.hh:218
std::shared_ptr< COARSE_M > get_coarse_system() override
Returns the matrix representing the coarse basis.
Definition subdomainprojectedcoarsespace.hh:261
SubdomainProjectedCoarseSpace(const GFS &gfs, const M &AF_exterior_, std::shared_ptr< SubdomainBasis< X > > subdomainbasis, const PIH ¶llelhelper, int verbosity=1)
Constructor.
Definition subdomainprojectedcoarsespace.hh:42
CoarseSpace< X >::COARSE_V COARSE_V
Definition subdomainprojectedcoarsespace.hh:32
Provide some classes to reduce boiler plate code in pdelab applications.
T begin(T... args)
T data(T... args)
T end(T... args)
T endl(T... args)
T max_element(T... args)
T resize(T... args)
T size(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8