16 #ifndef dealii__dof_tools_h 17 #define dealii__dof_tools_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/index_set.h> 23 #include <deal.II/base/point.h> 24 #include <deal.II/lac/constraint_matrix.h> 25 #include <deal.II/dofs/dof_handler.h> 26 #include <deal.II/fe/component_mask.h> 27 #include <deal.II/hp/dof_handler.h> 35 DEAL_II_NAMESPACE_OPEN
38 template <
int dim,
typename Number>
class Function;
46 template <
int dim,
int spacedim>
class Mapping;
48 template <
int dim,
class T>
class Table;
49 template <
typename Number>
class Vector;
53 template <
typename CellIterator>
struct PeriodicFacePair;
222 template <
int dim,
int spacedim>
237 template <
int dim,
int spacedim>
248 template <
int dim,
int spacedim>
260 template <
int dim,
int spacedim>
261 std::vector<Table<2,Coupling> >
277 template <
int dim,
int spacedim>
286 template <
int dim,
int spacedim>
299 template <
int dim,
int spacedim>
311 template <
int dim,
int spacedim>
323 template <
int dim,
int spacedim>
335 template <
int dim,
int spacedim>
348 template <
int dim,
int spacedim>
361 template <
int dim,
int spacedim>
374 template <
int dim,
int spacedim>
387 template <
int dim,
int spacedim>
515 template <
typename DoFHandlerType,
typename SparsityPatternType>
518 SparsityPatternType &sparsity_pattern,
520 const bool keep_constrained_dofs =
true,
588 template <
typename DoFHandlerType,
typename SparsityPatternType>
592 SparsityPatternType &sparsity_pattern,
594 const bool keep_constrained_dofs =
true,
617 template <
typename DoFHandlerType,
typename SparsityPatternType>
620 const DoFHandlerType &dof_col,
621 SparsityPatternType &sparsity);
668 template<
typename DoFHandlerType,
typename SparsityPatternType>
671 SparsityPatternType &sparsity_pattern);
681 template<
typename DoFHandlerType,
typename SparsityPatternType>
684 SparsityPatternType &sparsity_pattern,
686 const bool keep_constrained_dofs =
true,
708 template <
typename DoFHandlerType,
typename SparsityPatternType>
711 SparsityPatternType &sparsity,
723 template <
typename DoFHandlerType,
typename SparsityPatternType>
726 SparsityPatternType &sparsity,
728 const bool keep_constrained_dofs,
742 template <
typename DoFHandlerType,
typename SparsityPatternType>
745 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
746 SparsityPatternType &sparsity_pattern);
764 template <
typename DoFHandlerType,
typename SparsityPatternType,
typename number>
767 (
const DoFHandlerType &dof,
769 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
770 SparsityPatternType &sparsity);
818 template <
typename DoFHandlerType>
890 template <
int dim,
int spacedim>
893 const unsigned int coarse_component,
895 const unsigned int fine_component,
916 template <
int dim,
int spacedim>
919 const unsigned int coarse_component,
921 const unsigned int fine_component,
923 std::vector<std::map<types::global_dof_index, float> > &transfer_representation);
1084 template<
typename FaceIterator>
1087 (
const FaceIterator &face_1,
1088 const typename identity<FaceIterator>::type &face_2,
1091 const bool face_orientation =
true,
1092 const bool face_flip =
false,
1093 const bool face_rotation =
false,
1095 const std::vector<unsigned int> &first_vector_components = std::vector<unsigned int>());
1120 template<
typename DoFHandlerType>
1127 const std::vector<unsigned int> &first_vector_components = std::vector<unsigned int>());
1161 template<
typename DoFHandlerType>
1164 (
const DoFHandlerType &dof_handler,
1167 const int direction,
1197 template<
typename DoFHandlerType>
1200 (
const DoFHandlerType &dof_handler,
1202 const int direction,
1222 template <
int dim,
int spacedim>
1225 std::vector<bool> &selected_dofs);
1251 template <
int dim,
int spacedim>
1255 std::vector<bool> &selected_dofs);
1260 template <
int dim,
int spacedim>
1264 std::vector<bool> &selected_dofs);
1284 template <
int dim,
int spacedim>
1288 std::vector<bool> &selected_dofs);
1293 template <
int dim,
int spacedim>
1297 std::vector<bool> &selected_dofs);
1303 template <
typename DoFHandlerType>
1306 const DoFHandlerType &dof,
1308 std::vector<bool> &selected_dofs);
1314 template <
typename DoFHandlerType>
1317 const DoFHandlerType &dof,
1319 std::vector<bool> &selected_dofs);
1372 template <
typename DoFHandlerType>
1376 std::vector<bool> &selected_dofs,
1377 const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
1409 template <
typename DoFHandlerType>
1414 const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
1432 template <
typename DoFHandlerType>
1436 std::vector<bool> &selected_dofs,
1437 const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
1472 template <
typename DoFHandlerType>
1476 std::vector<std::vector<bool> > &constant_modes);
1492 template <
typename DoFHandlerType>
1496 std::vector<bool> &selected_dofs);
1505 template <
typename DoFHandlerType>
1525 template <
typename DoFHandlerType>
1539 template <
typename DoFHandlerType>
1560 template <
typename DoFHandlerType>
1561 std::vector<IndexSet>
1580 template <
typename DoFHandlerType>
1581 std::vector<IndexSet>
1589 template <
typename DoFHandlerType>
1592 const unsigned int level,
1626 template <
typename DoFHandlerType>
1629 std::vector<types::subdomain_id> &subdomain);
1656 template <
typename DoFHandlerType>
1680 template <
typename DoFHandlerType>
1684 std::vector<unsigned int> &n_dofs_on_subdomain);
1706 template <
typename DoFHandlerType>
1772 template <
typename DoFHandlerType>
1773 std::vector<types::global_dof_index>
1774 get_dofs_on_patch (
const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
1796 template <
int dim,
int spacedim>
1799 const unsigned int level,
1800 const std::vector<bool> &selected_dofs = std::vector<bool>(),
1853 template <
typename DoFHandlerType>
1854 std::vector<unsigned int>
1856 const DoFHandlerType &dof_handler,
1857 const unsigned int level,
1858 const bool interior_dofs_only,
1859 const bool boundary_patches =
false,
1860 const bool level_boundary_patches =
false,
1861 const bool single_cell_patches =
false,
1862 const bool invert_vertex_mapping =
false);
1877 template <
typename DoFHandlerType>
1878 std::vector<unsigned int>
1880 const DoFHandlerType &dof_handler,
1881 const unsigned int level,
1883 const bool boundary_patches =
false,
1884 const bool level_boundary_patches =
false,
1885 const bool single_cell_patches =
false,
1886 const bool invert_vertex_mapping =
false);
1925 template <
typename DoFHandlerType>
1927 const DoFHandlerType &dof_handler,
1928 const unsigned int level,
1929 const bool interior_dofs_only,
1930 const bool boundary_dofs =
false);
1951 template <
typename DoFHandlerType>
1953 const DoFHandlerType &dof_handler,
1954 const unsigned int level,
1955 const bool interior_dofs_only =
false);
1999 template <
typename DoFHandlerType>
2002 std::vector<types::global_dof_index> &dofs_per_component,
2003 const bool vector_valued_once =
false,
2004 std::vector<unsigned int> target_component
2005 = std::vector<unsigned int>());
2023 template <
typename DoFHandlerType>
2026 std::vector<types::global_dof_index> &dofs_per_block,
2027 const std::vector<unsigned int> &target_block
2028 = std::vector<unsigned int>());
2040 template <
typename DoFHandlerType>
2043 std::vector<unsigned int> &active_fe_indices);
2079 template <
typename DoFHandlerType>
2081 count_dofs_on_patch (
const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
2105 template <
typename DoFHandlerType>
2108 std::vector<types::global_dof_index> &mapping);
2120 template <
typename DoFHandlerType>
2123 const std::set<types::boundary_id> &boundary_ids,
2124 std::vector<types::global_dof_index> &mapping);
2143 template <
int dim,
int spacedim>
2153 template <
int dim,
int spacedim>
2186 template <
int dim,
int spacedim>
2195 template <
int dim,
int spacedim>
2222 template <
typename DoFHandlerType,
class Comp>
2226 const DoFHandlerType &dof_handler,
2265 template <
typename DoFHandlerType,
typename Number>
2270 const unsigned int component = 0);
2298 template <
int spacedim>
2344 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2361 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2457 template <
int dim,
int spacedim>
2462 return dh.
get_fe().dofs_per_cell;
2466 template <
int dim,
int spacedim>
2471 return dh.
get_fe().dofs_per_face;
2475 template <
int dim,
int spacedim>
2480 return dh.
get_fe().dofs_per_vertex;
2484 template <
int dim,
int spacedim>
2489 return dh.
get_fe().n_components();
2494 template <
int dim,
int spacedim>
2499 return dh.
get_fe().is_primitive();
2503 template <
int dim,
int spacedim>
2508 return dh.
get_fe().max_dofs_per_cell ();
2512 template <
int dim,
int spacedim>
2517 return dh.
get_fe().max_dofs_per_face ();
2521 template <
int dim,
int spacedim>
2526 return dh.
get_fe().max_dofs_per_vertex ();
2530 template <
int dim,
int spacedim>
2535 return dh.
get_fe()[0].n_components();
2539 template <
int dim,
int spacedim>
2544 return dh.
get_fe()[0].is_primitive();
2548 template <
typename DoFHandlerType,
class Comp>
2553 const DoFHandlerType &dof_handler,
2559 std::vector<Point<DoFHandlerType::space_dimension> > support_points (dof_handler.n_dofs());
2564 point_to_index_map.clear ();
2566 point_to_index_map[support_points[i]] = i;
2572 DEAL_II_NAMESPACE_CLOSE
void compute_intergrid_transfer_representation(const DoFHandler< dim, spacedim > &coarse_grid, const unsigned int coarse_component, const DoFHandler< dim, spacedim > &fine_grid, const unsigned int fine_component, const InterGridMap< DoFHandler< dim, spacedim > > &coarse_to_fine_grid_map, std::vector< std::map< types::global_dof_index, float > > &transfer_representation)
const types::subdomain_id invalid_subdomain_id
static ::ExceptionBase & ExcGridsDontMatch()
void make_boundary_sparsity_pattern(const DoFHandlerType &dof, const std::vector< types::global_dof_index > &dof_to_boundary_mapping, SparsityPatternType &sparsity_pattern)
static ::ExceptionBase & ExcFiniteElementsDontMatch()
const FiniteElement< dim, spacedim > & get_fe() const
void compute_intergrid_constraints(const DoFHandler< dim, spacedim > &coarse_grid, const unsigned int coarse_component, const DoFHandler< dim, spacedim > &fine_grid, const unsigned int fine_component, const InterGridMap< DoFHandler< dim, spacedim > > &coarse_to_fine_grid_map, ConstraintMatrix &constraints)
const hp::FECollection< dim, spacedim > & get_fe() const
void make_hanging_node_constraints(const DoFHandlerType &dof_handler, ConstraintMatrix &constraints)
static ::ExceptionBase & ExcGridNotCoarser()
unsigned int global_dof_index
Abstract base class for mapping classes.
#define DeclException0(Exception0)
void make_flux_sparsity_pattern(const DoFHandlerType &dof_handler, SparsityPatternType &sparsity_pattern)
UpdateFlags operator|(UpdateFlags f1, UpdateFlags f2)
unsigned int subdomain_id
void make_sparsity_pattern(const DoFHandlerType &dof_handler, SparsityPatternType &sparsity_pattern, const ConstraintMatrix &constraints=ConstraintMatrix(), const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
UpdateFlags & operator|=(UpdateFlags &f1, UpdateFlags f2)
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
unsigned char boundary_id
void make_zero_boundary_constraints(const DoFHandlerType< dim, spacedim > &dof, const types::boundary_id boundary_id, ConstraintMatrix &zero_boundary_constraints, const ComponentMask &component_mask=ComponentMask())
static ::ExceptionBase & ExcNoFESelected()