Reference documentation for deal.II version GIT 7b2de2f2f9 2023-09-24 11:00:02+00:00
\(\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\}}\)
mg_transfer_internal.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 - 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_mg_transfer_internal_h
18 #define dealii_mg_transfer_internal_h
19 
20 #include <deal.II/base/config.h>
21 
23 
25 
27 
29 
31 
32 namespace internal
33 {
34  namespace MGTransfer
35  {
44  template <int dim, int spacedim>
45  void
47  const DoFHandler<dim, spacedim> &dof_handler,
48  const MGConstrainedDoFs *mg_constrained_dofs,
49  std::vector<std::vector<
50  std::pair<types::global_dof_index, types::global_dof_index>>>
51  &copy_indices,
52  std::vector<std::vector<
53  std::pair<types::global_dof_index, types::global_dof_index>>>
54  &copy_indices_global_mine,
55  std::vector<std::vector<
56  std::pair<types::global_dof_index, types::global_dof_index>>>
57  &copy_indices_level_mine,
58  const bool skip_interface_dofs = true);
59 
60 
61 
67  template <int dim>
68  unsigned int
69  compute_shift_within_children(const unsigned int child,
70  const unsigned int fe_shift_1d,
71  const unsigned int fe_degree);
72 
78  template <typename Number>
79  struct ElementInfo
80  {
85  unsigned int fe_degree;
86 
92 
96  unsigned int n_components;
97 
103  unsigned int n_child_cell_dofs;
104 
110  std::vector<unsigned int> lexicographic_numbering;
111 
116  std::vector<Number> prolongation_matrix_1d;
117  };
118 
122  template <int dim, typename Number>
123  void
125  const DoFHandler<dim> &dof_handler,
126  const MGConstrainedDoFs *mg_constrained_dofs,
127  const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
128  &external_partitioners,
129  ElementInfo<Number> &elem_info,
130  std::vector<std::vector<unsigned int>> &level_dof_indices,
131  std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
132  &parent_child_connect,
133  std::vector<unsigned int> &n_owned_level_cells,
134  std::vector<std::vector<std::vector<unsigned short>>> &dirichlet_indices,
135  std::vector<std::vector<Number>> &weights_on_refined,
136  std::vector<Table<2, unsigned int>> &copy_indices_global_mine,
137  MGLevelObject<std::shared_ptr<const Utilities::MPI::Partitioner>>
138  &vector_partitioners);
139 
140 
141 
147  void
149  const MGConstrainedDoFs *mg_constrained_dofs,
150  const unsigned int level,
151  std::vector<types::global_dof_index> &dof_indices);
152 
153  } // namespace MGTransfer
154 } // namespace internal
155 
157 
158 #endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
unsigned int level
Definition: grid_out.cc:4617
void resolve_identity_constraints(const MGConstrainedDoFs *mg_constrained_dofs, const unsigned int level, std::vector< types::global_dof_index > &dof_indices)
unsigned int compute_shift_within_children(const unsigned int child, const unsigned int fe_shift_1d, const unsigned int fe_degree)
void setup_transfer(const DoFHandler< dim > &dof_handler, const MGConstrainedDoFs *mg_constrained_dofs, const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner >> &external_partitioners, ElementInfo< Number > &elem_info, std::vector< std::vector< unsigned int >> &level_dof_indices, std::vector< std::vector< std::pair< unsigned int, unsigned int >>> &parent_child_connect, std::vector< unsigned int > &n_owned_level_cells, std::vector< std::vector< std::vector< unsigned short >>> &dirichlet_indices, std::vector< std::vector< Number >> &weights_on_refined, std::vector< Table< 2, unsigned int >> &copy_indices_global_mine, MGLevelObject< std::shared_ptr< const Utilities::MPI::Partitioner >> &vector_partitioners)
void fill_copy_indices(const DoFHandler< dim, spacedim > &dof_handler, const MGConstrainedDoFs *mg_constrained_dofs, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index >>> &copy_indices, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index >>> &copy_indices_global_mine, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index >>> &copy_indices_level_mine, const bool skip_interface_dofs=true)
std::vector< Number > prolongation_matrix_1d
std::vector< unsigned int > lexicographic_numbering