![]() |
Reference documentation for deal.II version GIT dad323def1 2022-06-25 19:00:02+00:00
|
#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=AffineConstraints< Number >(), const AffineConstraints< Number > &constraint_coarse=AffineConstraints< Number >(), const unsigned int mg_level_fine=numbers::invalid_unsigned_int, const unsigned int mg_level_coarse=numbers::invalid_unsigned_int) |
void | reinit_polynomial_transfer (const DoFHandler< dim > &dof_handler_fine, const DoFHandler< dim > &dof_handler_coarse, const AffineConstraints< Number > &constraint_fine=AffineConstraints< Number >(), const AffineConstraints< Number > &constraint_coarse=AffineConstraints< Number >(), const unsigned int mg_level_fine=numbers::invalid_unsigned_int, const unsigned int mg_level_coarse=numbers::invalid_unsigned_int) |
void | reinit (const DoFHandler< dim > &dof_handler_fine, const DoFHandler< dim > &dof_handler_coarse, const AffineConstraints< Number > &constraint_fine=AffineConstraints< Number >(), const AffineConstraints< Number > &constraint_coarse=AffineConstraints< Number >(), const unsigned int mg_level_fine=numbers::invalid_unsigned_int, const unsigned int mg_level_coarse=numbers::invalid_unsigned_int) |
void | prolongate_and_add (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 |
void | enable_inplace_operations_if_possible (const std::shared_ptr< const Utilities::MPI::Partitioner > &partitioner_coarse, const std::shared_ptr< const Utilities::MPI::Partitioner > &partitioner_fine) |
std::size_t | memory_consumption () 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::Partitioner > | partitioner_fine |
std::shared_ptr< const Utilities::MPI::Partitioner > | partitioner_coarse |
LinearAlgebra::distributed::Vector< Number > | vec_fine |
LinearAlgebra::distributed::Vector< Number > | vec_coarse |
internal::MatrixFreeFunctions::ConstraintInfo< dim, VectorizedArray< Number > > | constraint_info |
std::vector< Number > | weights |
AlignedVector< VectorizedArray< Number > > | weights_compressed |
std::vector< unsigned int > | level_dof_indices_fine |
unsigned int | n_components |
Friends | |
class | internal::MGTwoLevelTransferImplementation |
Class for transfer between two multigrid levels for p- or global coarsening. Specialization for LinearAlgebra::distributed::Vector.
The implementation of this class is explained in detail in [116].
Definition at line 212 of file mg_transfer_global_coarsening.h.
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 = AffineConstraints< Number >() , |
||
const AffineConstraints< Number > & | constraint_coarse = AffineConstraints< Number >() , |
||
const unsigned int | mg_level_fine = numbers::invalid_unsigned_int , |
||
const unsigned int | mg_level_coarse = numbers::invalid_unsigned_int |
||
) |
Set up global coarsening between the given DoFHandler objects ( dof_handler_fine
and dof_handler_coarse
). The transfer can be only performed on active levels.
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 = AffineConstraints< Number >() , |
||
const AffineConstraints< Number > & | constraint_coarse = AffineConstraints< Number >() , |
||
const unsigned int | mg_level_fine = numbers::invalid_unsigned_int , |
||
const unsigned int | mg_level_coarse = numbers::invalid_unsigned_int |
||
) |
Set up polynomial coarsening between the given DoFHandler objects ( dof_handler_fine
and dof_handler_coarse
). Polynomial transfers can be only performed on active levels (numbers::invalid_unsigned_int
) or on coarse-grid levels, i.e., levels without hanging nodes.
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::reinit | ( | const DoFHandler< dim > & | dof_handler_fine, |
const DoFHandler< dim > & | dof_handler_coarse, | ||
const AffineConstraints< Number > & | constraint_fine = AffineConstraints< Number >() , |
||
const AffineConstraints< Number > & | constraint_coarse = AffineConstraints< Number >() , |
||
const unsigned int | mg_level_fine = numbers::invalid_unsigned_int , |
||
const unsigned int | mg_level_coarse = numbers::invalid_unsigned_int |
||
) |
Set up transfer operator between the given DoFHandler objects ( dof_handler_fine
and dof_handler_coarse
). Depending on the underlying Triangulation objects polynomial or geometrical global coarsening is performed.
numbers::invalid_unsigned_int
), polynomial transfers can also be performed on coarse-grid levels, i.e., levels without hanging nodes.
|
static |
Check if a fast templated version of the polynomial transfer between fe_degree_fine
and fe_degree_coarse
is available.
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::prolongate_and_add | ( | LinearAlgebra::distributed::Vector< Number > & | dst, |
const LinearAlgebra::distributed::Vector< Number > & | src | ||
) | const |
Perform prolongation.
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::restrict_and_add | ( | LinearAlgebra::distributed::Vector< Number > & | dst, |
const LinearAlgebra::distributed::Vector< Number > & | src | ||
) | const |
Perform restriction.
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).
void MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::enable_inplace_operations_if_possible | ( | const std::shared_ptr< const Utilities::MPI::Partitioner > & | partitioner_coarse, |
const std::shared_ptr< const Utilities::MPI::Partitioner > & | partitioner_fine | ||
) |
Enable inplace vector operations if external and internal vectors are compatible.
std::size_t MGTwoLevelTransfer< dim, LinearAlgebra::distributed::Vector< Number > >::memory_consumption | ( | ) | const |
Return the memory consumption of the allocated memory in this class.
|
friend |
Definition at line 463 of file mg_transfer_global_coarsening.h.
|
private |
Transfer schemes.
Definition at line 401 of file mg_transfer_global_coarsening.h.
|
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 408 of file mg_transfer_global_coarsening.h.
|
private |
Partitioner needed by the intermediate vector.
Definition at line 413 of file mg_transfer_global_coarsening.h.
|
private |
Partitioner needed by the intermediate vector.
Definition at line 418 of file mg_transfer_global_coarsening.h.
|
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 427 of file mg_transfer_global_coarsening.h.
|
mutableprivate |
Internal vector on that the actual prolongation/restriction is performed.
Definition at line 432 of file mg_transfer_global_coarsening.h.
|
private |
Helper class for reading from and writing to global vectors and for applying constraints.
Definition at line 439 of file mg_transfer_global_coarsening.h.
|
private |
Weights for continuous elements.
Definition at line 444 of file mg_transfer_global_coarsening.h.
|
private |
Weights for continuous elements, compressed into 3^dim doubles per cell if possible.
Definition at line 450 of file mg_transfer_global_coarsening.h.
|
private |
DoF indices of the fine cells, expressed in indices local to the MPI rank.
Definition at line 456 of file mg_transfer_global_coarsening.h.
|
private |
Number of components.
Definition at line 461 of file mg_transfer_global_coarsening.h.