Reference documentation for deal.II version Git e7bb9ce7b3 2020-09-18 12:07:32 -0400
\(\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 - 2020 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  } // namespace MGTransfer
141 } // namespace internal
142 
144 
145 #endif
unsigned int compute_shift_within_children(const unsigned int child, const unsigned int fe_shift_1d, const unsigned int fe_degree)
std::vector< Number > prolongation_matrix_1d
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:363
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:362
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< unsigned int > lexicographic_numbering