Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
mg_transfer_internal.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 - 2018 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/mg_level_object.h>
21 
22 #include <deal.II/dofs/dof_handler.h>
23 
24 #include <deal.II/lac/la_parallel_vector.h>
25 
26 #include <deal.II/multigrid/mg_constrained_dofs.h>
27 
28 DEAL_II_NAMESPACE_OPEN
29 
30 namespace internal
31 {
32  namespace MGTransfer
33  {
42  template <int dim, int spacedim>
43  void
44  fill_copy_indices(
45  const DoFHandler<dim, spacedim> &mg_dof,
46  const MGConstrainedDoFs * mg_constrained_dofs,
47  std::vector<std::vector<
48  std::pair<types::global_dof_index, types::global_dof_index>>>
49  &copy_indices,
50  std::vector<std::vector<
51  std::pair<types::global_dof_index, types::global_dof_index>>>
52  &copy_indices_global_mine,
53  std::vector<std::vector<
54  std::pair<types::global_dof_index, types::global_dof_index>>>
55  & copy_indices_level_mine,
56  const bool skip_interface_dofs = true);
57 
58 
59 
65  template <int dim>
66  unsigned int
67  compute_shift_within_children(const unsigned int child,
68  const unsigned int fe_shift_1d,
69  const unsigned int fe_degree);
70 
76  template <typename Number>
77  struct ElementInfo
78  {
83  unsigned int fe_degree;
84 
90 
94  unsigned int n_components;
95 
101  unsigned int n_child_cell_dofs;
102 
108  std::vector<unsigned int> lexicographic_numbering;
109 
114  std::vector<Number> prolongation_matrix_1d;
115  };
116 
120  template <int dim, typename Number>
121  void
122  setup_transfer(
123  const DoFHandler<dim> & mg_dof,
124  const MGConstrainedDoFs * mg_constrained_dofs,
125  ElementInfo<Number> & elem_info,
126  std::vector<std::vector<unsigned int>> &level_dof_indices,
127  std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
128  & parent_child_connect,
129  std::vector<unsigned int> &n_owned_level_cells,
130  std::vector<std::vector<std::vector<unsigned short>>> &dirichlet_indices,
131  std::vector<std::vector<Number>> & weights_on_refined,
132  std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
133  &copy_indices_global_mine,
135  &ghosted_level_vector);
136 
137  } // namespace MGTransfer
138 } // namespace internal
139 
140 DEAL_II_NAMESPACE_CLOSE
141 
142 #endif
std::vector< Number > prolongation_matrix_1d
std::vector< unsigned int > lexicographic_numbering