Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Classes | Namespaces | Functions
dof_tools.cc File Reference
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/table.h>
#include <deal.II/base/template_constraints.h>
#include <deal.II/base/utilities.h>
#include <deal.II/distributed/shared_tria.h>
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/fe/fe.h>
#include <deal.II/fe/fe_tools.h>
#include <deal.II/fe/fe_values.h>
#include <deal.II/grid/filtered_iterator.h>
#include <deal.II/grid/grid_tools.h>
#include <deal.II/grid/intergrid_map.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/hp/dof_handler.h>
#include <deal.II/hp/fe_collection.h>
#include <deal.II/hp/fe_values.h>
#include <deal.II/hp/mapping_collection.h>
#include <deal.II/hp/q_collection.h>
#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/block_sparsity_pattern.h>
#include <deal.II/lac/dynamic_sparsity_pattern.h>
#include <deal.II/lac/sparsity_pattern.h>
#include <deal.II/lac/trilinos_sparsity_pattern.h>
#include <deal.II/lac/vector.h>
#include <algorithm>
#include <numeric>
#include "dof_tools.inst"

Go to the source code of this file.

Classes

struct  DoFTools::internal::ComparisonHelper< dim, Number >
 

Namespaces

 DoFTools
 
 DoFTools::internal
 

Functions

template<int dim, int spacedim>
std::vector< unsigned char > DoFTools::internal::get_local_component_association (const FiniteElement< dim, spacedim > &fe, const ComponentMask &component_mask)
 
template<typename DoFHandlerType >
void DoFTools::internal::get_component_association (const DoFHandlerType &dof, const ComponentMask &component_mask, std::vector< unsigned char > &dofs_by_component)
 
template<typename DoFHandlerType >
void DoFTools::internal::get_block_association (const DoFHandlerType &dof, std::vector< unsigned char > &dofs_by_block)
 
template<int dim, int spacedim>
void DoFTools::internal::resolve_components (const FiniteElement< dim, spacedim > &fe, const std::vector< unsigned char > &dofs_by_component, const std::vector< unsigned int > &target_component, const bool only_once, std::vector< types::global_dof_index > &dofs_per_component, unsigned int &component)
 
template<int dim, int spacedim>
void DoFTools::internal::resolve_components (const hp::FECollection< dim, spacedim > &fe_collection, const std::vector< unsigned char > &dofs_by_component, const std::vector< unsigned int > &target_component, const bool only_once, std::vector< types::global_dof_index > &dofs_per_component, unsigned int &component)
 
template<int dim, int spacedim>
void DoFTools::map_dofs_to_support_points (const hp::MappingCollection< dim, spacedim > &mapping, const hp::DoFHandler< dim, spacedim > &dof_handler, std::vector< Point< spacedim >> &support_points, const ComponentMask &mask)
 
template<int dim, int spacedim>
void DoFTools::map_dofs_to_support_points (const hp::MappingCollection< dim, spacedim > &mapping, const hp::DoFHandler< dim, spacedim > &dof_handler, std::map< types::global_dof_index, Point< spacedim >> &support_points, const ComponentMask &mask)
 
Identifying subsets of degrees of freedom with particular properties
template<int dim, int spacedim>
void DoFTools::extract_hanging_node_dofs (const DoFHandler< dim, spacedim > &dof_handler, std::vector< bool > &selected_dofs)
 
template<int dim, int spacedim>
IndexSet DoFTools::extract_hanging_node_dofs (const DoFHandler< dim, spacedim > &dof_handler)
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
IndexSet DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask)
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const BlockMask &block_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
IndexSet DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const BlockMask &block_mask)
 
