Reference documentation for deal.II version 9.3.3
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > > Class Template Reference

#include <deal.II/multigrid/mg_transfer_global_coarsening.h>

Classes

struct  MGTransferScheme
 

Public Member Functions

void reinit_geometric_transfer (const DoFHandler< dim > &dof_handler_fine, const DoFHandler< dim > &dof_handler_coarse, const AffineConstraints< Number > &constraint_fine, const AffineConstraints< Number > &constraint_coarse)
 
void reinit_polynomial_transfer (const DoFHandler< dim > &dof_handler_fine, const DoFHandler< dim > &dof_handler_coarse, const AffineConstraints< Number > &constraint_fine, const AffineConstraints< Number > &constraint_coarse)
 
void prolongate (LinearAlgebra::distributed::Vector< Number > &dst, const LinearAlgebra::distributed::Vector< Number > &src) const
 
void restrict_and_add (LinearAlgebra::distributed::Vector< Number > &dst, const LinearAlgebra::distributed::Vector< Number > &src) const
 
void interpolate (LinearAlgebra::distributed::Vector< Number > &dst, const LinearAlgebra::distributed::Vector< Number > &src) const
 

Static Public Member Functions

static bool fast_polynomial_transfer_supported (const unsigned int fe_degree_fine, const unsigned int fe_degree_coarse)
 

Private Attributes

std::vector< MGTransferScheme > schemes
 
bool fine_element_is_continuous
 
std::shared_ptr< const Utilities::MPI::Partitionerpartitioner_fine
 
std::shared_ptr< const Utilities::MPI::Partitionerpartitioner_coarse
 
LinearAlgebra::distributed::Vector< Number > vec_fine
 
LinearAlgebra::distributed::Vector< Number > vec_coarse
 
LinearAlgebra::distributed::Vector< Number > vec_coarse_constraints
 
std::vector< unsigned intconstraint_coarse_distribute_indices
 
std::vector< Number > constraint_coarse_distribute_values
 
std::vector< unsigned intconstraint_coarse_distribute_ptr
 
std::vector< unsigned intdistribute_local_to_global_indices
 
std::vector< Number > distribute_local_to_global_values
 
std::vector< unsigned intdistribute_local_to_global_ptr
 
unsigned int n_components
 

Friends

class internal::MGTwoLevelTransferImplementation
 

Detailed Description

template<int dim, typename Number>
class MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >

Class for transfer between two multigrid levels for p- or global coarsening. Specialization for LinearAlgebra::distributed::Vector.

Definition at line 143 of file mg_transfer_global_coarsening.h.

Member Function Documentation

◆ reinit_geometric_transfer()

template<int dim, typename Number >
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::reinit_geometric_transfer ( const DoFHandler< dim > &  dof_handler_fine,
const DoFHandler< dim > &  dof_handler_coarse,
const AffineConstraints< Number > &  constraint_fine,
const AffineConstraints< Number > &  constraint_coarse 
)

Set up global coarsening transfer transfer between the given dof-handlers.

◆ reinit_polynomial_transfer()

template<int dim, typename Number >
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::reinit_polynomial_transfer ( const DoFHandler< dim > &  dof_handler_fine,
const DoFHandler< dim > &  dof_handler_coarse,
const AffineConstraints< Number > &  constraint_fine,
const AffineConstraints< Number > &  constraint_coarse 
)

Set up polynomial coarsening transfer transfer between the given dof-handlers.

Note
The function polynomial_transfer_supported() can be used to check if the given polynomial coarsening strategy is supported.

◆ fast_polynomial_transfer_supported()

template<int dim, typename Number >
static bool MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::fast_polynomial_transfer_supported ( const unsigned int  fe_degree_fine,
const unsigned int  fe_degree_coarse 
)
static

Check if a fast templated version of the polynomial transfer between fe_degree_fine and fe_degree_coarse is available.

Note
Currently, the polynomial coarsening strategies: 1) go-to-one, 2) bisect, and 3) decrease-by-one are precompiled with templates for degrees up to 9.

◆ prolongate()

template<int dim, typename Number >
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::prolongate ( LinearAlgebra::distributed::Vector< Number > &  dst,
const LinearAlgebra::distributed::Vector< Number > &  src 
) const

Perform prolongation.

◆ restrict_and_add()

template<int dim, typename Number >
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::restrict_and_add ( LinearAlgebra::distributed::Vector< Number > &  dst,
const LinearAlgebra::distributed::Vector< Number > &  src 
) const

Perform restriction.

◆ interpolate()

template<int dim, typename Number >
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::interpolate ( LinearAlgebra::distributed::Vector< Number > &  dst,
const LinearAlgebra::distributed::Vector< Number > &  src 
) const

