Reference documentation for deal.II version 8.5.1
mg_transfer_internal.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 - 2017 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 
36  template <int dim, int spacedim>
37  void fill_copy_indices(const ::DoFHandler<dim,spacedim> &mg_dof,
38  const MGConstrainedDoFs *mg_constrained_dofs,
39  std::vector<std::vector<std::pair<types::global_dof_index, types::global_dof_index> > > &copy_indices,
40  std::vector<std::vector<std::pair<types::global_dof_index, types::global_dof_index> > > &copy_indices_global_mine,
41  std::vector<std::vector<std::pair<types::global_dof_index, types::global_dof_index> > > &copy_indices_level_mine);
42 
43 
44 
50  template <int dim>
51  unsigned int
52  compute_shift_within_children(const unsigned int child,
53  const unsigned int fe_shift_1d,
54  const unsigned int fe_degree);
55 
61  template <typename Number>
62  struct ElementInfo
63  {
64 
69  unsigned int fe_degree;
70 
76 
80  unsigned int n_components;
81 
87  unsigned int n_child_cell_dofs;
88 
94  std::vector<unsigned int> lexicographic_numbering;
95 
100  std::vector<Number> prolongation_matrix_1d;
101 
102  };
103 
107  template <int dim, typename Number>
108  void setup_transfer(const ::DoFHandler<dim> &mg_dof,
109  const MGConstrainedDoFs *mg_constrained_dofs,
110  ElementInfo<Number> &elem_info,
111  std::vector<std::vector<unsigned int> > &level_dof_indices,
112  std::vector<std::vector<std::pair<unsigned int,unsigned int> > > &parent_child_connect,
113  std::vector<unsigned int> &n_owned_level_cells,
114  std::vector<std::vector<std::vector<unsigned short> > > &dirichlet_indices,
115  std::vector<std::vector<Number> > &weights_on_refined,
116  std::vector<std::vector<std::pair<unsigned int, unsigned int> > > &copy_indices_global_mine,
118 
119  }
120 }
121 
122 DEAL_II_NAMESPACE_CLOSE
123 
124 #endif
std::vector< Number > prolongation_matrix_1d
std::vector< unsigned int > lexicographic_numbering