template<typename DoFHandlerType >
void DoFTools::extract_level_dofs (const unsigned int level, const DoFHandlerType &dof, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_level_dofs (const unsigned int level, const DoFHandlerType &dof, const BlockMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_boundary_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType >
void DoFTools::extract_boundary_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, IndexSet &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs_with_support_on_boundary (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType , typename number = double>
IndexSet DoFTools::extract_dofs_with_support_contained_within (const DoFHandlerType &dof_handler, const std::function< bool(const typename DoFHandlerType::active_cell_iterator &)> &predicate, const AffineConstraints< number > &constraints=AffineConstraints< number >())
 
template<typename DoFHandlerType >
void DoFTools::extract_constant_modes (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< std::vector< bool >> &constant_modes)
 
Parallelization and domain decomposition
template<typename DoFHandlerType >
void DoFTools::extract_subdomain_dofs (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain_id, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_owned_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_active_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_relevant_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_owned_dofs_per_component (const DoFHandlerType &dof_handler, const ComponentMask &components=ComponentMask())
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_owned_dofs_per_subdomain (const DoFHandlerType &dof_handler)
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_relevant_dofs_per_subdomain (const DoFHandlerType &dof_handler)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_relevant_level_dofs (const DoFHandlerType &dof_handler, const unsigned int level, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::get_subdomain_association (const DoFHandlerType &dof_handler, std::vector< types::subdomain_id > &subdomain)
 
template<typename DoFHandlerType >
unsigned int DoFTools::count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain)
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain, std::vector< unsigned int > &n_dofs_on_subdomain)
 
template<typename DoFHandlerType >
IndexSet DoFTools::dof_indices_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain)
 
DoF indices on patches of cells

Create structures containing a large set of degrees of freedom for small patches of cells. The resulting objects can be used in RelaxationBlockSOR and related classes to implement Schwarz preconditioners and smoothers, where the subdomains consist of small numbers of cells only.

template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::get_dofs_on_patch (const std::vector< typename DoFHandlerType::active_cell_iterator > &patch)
 
template<int dim, int spacedim>
void DoFTools::make_cell_patches (SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const std::vector< bool > &selected_dofs={}, const types::global_dof_index offset=0)
 
template<typename DoFHandlerType >
std::vector< unsigned intDoFTools::make_vertex_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_patches=false, const bool level_boundary_patches=false, const bool single_cell_patches=false, const bool invert_vertex_mapping=false)
 
template<typename DoFHandlerType >
std::vector< unsigned intDoFTools::make_vertex_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const BlockMask &exclude_boundary_dofs=BlockMask(), const bool boundary_patches=false, const bool level_boundary_patches=false, const bool single_cell_patches=false, const bool invert_vertex_mapping=false)
 
template<typename DoFHandlerType >
void DoFTools::make_child_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_dofs=false)
 
template<typename DoFHandlerType >
void DoFTools::make_single_patch (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only=false)
 
