Reference documentation for deal.II version 9.0.0
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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/dofs/dof_handler.h>
22 #include <deal.II/lac/la_parallel_vector.h>
23 #include <deal.II/multigrid/mg_constrained_dofs.h>
24 
25 DEAL_II_NAMESPACE_OPEN
26 
27 namespace internal
28 {
29  namespace MGTransfer
30  {
31 
40  template <int dim, int spacedim>
41  void fill_copy_indices(const ::DoFHandler<dim,spacedim> &mg_dof,
42  const MGConstrainedDoFs *mg_constrained_dofs,
43  std::vector<std::vector<std::pair<types::global_dof_index, types::global_dof_index> > > &copy_indices,
44  std::vector<std::vector<std::pair<types::global_dof_index, types::global_dof_index> > > &copy_indices_global_mine,
45  std::vector<std::vector<std::pair<types::global_dof_index, types::global_dof_index> > > &copy_indices_level_mine,
46  const bool skip_interface_dofs = true);
47 
48 
49 
55  template <int dim>
56  unsigned int
57  compute_shift_within_children(const unsigned int child,
58  const unsigned int fe_shift_1d,
59  const unsigned int fe_degree);
60 
66  template <typename Number>
67  struct ElementInfo
68  {
73  unsigned int fe_degree;
74 
80 
84  unsigned int n_components;
85 
91  unsigned int n_child_cell_dofs;
92 
98  std::vector<unsigned int> lexicographic_numbering;
99 
104  std::vector<Number> prolongation_matrix_1d;
105 
106  };
107 
111  template <int dim, typename Number>
112  void setup_transfer(const ::DoFHandler<dim> &mg_dof,
113  const MGConstrainedDoFs *mg_constrained_dofs,
114  ElementInfo<Number> &elem_info,
115  std::vector<std::vector<unsigned int> > &level_dof_indices,
116  std::vector<std::vector<std::pair<unsigned int,unsigned int> > > &parent_child_connect,
117  std::vector<unsigned int> &n_owned_level_cells,
118  std::vector<std::vector<std::vector<unsigned short> > > &dirichlet_indices,
119  std::vector<std::vector<Number> > &weights_on_refined,
120  std::vector<std::vector<std::pair<unsigned int, unsigned int> > > &copy_indices_global_mine,
122 
123  }
124 }
125 
126 DEAL_II_NAMESPACE_CLOSE
127 
128 #endif
std::vector< Number > prolongation_matrix_1d
std::vector< unsigned int > lexicographic_numbering