Reference documentation for deal.II version 8.5.1
mg_tools.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2005 - 2016 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 #ifndef dealii__mg_tools_h
17 #define dealii__mg_tools_h
18 
19 #include <deal.II/base/config.h>
20 #include <deal.II/base/index_set.h>
21 #include <deal.II/dofs/dof_tools.h>
22 #include <deal.II/dofs/dof_handler.h>
23 
24 #include <vector>
25 #include <set>
26 
27 
28 DEAL_II_NAMESPACE_OPEN
29 
30 template <int dim, int spacedim> class DoFHandler;
31 
32 /* !@addtogroup mg */
33 /* @{ */
34 
44 namespace MGTools
45 {
49  template <int dim, int spacedim>
50  void
52  const unsigned int level,
53  std::vector<unsigned int> &row_lengths,
54  const DoFTools::Coupling flux_couplings = DoFTools::none);
55 
60  template <int dim, int spacedim>
61  void
63  const unsigned int level,
64  std::vector<unsigned int> &row_lengths,
65  const Table<2,DoFTools::Coupling> &couplings,
66  const Table<2,DoFTools::Coupling> &flux_couplings);
67 
77  template <typename DoFHandlerType, typename SparsityPatternType>
78  void
79  make_sparsity_pattern (const DoFHandlerType &dof_handler,
80  SparsityPatternType &sparsity,
81  const unsigned int level);
82 
91  template <int dim, typename SparsityPatternType, int spacedim>
92  void
94  SparsityPatternType &sparsity,
95  const unsigned int level);
96 
103  template <int dim, typename SparsityPatternType, int spacedim>
104  void
106  SparsityPatternType &sparsity,
107  const unsigned int level);
117  template <int dim, typename SparsityPatternType, int spacedim>
118  void
120  SparsityPatternType &sparsity,
121  const unsigned int level,
122  const Table<2,DoFTools::Coupling> &int_mask,
123  const Table<2,DoFTools::Coupling> &flux_mask);
124 
133  template <int dim, typename SparsityPatternType, int spacedim>
134  void
136  SparsityPatternType &sparsity,
137  const unsigned int level,
138  const Table<2,DoFTools::Coupling> &flux_mask);
139 
146  template <typename DoFHandlerType>
147  void
148  count_dofs_per_block (const DoFHandlerType &dof_handler,
149  std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
150  std::vector<unsigned int> target_block = std::vector<unsigned int>());
151 
159  template <int dim, int spacedim>
160  void
162  std::vector<std::vector<types::global_dof_index> > &result,
163  const bool only_once = false,
164  std::vector<unsigned int> target_component = std::vector<unsigned int>());
165 
185  template <int dim, int spacedim>
186  void
188  const typename FunctionMap<dim>::type &function_map,
189  std::vector<std::set<types::global_dof_index> > &boundary_indices,
190  const ComponentMask &component_mask = ComponentMask());
191 
199  template <int dim, int spacedim>
200  void
202  const typename FunctionMap<dim>::type &function_map,
203  std::vector<IndexSet> &boundary_indices,
204  const ComponentMask &component_mask = ComponentMask());
205 
213  template <int dim, int spacedim>
214  void
216  const std::set<types::boundary_id> &boundary_ids,
217  std::vector<IndexSet> &boundary_indices,
218  const ComponentMask &component_mask = ComponentMask());
219 
225  template <int dim, int spacedim>
226  void
228  std::vector<IndexSet> &interface_dofs);
229 
230 
231  template <int dim, int spacedim>
232  void
233  extract_non_interface_dofs (const DoFHandler<dim,spacedim> &mg_dof_handler,
234  std::vector<std::set<types::global_dof_index> > &non_interface_dofs);
235 }
236 
237 /* @} */
238 
239 DEAL_II_NAMESPACE_CLOSE
240 
241 #endif
void make_flux_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternType &sparsity, const unsigned int level)
Definition: mg_tools.cc:572
void make_sparsity_pattern(const DoFHandlerType &dof_handler, SparsityPatternType &sparsity, const unsigned int level)
Definition: mg_tools.cc:539
void make_boundary_list(const DoFHandler< dim, spacedim > &mg_dof, const typename FunctionMap< dim >::type &function_map, std::vector< std::set< types::global_dof_index > > &boundary_indices, const ComponentMask &component_mask=ComponentMask())
Definition: mg_tools.cc:1173
void count_dofs_per_component(const DoFHandler< dim, spacedim > &mg_dof, std::vector< std::vector< types::global_dof_index > > &result, const bool only_once=false, std::vector< unsigned int > target_component=std::vector< unsigned int >())
Definition: mg_tools.cc:987
std::map< types::boundary_id, const Function< dim, Number > * > type
Definition: function_map.h:81
void compute_row_length_vector(const DoFHandler< dim, spacedim > &dofs, const unsigned int level, std::vector< unsigned int > &row_lengths, const DoFTools::Coupling flux_couplings=DoFTools::none)
Definition: mg_tools.cc:106
void count_dofs_per_block(const DoFHandlerType &dof_handler, std::vector< std::vector< types::global_dof_index > > &dofs_per_block, std::vector< unsigned int > target_block=std::vector< unsigned int >())
Definition: mg_tools.cc:1090
void extract_inner_interface_dofs(const DoFHandler< dim, spacedim > &mg_dof_handler, std::vector< IndexSet > &interface_dofs)
Definition: mg_tools.cc:1431
Definition: table.h:33
void make_flux_sparsity_pattern_edge(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternType &sparsity, const unsigned int level)
Definition: mg_tools.cc:647