Counting degrees of freedom and related functions
template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::count_dofs_per_fe_component (const DoFHandlerType &dof_handler, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_per_component (const DoFHandlerType &dof_handler, std::vector< types::global_dof_index > &dofs_per_component, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
 
template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::count_dofs_per_fe_block (const DoFHandlerType &dof, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_per_block (const DoFHandlerType &dof, std::vector< types::global_dof_index > &dofs_per_block, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
 
template<typename DoFHandlerType >
void DoFTools::get_active_fe_indices (const DoFHandlerType &dof_handler, std::vector< unsigned int > &active_fe_indices)
 
template<typename DoFHandlerType >
unsigned int DoFTools::count_dofs_on_patch (const std::vector< typename DoFHandlerType::active_cell_iterator > &patch)
 
Miscellaneous
template<typename DoFHandlerType , typename Number >
void DoFTools::distribute_cell_to_dof_vector (const DoFHandlerType &dof_handler, const Vector< Number > &cell_data, Vector< double > &dof_data, const unsigned int component=0)
 
template<int spacedim>
void DoFTools::write_gnuplot_dof_support_point_info (std::ostream &out, const std::map< types::global_dof_index, Point< spacedim >> &support_points)
 
Identifying subsets of degrees of freedom with particular properties
template<typename DoFHandlerType >
void DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
IndexSet DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask)
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const BlockMask &block_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
IndexSet DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const BlockMask &block_mask)
 
template<typename DoFHandlerType >
void DoFTools::extract_level_dofs (const unsigned int level, const DoFHandlerType &dof, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_level_dofs (const unsigned int level, const DoFHandlerType &dof, const BlockMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_boundary_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType >
void DoFTools::extract_boundary_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, IndexSet &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs_with_support_on_boundary (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType , typename number = double>
IndexSet DoFTools::extract_dofs_with_support_contained_within (const DoFHandlerType &dof_handler, const std::function< bool(const typename DoFHandlerType::active_cell_iterator &)> &predicate, const AffineConstraints< number > &constraints=AffineConstraints< number >())
 
template<int dim, int spacedim>
void DoFTools::extract_hanging_node_dofs (const DoFHandler< dim, spacedim > &dof_handler, std::vector< bool > &selected_dofs)
 
template<int dim, int spacedim>
IndexSet DoFTools::extract_hanging_node_dofs (const DoFHandler< dim, spacedim > &dof_handler)
 
template<typename DoFHandlerType >
void DoFTools::extract_constant_modes (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< std::vector< bool >> &constant_modes)
 
Parallelization and domain decomposition
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_owned_dofs_per_component (const DoFHandlerType &dof_handler, const ComponentMask &components=ComponentMask())
 
template<typename DoFHandlerType >
void DoFTools::extract_subdomain_dofs (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain_id, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_owned_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_active_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_relevant_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_relevant_level_dofs (const DoFHandlerType &dof_handler, const unsigned int level, IndexSet &dof_set)
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_owned_dofs_per_subdomain (const DoFHandlerType &dof_handler)
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_relevant_dofs_per_subdomain (const DoFHandlerType &dof_handler)
 
template<typename DoFHandlerType >
void DoFTools::get_subdomain_association (const DoFHandlerType &dof_handler, std::vector< types::subdomain_id > &subdomain)
 
template<typename DoFHandlerType >
unsigned int DoFTools::count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain)
 
template<typename DoFHandlerType >
IndexSet DoFTools::dof_indices_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain)
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain, std::vector< unsigned int > &n_dofs_on_subdomain)
 
Counting degrees of freedom and related functions
template<typename DoFHandlerType >
void DoFTools::get_active_fe_indices (const DoFHandlerType &dof_handler, std::vector< unsigned int > &active_fe_indices)
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_per_component (const DoFHandlerType &dof_handler, std::vector< types::global_dof_index > &dofs_per_component, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
 
template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::count_dofs_per_fe_component (const DoFHandlerType &dof_handler, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_per_block (const DoFHandlerType &dof, std::vector< types::global_dof_index > &dofs_per_block, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
 
template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::count_dofs_per_fe_block (const DoFHandlerType &dof, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
 
template<typename DoFHandlerType >
unsigned int DoFTools::count_dofs_on_patch (const std::vector< typename DoFHandlerType::active_cell_iterator > &patch)
 
Functions that return different DoF mappings
template<typename DoFHandlerType >
void DoFTools::map_dof_to_boundary_indices (const DoFHandlerType &dof_handler, std::vector< types::global_dof_index > &mapping)
 
template<typename DoFHandlerType >
void DoFTools::map_dof_to_boundary_indices (const DoFHandlerType &dof_handler, const std::set< types::boundary_id > &boundary_ids, std::vector< types::global_dof_index > &mapping)
 
template<int dim, int spacedim>
void DoFTools::map_dofs_to_support_points (const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, std::vector< Point< spacedim >> &support_points, const ComponentMask &mask=ComponentMask())
 
template<int dim, int spacedim>
void DoFTools::map_dofs_to_support_points (const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, std::map< types::global_dof_index, Point< spacedim >> &support_points, const ComponentMask &mask=ComponentMask())
 
DoF couplings
template<int dim, int spacedim>
void DoFTools::convert_couplings_to_blocks (const DoFHandler< dim, spacedim > &dof_handler, const Table< 2, Coupling > &table_by_component, std::vector< Table< 2, Coupling >> &tables_by_block)
 
template<int dim, int spacedim>
void DoFTools::convert_couplings_to_blocks (const hp::DoFHandler< dim, spacedim > &dof_handler, const Table< 2, Coupling > &table_by_component, std::vector< Table< 2, Coupling >> &tables_by_block)
 
DoF indices on patches of cells

Create structures containing a large set of degrees of freedom for small patches of cells. The resulting objects can be used in RelaxationBlockSOR and related classes to implement Schwarz preconditioners and smoothers, where the subdomains consist of small numbers of cells only.

template<int dim, int spacedim>
void DoFTools::make_cell_patches (SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const std::vector< bool > &selected_dofs={}, const types::global_dof_index offset=0)
 
template<typename DoFHandlerType >
void DoFTools::make_single_patch (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only=false)
 
template<typename DoFHandlerType >
void DoFTools::make_child_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_dofs=false)
 
template<typename DoFHandlerType >
std::vector< unsigned intDoFTools::make_vertex_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_patches=false, const bool level_boundary_patches=false, const bool single_cell_patches=false, const bool invert_vertex_mapping=false)
 
template<typename DoFHandlerType >
std::vector< unsigned intDoFTools::make_vertex_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const BlockMask &exclude_boundary_dofs=BlockMask(), const bool boundary_patches=false, const bool level_boundary_patches=false, const bool single_cell_patches=false, const bool invert_vertex_mapping=false)
 
template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::get_dofs_on_patch (const std::vector< typename DoFHandlerType::active_cell_iterator > &patch)
 
Identifying subsets of degrees of freedom with particular properties
template<int dim, int spacedim>
void DoFTools::extract_hanging_node_dofs (const DoFHandler< dim, spacedim > &dof_handler, std::vector< bool > &selected_dofs)
 
template<int dim, int spacedim>
IndexSet DoFTools::extract_hanging_node_dofs (const DoFHandler< dim, spacedim > &dof_handler)
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
IndexSet DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask)
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const BlockMask &block_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
IndexSet DoFTools::extract_dofs (const DoFHandlerType &dof_handler, const BlockMask &block_mask)
 
template<typename DoFHandlerType >
void DoFTools::extract_level_dofs (const unsigned int level, const DoFHandlerType &dof, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_level_dofs (const unsigned int level, const DoFHandlerType &dof, const BlockMask &component_mask, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_boundary_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType >
void DoFTools::extract_boundary_dofs (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, IndexSet &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType >
void DoFTools::extract_dofs_with_support_on_boundary (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
 
template<typename DoFHandlerType , typename number = double>
IndexSet DoFTools::extract_dofs_with_support_contained_within (const DoFHandlerType &dof_handler, const std::function< bool(const typename DoFHandlerType::active_cell_iterator &)> &predicate, const AffineConstraints< number > &constraints=AffineConstraints< number >())
 
template<typename DoFHandlerType >
void DoFTools::extract_constant_modes (const DoFHandlerType &dof_handler, const ComponentMask &component_mask, std::vector< std::vector< bool >> &constant_modes)
 
Parallelization and domain decomposition
template<typename DoFHandlerType >
void DoFTools::extract_subdomain_dofs (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain_id, std::vector< bool > &selected_dofs)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_owned_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_active_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_relevant_dofs (const DoFHandlerType &dof_handler, IndexSet &dof_set)
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_owned_dofs_per_component (const DoFHandlerType &dof_handler, const ComponentMask &components=ComponentMask())
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_owned_dofs_per_subdomain (const DoFHandlerType &dof_handler)
 
template<typename DoFHandlerType >
std::vector< IndexSetDoFTools::locally_relevant_dofs_per_subdomain (const DoFHandlerType &dof_handler)
 
template<typename DoFHandlerType >
void DoFTools::extract_locally_relevant_level_dofs (const DoFHandlerType &dof_handler, const unsigned int level, IndexSet &dof_set)
 
template<typename DoFHandlerType >
void DoFTools::get_subdomain_association (const DoFHandlerType &dof_handler, std::vector< types::subdomain_id > &subdomain)
 
template<typename DoFHandlerType >
unsigned int DoFTools::count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain)
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain, std::vector< unsigned int > &n_dofs_on_subdomain)
 
template<typename DoFHandlerType >
IndexSet DoFTools::dof_indices_with_subdomain_association (const DoFHandlerType &dof_handler, const types::subdomain_id subdomain)
 
DoF indices on patches of cells

Create structures containing a large set of degrees of freedom for small patches of cells. The resulting objects can be used in RelaxationBlockSOR and related classes to implement Schwarz preconditioners and smoothers, where the subdomains consist of small numbers of cells only.

template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::get_dofs_on_patch (const std::vector< typename DoFHandlerType::active_cell_iterator > &patch)
 
template<int dim, int spacedim>
void DoFTools::make_cell_patches (SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const std::vector< bool > &selected_dofs={}, const types::global_dof_index offset=0)
 
template<typename DoFHandlerType >
std::vector< unsigned intDoFTools::make_vertex_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_patches=false, const bool level_boundary_patches=false, const bool single_cell_patches=false, const bool invert_vertex_mapping=false)
 
template<typename DoFHandlerType >
std::vector< unsigned intDoFTools::make_vertex_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const BlockMask &exclude_boundary_dofs=BlockMask(), const bool boundary_patches=false, const bool level_boundary_patches=false, const bool single_cell_patches=false, const bool invert_vertex_mapping=false)
 
template<typename DoFHandlerType >
void DoFTools::make_child_patches (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_dofs=false)
 
template<typename DoFHandlerType >
void DoFTools::make_single_patch (SparsityPattern &block_list, const DoFHandlerType &dof_handler, const unsigned int level, const bool interior_dofs_only=false)
 
Counting degrees of freedom and related functions
template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::count_dofs_per_fe_component (const DoFHandlerType &dof_handler, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_per_component (const DoFHandlerType &dof_handler, std::vector< types::global_dof_index > &dofs_per_component, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
 
template<typename DoFHandlerType >
std::vector< types::global_dof_indexDoFTools::count_dofs_per_fe_block (const DoFHandlerType &dof, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
 
template<typename DoFHandlerType >
void DoFTools::count_dofs_per_block (const DoFHandlerType &dof, std::vector< types::global_dof_index > &dofs_per_block, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
 
template<typename DoFHandlerType >
void DoFTools::get_active_fe_indices (const DoFHandlerType &dof_handler, std::vector< unsigned int > &active_fe_indices)
 
template<typename DoFHandlerType >
unsigned int DoFTools::count_dofs_on_patch (const std::vector< typename DoFHandlerType::active_cell_iterator > &patch)