Reference documentation for deal.II version 8.1.0
mg_tools.h
1 // ---------------------------------------------------------------------
2 // @f$Id: mg_tools.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2005 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__mg_tools_h
18 #define __deal2__mg_tools_h
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/index_set.h>
22 #include <deal.II/dofs/dof_tools.h>
23 #include <deal.II/dofs/dof_handler.h>
24 
25 #include <vector>
26 #include <set>
27 
28 
30 
31 template <class Object> class MGLevelObject;
32 template <int dim, int spacedim> class DoFHandler;
33 template <typename number> class Vector;
34 template <typename number> class SparseMatrix;
35 template <typename number> class BlockVector;
36 template <typename number> class BlockSparseMatrix;
37 template <typename number> class FullMatrix;
38 template <typename number> class BlockSparseMatrix;
39 
40 /* !@addtogroup mg */
41 /* @{ */
42 
53 namespace MGTools
54 {
59  template <int dim, int spacedim>
60  void
62  const unsigned int level,
63  std::vector<unsigned int> &row_lengths,
64  const DoFTools::Coupling flux_couplings = DoFTools::none);
65 
72  template <int dim, int spacedim>
73  void
75  const unsigned int level,
76  std::vector<unsigned int> &row_lengths,
77  const Table<2,DoFTools::Coupling> &couplings,
78  const Table<2,DoFTools::Coupling> &flux_couplings);
79 
94  template <class DH, class SparsityPattern>
95  void
96  make_sparsity_pattern (const DH &dof_handler,
97  SparsityPattern &sparsity,
98  const unsigned int level);
99 
106  template <int dim, class SparsityPattern, int spacedim>
107  void
109  SparsityPattern &sparsity,
110  const unsigned int level);
111 
122  template <int dim, class SparsityPattern, int spacedim>
123  void
125  SparsityPattern &sparsity,
126  const unsigned int level);
144  template <int dim, class SparsityPattern, int spacedim>
145  void
147  SparsityPattern &sparsity,
148  const unsigned int level,
149  const Table<2,DoFTools::Coupling> &int_mask,
150  const Table<2,DoFTools::Coupling> &flux_mask);
151 
164  template <int dim, class SparsityPattern, int spacedim>
165  void
167  SparsityPattern &sparsity,
168  const unsigned int level,
169  const Table<2,DoFTools::Coupling> &flux_mask);
170 
181  template <class DH>
182  void
183  count_dofs_per_block (const DH &dof_handler,
184  std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
185  std::vector<unsigned int> target_block = std::vector<unsigned int>());
186 
197  template <int dim, int spacedim>
198  void
200  std::vector<std::vector<types::global_dof_index> > &result,
201  const bool only_once = false,
202  std::vector<unsigned int> target_component = std::vector<unsigned int>());
203 
209  template <int dim, int spacedim>
210  void
212  std::vector<std::vector<types::global_dof_index> > &result,
213  std::vector<unsigned int> target_component) DEAL_II_DEPRECATED;
214 
237  template <int dim, int spacedim>
238  void
240  const typename FunctionMap<dim>::type &function_map,
241  std::vector<std::set<types::global_dof_index> > &boundary_indices,
242  const ComponentMask &component_mask = ComponentMask());
243 
249  template <int dim, int spacedim>
250  void
252  const typename FunctionMap<dim>::type &function_map,
253  std::vector<IndexSet> &boundary_indices,
254  const ComponentMask &component_mask = ComponentMask());
255 
259  template <typename number>
260  void
261  apply_boundary_values (const std::set<types::global_dof_index> &boundary_dofs,
262  SparseMatrix<number> &matrix,
263  const bool preserve_symmetry,
264  const bool ignore_zeros = false) DEAL_II_DEPRECATED;
265 
269  template <typename number>
270  void
271  apply_boundary_values (const std::set<types::global_dof_index> &boundary_dofs,
273  const bool preserve_symmetry) DEAL_II_DEPRECATED;
274 
292  template <int dim, int spacedim>
293  void
295  std::vector<std::vector<bool> > &interface_dofs,
296  std::vector<std::vector<bool> > &boundary_interface_dofs);
297 
302  template <int dim, int spacedim>
303  void
305  std::vector<std::vector<bool> > &interface_dofs);
306 
307  template <int dim, int spacedim>
308  void
309  extract_non_interface_dofs (const DoFHandler<dim,spacedim> &mg_dof_handler,
310  std::vector<std::set<types::global_dof_index> > &non_interface_dofs);
311 }
312 
313 /* @} */
314 
315 DEAL_II_NAMESPACE_CLOSE
316 
317 #endif
std::map< types::boundary_id, const Function< dim > * > type
Definition: function_map.h:56
void make_flux_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPattern &sparsity, const unsigned int level)
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())
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 >())
void extract_inner_interface_dofs(const DoFHandler< dim, spacedim > &mg_dof_handler, std::vector< std::vector< bool > > &interface_dofs, std::vector< std::vector< bool > > &boundary_interface_dofs)
void make_sparsity_pattern(const DH &dof_handler, SparsityPattern &sparsity, const unsigned int level)
void count_dofs_per_block(const DH &dof_handler, std::vector< std::vector< types::global_dof_index > > &dofs_per_block, std::vector< unsigned int > target_block=std::vector< unsigned int >())
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
void apply_boundary_values(const std::set< types::global_dof_index > &boundary_dofs, SparseMatrix< number > &matrix, const bool preserve_symmetry, const bool ignore_zeros=false) DEAL_II_DEPRECATED
void make_flux_sparsity_pattern_edge(const DoFHandler< dim, spacedim > &dof_handler, SparsityPattern &sparsity, const unsigned int level)
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)