Perform interpolation of a solution vector from the fine level to the coarse level. This function is different from restriction, where a weighted residual is transferred to a coarser level (transposition of prolongation matrix).

Friends And Related Function Documentation

◆ internal::MGTwoLevelTransferImplementation

template<int dim, typename Number >
friend class internal::MGTwoLevelTransferImplementation
friend

Definition at line 364 of file mg_transfer_global_coarsening.h.

Member Data Documentation

◆ schemes

template<int dim, typename Number >
std::vector<MGTransferScheme> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::schemes
private

Transfer schemes.

Definition at line 282 of file mg_transfer_global_coarsening.h.

◆ fine_element_is_continuous

template<int dim, typename Number >
bool MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::fine_element_is_continuous
private

Flag if the finite elements on the fine cells are continuous. If yes, the multiplicity of DoF sharing a vertex/line as well as constraints have to be taken into account via weights.

Definition at line 289 of file mg_transfer_global_coarsening.h.

◆ partitioner_fine

template<int dim, typename Number >
std::shared_ptr<const Utilities::MPI::Partitioner> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::partitioner_fine
private

Partitioner needed by the intermediate vector.

Definition at line 294 of file mg_transfer_global_coarsening.h.

◆ partitioner_coarse

template<int dim, typename Number >
std::shared_ptr<const Utilities::MPI::Partitioner> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::partitioner_coarse
private

Partitioner needed by the intermediate vector.

Definition at line 299 of file mg_transfer_global_coarsening.h.

◆ vec_fine

template<int dim, typename Number >
LinearAlgebra::distributed::Vector<Number> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::vec_fine
mutableprivate

Internal vector needed for collecting all degrees of freedom of the fine cells. It is only initialized if the fine-level DoF indices touch DoFs other than the locally active ones (which we always assume can be accessed by the given vectors in the prolongate/restrict functions), otherwise it is left at size zero.

Definition at line 308 of file mg_transfer_global_coarsening.h.

◆ vec_coarse

template<int dim, typename Number >
LinearAlgebra::distributed::Vector<Number> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::vec_coarse
mutableprivate

Internal vector on that the actual prolongation/restriction is performed.

Definition at line 313 of file mg_transfer_global_coarsening.h.

◆ vec_coarse_constraints

template<int dim, typename Number >
LinearAlgebra::distributed::Vector<Number> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::vec_coarse_constraints
mutableprivate

Internal vector for performing manual constraint_coarse.distribute(), which is needed for acceptable performance.

Definition at line 319 of file mg_transfer_global_coarsening.h.

◆ constraint_coarse_distribute_indices

template<int dim, typename Number >
std::vector<unsigned int> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::constraint_coarse_distribute_indices
private

Constraint-entry indices for manually performing constraint_coarse.distribute() in MPI-local indices (for performance reasons).

Definition at line 326 of file mg_transfer_global_coarsening.h.

◆ constraint_coarse_distribute_values

template<int dim, typename Number >
std::vector<Number> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::constraint_coarse_distribute_values
private

Constraint-entry values for manually performing constraint_coarse.distribute() in MPI-local indices (for performance reasons).

Definition at line 333 of file mg_transfer_global_coarsening.h.

◆ constraint_coarse_distribute_ptr

template<int dim, typename Number >
std::vector<unsigned int> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::constraint_coarse_distribute_ptr
private

Pointers to the constraint entries for performing manual constraint_coarse.distribute().

Definition at line 339 of file mg_transfer_global_coarsening.h.

◆ distribute_local_to_global_indices

template<int dim, typename Number >
std::vector<unsigned int> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::distribute_local_to_global_indices
private

Constraint-entry indices for performing manual constraint_coarse.distribute_local_to_global().

Definition at line 345 of file mg_transfer_global_coarsening.h.

◆ distribute_local_to_global_values

template<int dim, typename Number >
std::vector<Number> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::distribute_local_to_global_values
private

Constraint-entry values for performing manual constraint_coarse.distribute_local_to_global().

Definition at line 351 of file mg_transfer_global_coarsening.h.

◆ distribute_local_to_global_ptr

template<int dim, typename Number >
std::vector<unsigned int> MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::distribute_local_to_global_ptr
private

Pointers to the constraint entries for performing manual constraint_coarse.distribute_local_to_global().

Definition at line 357 of file mg_transfer_global_coarsening.h.

◆ n_components

template<int dim, typename Number >
unsigned int MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::n_components
private

Number of components.

Definition at line 362 of file mg_transfer_global_coarsening.h.


The documentation for this class was generated from the following file: