17 #ifndef __deal2__dof_tools_h 18 #define __deal2__dof_tools_h 21 #include <deal.II/base/config.h> 23 #include <deal.II/base/table.h> 24 #include <deal.II/base/index_set.h> 25 #include <deal.II/base/point.h> 26 #include <deal.II/lac/constraint_matrix.h> 27 #include <deal.II/lac/sparsity_pattern.h> 28 #include <deal.II/dofs/function_map.h> 29 #include <deal.II/dofs/dof_handler.h> 30 #include <deal.II/fe/fe.h> 31 #include <deal.II/fe/component_mask.h> 32 #include <deal.II/hp/mapping_collection.h> 40 template<
int dim,
class T>
class Table;
42 template <
typename number>
class Vector;
45 template <
int dim,
int spacedim>
class DoFHandler;
48 template <
int dim,
int spacedim>
class DoFHandler;
49 template <
int dim,
int spacedim>
class MappingCollection;
54 template <
int dim,
int spacedim>
class Mapping;
58 template <
typename CellIterator>
struct PeriodicFacePair;
230 template <
int dim,
int spacedim>
239 template <
int dim,
int spacedim>
252 template <
int dim,
int spacedim>
264 template <
int dim,
int spacedim>
276 template <
int dim,
int spacedim>
288 template <
int dim,
int spacedim>
301 template <
int dim,
int spacedim>
314 template <
int dim,
int spacedim>
327 template <
int dim,
int spacedim>
340 template <
int dim,
int spacedim>
416 template <
class DH,
class SparsityPattern>
421 const bool keep_constrained_dofs =
true,
514 template <
class DH,
class SparsityPattern>
520 const bool keep_constrained_dofs =
true,
530 template <
class DH,
class SparsityPattern>
533 const std::vector<std::vector<bool> > &mask,
557 template <
class DH,
class SparsityPattern>
574 template <
class DH,
class SparsityPattern>
577 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
598 template <
class DH,
class SparsityPattern>
602 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
613 template<
class DH,
class SparsityPattern>
625 template<
class DH,
class SparsityPattern>
630 const bool keep_constrained_dofs =
true,
645 template <
class DH,
class SparsityPattern>
856 template<
typename FaceIterator>
859 (
const FaceIterator &face_1,
860 const typename identity<FaceIterator>::type &face_2,
863 const bool face_orientation =
true,
864 const bool face_flip =
false,
865 const bool face_rotation =
false);
914 template<
typename DH>
917 (
const DH &dof_handler,
943 template<
typename DH>
946 (
const DH &dof_handler,
977 template<
typename DH>
980 (
const DH &dof_handler,
1007 template<
typename DH>
1010 (
const DH &dof_handler,
1012 const int direction,
1027 template<
typename DH>
1070 template <
class DH,
typename Number>
1075 const unsigned int component = 0);
1103 template <
int dim,
int spacedim>
1107 std::vector<bool> &selected_dofs);
1112 template <
int dim,
int spacedim>
1116 std::vector<bool> &selected_dofs);
1131 template <
int dim,
int spacedim>
1135 std::vector<bool> &selected_dofs);
1140 template <
int dim,
int spacedim>
1144 std::vector<bool> &selected_dofs);
1155 std::vector<bool> &selected_dofs);
1166 std::vector<bool> &selected_dofs);
1225 std::vector<bool> &selected_dofs,
1226 const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
1264 const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
1287 std::vector<bool> &selected_dofs,
1288 const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
1303 template <
int dim,
int spacedim>
1306 std::vector<bool> &selected_dofs);
1326 std::vector<bool> &selected_dofs);
1409 get_subdomain_association (
const DH &dof_handler,
1410 std::vector<types::subdomain_id> &subdomain);
1468 std::vector<unsigned int> &n_dofs_on_subdomain);
1519 template <
class DH,
class Sparsity>
1521 const DH &dof_handler,
1522 const unsigned int level,
1523 const std::vector<bool> &selected_dofs = std::vector<bool>(),
1569 const DH &dof_handler,
1570 const unsigned int level,
1571 const bool interior_dofs_only,
1572 const bool boundary_patches =
false,
1573 const bool level_boundary_patches =
false,
1574 const bool single_cell_patches =
false);
1616 const DH &dof_handler,
1617 const unsigned int level,
1618 const bool interior_dofs_only,
1619 const bool boundary_dofs =
false);
1642 const DH &dof_handler,
1643 const unsigned int level,
1644 const bool interior_dofs_only =
false);
1679 std::vector<std::vector<bool> > &constant_modes);
1695 std::vector<unsigned int> &active_fe_indices);
1737 count_dofs_per_component (
const DH &dof_handler,
1738 std::vector<types::global_dof_index> &dofs_per_component,
1739 const bool vector_valued_once =
false,
1740 std::vector<unsigned int> target_component
1741 = std::vector<unsigned int>());
1761 count_dofs_per_block (
const DH &dof,
1762 std::vector<types::global_dof_index> &dofs_per_block,
1763 const std::vector<unsigned int> &target_block
1764 = std::vector<unsigned int>());
1771 template <
int dim,
int spacedim>
1774 std::vector<types::global_dof_index> &dofs_per_component,
1875 template <
int dim,
int spacedim>
1878 const unsigned int coarse_component,
1880 const unsigned int fine_component,
1898 template <
int dim,
int spacedim>
1901 const unsigned int coarse_component,
1903 const unsigned int fine_component,
1905 std::vector<std::map<types::global_dof_index, float> > &transfer_representation);
1924 std::vector<types::global_dof_index> &mapping);
1938 const std::set<types::boundary_id> &boundary_indicators,
1939 std::vector<types::global_dof_index> &mapping);
1959 template <
int dim,
int spacedim>
1969 template <
int dim,
int spacedim>
2002 template <
int dim,
int spacedim>
2011 template <
int dim,
int spacedim>
2034 template <
class DH,
class Comp>
2037 const DH &dof_handler,
2049 template <
int dim,
int spacedim>
2095 template <
int dim,
int spacedim,
template <
int,
int>
class DH>
2112 template <
int dim,
int spacedim,
template <
int,
int>
class DH>
2128 template <
int dim,
int spacedim>
2140 template <
int dim,
int spacedim>
2152 template <
int dim,
int spacedim>
2153 std::vector<Table<2,Coupling> >
2209 else if (c1 != always && c2 == nonzero)
2224 if (c1 == always || c2 == always)
2226 if (c1 == nonzero || c2 == nonzero)
2234 template <
int dim,
int spacedim>
2239 return dh.
get_fe().dofs_per_cell;
2243 template <
int dim,
int spacedim>
2248 return dh.
get_fe().dofs_per_face;
2252 template <
int dim,
int spacedim>
2257 return dh.
get_fe().dofs_per_vertex;
2261 template <
int dim,
int spacedim>
2266 return dh.
get_fe().n_components();
2271 template <
int dim,
int spacedim>
2276 return dh.
get_fe().is_primitive();
2280 template <
int dim,
int spacedim>
2285 return dh.
get_fe().max_dofs_per_cell ();
2289 template <
int dim,
int spacedim>
2294 return dh.
get_fe().max_dofs_per_face ();
2298 template <
int dim,
int spacedim>
2303 return dh.
get_fe().max_dofs_per_vertex ();
2307 template <
int dim,
int spacedim>
2312 return dh.
get_fe()[0].n_components();
2316 template <
int dim,
int spacedim>
2321 return dh.
get_fe()[0].is_primitive();
2325 template <
class DH,
class SparsityPattern>
2329 const std::vector<std::vector<bool> > &mask,
2332 const unsigned int ncomp = dof.get_fe().n_components();
2334 Assert (mask.size() == ncomp,
2336 for (
unsigned int i=0; i<mask.size(); ++i)
2337 Assert (mask[i].size() == ncomp,
2341 for (
unsigned int i=0; i<ncomp; ++i)
2342 for (
unsigned int j=0; j<ncomp; ++j)
2346 couplings(i,j) = none;
2353 template <
class DH,
class Comp>
2357 const DH &dof_handler,
2363 std::vector<Point<DH::space_dimension> > support_points (dof_handler.n_dofs());
2368 point_to_index_map.clear ();
2370 point_to_index_map[support_points[i]] = i;
2376 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
const types::subdomain_id invalid_subdomain_id
std::map< types::boundary_id, const Function< dim > * > type
void make_sparsity_pattern(const DH &dof_row, const DH &dof_col, SparsityPattern &sparsity)
void make_boundary_sparsity_pattern(const DH &dof, const typename FunctionMap< DH::space_dimension >::type &boundary_indicators, const std::vector< types::global_dof_index > &dof_to_boundary_mapping, SparsityPattern &sparsity)
void extract_hanging_node_dofs(const DoFHandler< dim, spacedim > &dof_handler, std::vector< bool > &selected_dofs)
void make_hanging_node_constraints(const DH &dof_handler, ConstraintMatrix &constraints)
void make_flux_sparsity_pattern(const DH &dof, SparsityPattern &sparsity, const Table< 2, Coupling > &int_mask, const Table< 2, Coupling > &flux_mask)
const hp::FECollection< dim, spacedim > & get_fe() const
unsigned int global_dof_index
#define Assert(cond, exc)
#define DeclException0(Exception0)
UpdateFlags operator|(UpdateFlags f1, UpdateFlags f2)
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
unsigned int subdomain_id
UpdateFlags & operator|=(UpdateFlags &f1, UpdateFlags f2)
void make_zero_boundary_constraints(const DH< dim, spacedim > &dof, ConstraintMatrix &zero_boundary_constraints, const ComponentMask &component_mask=ComponentMask())
::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
unsigned char boundary_id
const FiniteElement< dim, spacedim > & get_fe() const