Reference documentation for deal.II version 8.4.2
mg_tools.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2005 - 2015 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 <class Object> class MGLevelObject;
31 template <int dim, int spacedim> class DoFHandler;
32 template <typename number> class Vector;
33 template <typename number> class SparseMatrix;
34 template <typename number> class BlockVector;
35 template <typename number> class BlockSparseMatrix;
36 template <typename number> class FullMatrix;
37 template <typename number> class BlockSparseMatrix;
38 
39 /* !@addtogroup mg */
40 /* @{ */
41 
51 namespace MGTools
52 {
56  template <int dim, int spacedim>
57  void
59  const unsigned int level,
60  std::vector<unsigned int> &row_lengths,
61  const DoFTools::Coupling flux_couplings = DoFTools::none);
62 
67  template <int dim, int spacedim>
68  void
70  const unsigned int level,
71  std::vector<unsigned int> &row_lengths,
72  const Table<2,DoFTools::Coupling> &couplings,
73  const Table<2,DoFTools::Coupling> &flux_couplings);
74 
84  template <typename DoFHandlerType, typename SparsityPatternType>
85  void
86  make_sparsity_pattern (const DoFHandlerType &dof_handler,
87  SparsityPatternType &sparsity,
88  const unsigned int level);
89 
98  template <int dim, typename SparsityPatternType, int spacedim>
99  void
101  SparsityPatternType &sparsity,
102  const unsigned int level);
103 
110  template <int dim, typename SparsityPatternType, int spacedim>
111  void
113  SparsityPatternType &sparsity,
114  const unsigned int level);
124  template <int dim, typename SparsityPatternType, int spacedim>
125  void
127  SparsityPatternType &sparsity,
128  const unsigned int level,
129  const Table<2,DoFTools::Coupling> &int_mask,
130  const Table<2,DoFTools::Coupling> &flux_mask);
131 
140  template <int dim, typename SparsityPatternType, int spacedim>
141  void
143  SparsityPatternType &sparsity,
144  const unsigned int level,
145  const Table<2,DoFTools::Coupling> &flux_mask);
146 
153  template <typename DoFHandlerType>
154  void
155  count_dofs_per_block (const DoFHandlerType &dof_handler,
156  std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
157  std::vector<unsigned int> target_block = std::vector<unsigned int>());
158 
166  template <int dim, int spacedim>
167  void
169  std::vector<std::vector<types::global_dof_index> > &result,
170  const bool only_once = false,
171  std::vector<unsigned int> target_component = std::vector<unsigned int>());
172 
189  template <int dim, int spacedim>
190  void
192  const typename FunctionMap<dim>::type &function_map,
193  std::vector<std::set<types::global_dof_index> > &boundary_indices,
194  const ComponentMask &component_mask = ComponentMask());
195 
200  template <int dim, int spacedim>
201  void
203  const typename FunctionMap<dim>::type &function_map,
204  std::vector<IndexSet> &boundary_indices,
205  const ComponentMask &component_mask = ComponentMask());
206 
212  template <int dim, int spacedim>
213  void
215  std::vector<IndexSet> &interface_dofs);
216 
217 
218  template <int dim, int spacedim>
219  void
220  extract_non_interface_dofs (const DoFHandler<dim,spacedim> &mg_dof_handler,
221  std::vector<std::set<types::global_dof_index> > &non_interface_dofs);
222 }
223 
224 /* @} */
225 
226 DEAL_II_NAMESPACE_CLOSE
227 
228 #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:1177
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:966
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:1069
void extract_inner_interface_dofs(const DoFHandler< dim, spacedim > &mg_dof_handler, std::vector< IndexSet > &interface_dofs)
Definition: mg_tools.cc:1485
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:640