* There is no need to consider hanging nodes here, since only one level is
* considered.
*/
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_sparsity_pattern(const DoFHandlerType &dof_handler,
- SparsityPatternType & sparsity,
- const unsigned int level);
+ make_sparsity_pattern(const DoFHandler<dim, spacedim> &dof_handler,
+ SparsityPatternType & sparsity,
+ const unsigned int level);
/**
* Make a sparsity pattern including fluxes of discontinuous Galerkin
* degrees of freedom on a refinement edge to those not on the refinement edge
* of a certain level.
*/
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_interface_sparsity_pattern(const DoFHandlerType & dof_handler,
+ make_interface_sparsity_pattern(const DoFHandler<dim, spacedim> &dof_handler,
const MGConstrainedDoFs &mg_constrained_dofs,
SparsityPatternType & sparsity,
const unsigned int level);
* Result is a vector containing for each level a vector containing the
* number of dofs for each block (access is <tt>result[level][block]</tt>).
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
count_dofs_per_block(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
std::vector<std::vector<types::global_dof_index>> &dofs_per_block,
std::vector<unsigned int> target_block = {});
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_sparsity_pattern(const DoFHandlerType &dof,
- SparsityPatternType & sparsity,
- const unsigned int level)
+ make_sparsity_pattern(const DoFHandler<dim, spacedim> &dof,
+ SparsityPatternType & sparsity,
+ const unsigned int level)
{
const types::global_dof_index n_dofs = dof.n_dofs(level);
(void)n_dofs;
ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
- typename DoFHandlerType::cell_iterator cell = dof.begin(level),
- endc = dof.end(level);
+ std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
+ typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
+ endc = dof.end(level);
for (; cell != endc; ++cell)
if (dof.get_triangulation().locally_owned_subdomain() ==
numbers::invalid_subdomain_id ||
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_interface_sparsity_pattern(const DoFHandlerType & dof,
+ make_interface_sparsity_pattern(const DoFHandler<dim, spacedim> &dof,
const MGConstrainedDoFs &mg_constrained_dofs,
SparsityPatternType & sparsity,
const unsigned int level)
ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
- typename DoFHandlerType::cell_iterator cell = dof.begin(level),
- endc = dof.end(level);
+ std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
+ typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
+ endc = dof.end(level);
for (; cell != endc; ++cell)
if (cell->is_locally_owned_on_level())
{
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
count_dofs_per_block(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
std::vector<std::vector<types::global_dof_index>> &dofs_per_block,
std::vector<unsigned int> target_block)
{
- const FiniteElement<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe =
- dof_handler.get_fe();
- const unsigned int n_blocks = fe.n_blocks();
- const unsigned int n_levels =
+ const FiniteElement<dim, spacedim> &fe = dof_handler.get_fe();
+ const unsigned int n_blocks = fe.n_blocks();
+ const unsigned int n_levels =
dof_handler.get_triangulation().n_global_levels();
AssertDimension(dofs_per_block.size(), n_levels);
for (unsigned int i = 0; i < n_blocks; ++i)
{
void (*fun_ptr)(const unsigned int level,
- const DoFHandlerType &,
+ const DoFHandler<dim, spacedim> &,
const BlockMask &,
std::vector<bool> &) =
- &DoFTools::extract_level_dofs<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>;
+ &DoFTools::extract_level_dofs<dim, spacedim>;
std::vector<bool> tmp(n_blocks, false);
tmp[i] = true;
-for (DoFHandler : DOFHANDLER_TEMPLATES; PATTERN : SPARSITY_PATTERNS;
- deal_II_dimension : DIMENSIONS;
+for (PATTERN : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS;
deal_II_space_dimension : SPACE_DIMENSIONS)
{
namespace MGTools
#if deal_II_dimension <= deal_II_space_dimension
template void
- make_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>,
- PATTERN>(const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
- PATTERN &,
- const unsigned int);
+ make_sparsity_pattern<deal_II_dimension,
+ deal_II_space_dimension,
+ PATTERN>(
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
+ PATTERN &,
+ const unsigned int);
#endif
\}
}
#if deal_II_dimension <= deal_II_space_dimension
template void
- make_interface_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>,
- PATTERN>(const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
- const MGConstrainedDoFs &,
- PATTERN &,
- const unsigned int);
+ make_interface_sparsity_pattern<deal_II_dimension,
+ deal_II_space_dimension,
+ PATTERN>(
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
+ const MGConstrainedDoFs &,
+ PATTERN &,
+ const unsigned int);
#endif
#if deal_II_dimension == deal_II_space_dimension