// After setting up all the information in periodicity_vector all we have
// to do is to tell make_periodicity_constraints to create the desired
// constraints.
- DoFTools::make_periodicity_constraints<DoFHandler<dim>>(
- periodicity_vector,
- constraints,
- fe.component_mask(velocities),
- first_vector_components);
+ DoFTools::make_periodicity_constraints<dim, dim>(periodicity_vector,
+ constraints,
+ fe.component_mask(
+ velocities),
+ first_vector_components);
VectorTools::interpolate_boundary_values(mapping,
dof_handler,
* lambda in the parameter list) to avoid a bug in gcc where the same lambda
* gets defined multiple times.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
inline bool
always_couple_on_faces(
- const typename DoFHandlerType::active_cell_iterator &,
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator &,
const unsigned int)
{
return true;
*
* @ingroup constraints
*/
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number = double>
void
make_sparsity_pattern(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> &dof_handler,
SparsityPatternType & sparsity_pattern,
const AffineConstraints<number> &constraints = AffineConstraints<number>(),
const bool keep_constrained_dofs = true,
*
* @ingroup constraints
*/
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number = double>
void
make_sparsity_pattern(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> &dof_handler,
const Table<2, Coupling> & coupling,
SparsityPatternType & sparsity_pattern,
const AffineConstraints<number> &constraints = AffineConstraints<number>(),
* whereas the ones that correspond to columns come from the second
* DoFHandler.
*/
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_sparsity_pattern(const DoFHandlerType &dof_row,
- const DoFHandlerType &dof_col,
- SparsityPatternType & sparsity);
+ make_sparsity_pattern(const DoFHandler<dim, spacedim> &dof_row,
+ const DoFHandler<dim, spacedim> &dof_col,
+ SparsityPatternType & sparsity);
/**
* Compute which entries of a matrix built on the given @p dof_handler may
*
* @ingroup constraints
*/
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_flux_sparsity_pattern(const DoFHandlerType &dof_handler,
- SparsityPatternType & sparsity_pattern);
+ make_flux_sparsity_pattern(const DoFHandler<dim, spacedim> &dof_handler,
+ SparsityPatternType & sparsity_pattern);
/**
* This function does essentially the same as the other
*
* @ingroup constraints
*/
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
make_flux_sparsity_pattern(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> &dof_handler,
SparsityPatternType & sparsity_pattern,
const AffineConstraints<number> &constraints,
const bool keep_constrained_dofs = true,
*
* @ingroup constraints
*/
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
make_flux_sparsity_pattern(
- const DoFHandlerType & dof,
- SparsityPatternType & sparsity,
- const Table<2, Coupling> &cell_integrals_mask,
- const Table<2, Coupling> &face_integrals_mask,
+ const DoFHandler<dim, spacedim> &dof,
+ SparsityPatternType & sparsity,
+ const Table<2, Coupling> & cell_integrals_mask,
+ const Table<2, Coupling> & face_integrals_mask,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
* };
* @endcode
*/
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
make_flux_sparsity_pattern(
- const DoFHandlerType & dof,
+ const DoFHandler<dim, spacedim> &dof,
SparsityPatternType & sparsity,
const AffineConstraints<number> &constraints,
const bool keep_constrained_dofs,
const Table<2, Coupling> & face_couplings,
const types::subdomain_id subdomain_id,
const std::function<
- bool(const typename DoFHandlerType::active_cell_iterator &,
+ bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &,
const unsigned int)> &face_has_flux_coupling =
- &internal::always_couple_on_faces<DoFHandlerType>);
+ &internal::always_couple_on_faces<dim, spacedim>);
/**
* Create the sparsity pattern for boundary matrices. See the general
* the matrix does not consist of domain integrals, but only of integrals
* over the boundary of the domain.
*/
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
make_boundary_sparsity_pattern(
- const DoFHandlerType & dof,
+ const DoFHandler<dim, spacedim> & dof,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPatternType & sparsity_pattern);
* map with the boundary indicators you want and set the function pointers to
* null pointers).
*/
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
make_boundary_sparsity_pattern(
- const DoFHandlerType &dof,
- const std::map<types::boundary_id,
- const Function<DoFHandlerType::space_dimension, number> *>
+ const DoFHandler<dim, spacedim> &dof,
+ const std::map<types::boundary_id, const Function<spacedim, number> *>
& boundary_ids,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPatternType & sparsity);
*
* @ingroup constraints
*/
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
- make_hanging_node_constraints(const DoFHandlerType & dof_handler,
- AffineConstraints<number> &constraints);
+ make_hanging_node_constraints(const DoFHandler<dim, spacedim> &dof_handler,
+ AffineConstraints<number> & constraints);
/**
* This function is used when different variables in a problem are
* @ref GlossPeriodicConstraints "Glossary entry on periodic boundary conditions"
* and step-45 for further information.
*/
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
+ make_periodicity_constraints(
+ const std::vector<GridTools::PeriodicFacePair<
+ typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask = ComponentMask(),
+ const std::vector<unsigned int> &first_vector_components =
+ std::vector<unsigned int>(),
+ const number periodicity_factor = 1.);
+
+ /**
+ * The same as above.
+ *
+ * @deprecated Use the function that takes dim and spacedim as template
+ * argument.
+ */
+ template <typename DoFHandlerType, typename number>
+ DEAL_II_DEPRECATED void
make_periodicity_constraints(
const std::vector<
GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>
* @ref GlossPeriodicConstraints "Glossary entry on periodic boundary conditions"
* for further information.
*/
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
make_periodicity_constraints(
- const DoFHandlerType & dof_handler,
- const types::boundary_id b_id1,
- const types::boundary_id b_id2,
- const unsigned int direction,
- AffineConstraints<number> &constraints,
- const ComponentMask & component_mask = ComponentMask(),
- const number periodicity_factor = 1.);
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::boundary_id b_id1,
+ const types::boundary_id b_id2,
+ const unsigned int direction,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask = ComponentMask(),
+ const number periodicity_factor = 1.);
* @ref GlossPeriodicConstraints "Glossary entry on periodic boundary conditions"
* for further information.
*/
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
make_periodicity_constraints(
- const DoFHandlerType & dof_handler,
- const types::boundary_id b_id,
- const unsigned int direction,
- AffineConstraints<number> &constraints,
- const ComponentMask & component_mask = ComponentMask(),
- const number periodicity_factor = 1.);
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::boundary_id b_id,
+ const unsigned int direction,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask = ComponentMask(),
+ const number periodicity_factor = 1.);
/**
* @}
* @deprecated For the reason stated above, this function is deprecated in
* favor of the following function.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
DEAL_II_DEPRECATED void
- extract_hanging_node_dofs(const DoFHandlerType &dof_handler,
- std::vector<bool> & selected_dofs);
+ extract_hanging_node_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ std::vector<bool> & selected_dofs);
/**
* Same as above but return the selected DoFs as IndexSet. In particular,
* for parallel::TriangulationBase objects this function should be preferred.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- extract_hanging_node_dofs(const DoFHandlerType &dof_handler);
+ extract_hanging_node_dofs(const DoFHandler<dim, spacedim> &dof_handler);
/**
* Extract the indices of the degrees of freedom belonging to certain vector
* freedom. It is consequently deprecated in favor of the following
* function.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
DEAL_II_DEPRECATED void
- extract_dofs(const DoFHandlerType &dof_handler,
- const ComponentMask & component_mask,
- std::vector<bool> & selected_dofs);
+ extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ const ComponentMask & component_mask,
+ std::vector<bool> & selected_dofs);
/**
* Extract the (locally owned) indices of the degrees of freedom belonging to
* number of degrees of freedom. Note that the resulting object is always
* a subset of what DoFHandler::locally_owned_dofs() returns.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- extract_dofs(const DoFHandlerType &dof_handler,
- const ComponentMask & component_mask);
+ extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ const ComponentMask & component_mask);
/**
* This function is the equivalent to the DoFTools::extract_dofs() functions
* freedom. It is consequently deprecated in favor of the following
* function.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
DEAL_II_DEPRECATED void
- extract_dofs(const DoFHandlerType &dof_handler,
- const BlockMask & block_mask,
- std::vector<bool> & selected_dofs);
+ extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ const BlockMask & block_mask,
+ std::vector<bool> & selected_dofs);
/**
* This function is the equivalent to the DoFTools::extract_dofs() functions
* number of degrees of freedom. Note that the resulting object is always
* a subset of what DoFHandler::locally_owned_dofs() returns.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- extract_dofs(const DoFHandlerType &dof_handler, const BlockMask &block_mask);
+ extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ const BlockMask & block_mask);
/**
* Do the same thing as the corresponding extract_dofs() function for one
* level of a multi-grid DoF numbering.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_level_dofs(const unsigned int level,
- const DoFHandlerType &dof,
- const ComponentMask & component_mask,
- std::vector<bool> & selected_dofs);
+ extract_level_dofs(const unsigned int level,
+ const DoFHandler<dim, spacedim> &dof,
+ const ComponentMask & component_mask,
+ std::vector<bool> & selected_dofs);
/**
* Do the same thing as the corresponding extract_dofs() function for one
* level of a multi-grid DoF numbering.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_level_dofs(const unsigned int level,
- const DoFHandlerType &dof,
- const BlockMask & component_mask,
- std::vector<bool> & selected_dofs);
+ extract_level_dofs(const unsigned int level,
+ const DoFHandler<dim, spacedim> &dof,
+ const BlockMask & component_mask,
+ std::vector<bool> & selected_dofs);
/**
* Extract all degrees of freedom which are at the boundary and belong to
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_boundary_dofs(const DoFHandlerType & dof_handler,
+ extract_boundary_dofs(const DoFHandler<dim, spacedim> & dof_handler,
const ComponentMask & component_mask,
std::vector<bool> & selected_dofs,
const std::set<types::boundary_id> &boundary_ids =
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_boundary_dofs(const DoFHandlerType & dof_handler,
+ extract_boundary_dofs(const DoFHandler<dim, spacedim> & dof_handler,
const ComponentMask & component_mask,
IndexSet & selected_dofs,
const std::set<types::boundary_id> &boundary_ids =
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
extract_dofs_with_support_on_boundary(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
const ComponentMask & component_mask,
std::vector<bool> & selected_dofs,
const std::set<types::boundary_id> &boundary_ids =
* DoFs that are associated with the locally owned or ghost cells, but are not
* owned by the current MPI core.
*/
- template <typename DoFHandlerType, typename number = double>
+ template <int dim, int spacedim, typename number = double>
IndexSet
extract_dofs_with_support_contained_within(
- const DoFHandlerType &dof_handler,
+ const DoFHandler<dim, spacedim> &dof_handler,
const std::function<
- bool(const typename DoFHandlerType::active_cell_iterator &)> &predicate,
+ bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
+ & predicate,
const AffineConstraints<number> &constraints = AffineConstraints<number>());
/**
* The main reason for this program is the use of the null space with the
* AMG preconditioner.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_constant_modes(const DoFHandlerType & dof_handler,
- const ComponentMask & component_mask,
- std::vector<std::vector<bool>> &constant_modes);
+ extract_constant_modes(const DoFHandler<dim, spacedim> &dof_handler,
+ const ComponentMask & component_mask,
+ std::vector<std::vector<bool>> & constant_modes);
//@}
/**
* If you want to get a unique association of degree of freedom with
* subdomains, use the @p get_subdomain_association function.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_subdomain_dofs(const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain_id,
- std::vector<bool> & selected_dofs);
+ extract_subdomain_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain_id,
+ std::vector<bool> & selected_dofs);
/**
* Extract the set of global DoF indices that are active on the current
* from the dof_indices_with_subdomain_association() function when called
* with the locally owned subdomain id.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_locally_active_dofs(const DoFHandlerType &dof_handler,
- IndexSet & dof_set);
+ extract_locally_active_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ IndexSet & dof_set);
/**
* Extract the set of global DoF indices that are active on the current
* not artificial (see
* @ref GlossArtificialCell "the glossary").
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_locally_relevant_dofs(const DoFHandlerType &dof_handler,
- IndexSet & dof_set);
+ extract_locally_relevant_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ IndexSet & dof_set);
/**
* also corresponds to the default value), then the union of the returned
* index sets equlas what DoFHandler::locally_owned_dofs() returns.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<IndexSet>
locally_owned_dofs_per_component(
- const DoFHandlerType &dof_handler,
- const ComponentMask & components = ComponentMask());
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const ComponentMask & components = ComponentMask());
/**
* For each processor, determine the set of locally owned degrees of freedom
* locally, and consequently can not say anything definitive about the
* degrees of freedom active on other processors' locally owned cells.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<IndexSet>
- locally_owned_dofs_per_subdomain(const DoFHandlerType &dof_handler);
+ locally_owned_dofs_per_subdomain(
+ const DoFHandler<dim, spacedim> &dof_handler);
/**
*
* locally, and consequently can not say anything definitive about the
* degrees of freedom active on other processors' locally owned cells.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<IndexSet>
- locally_relevant_dofs_per_subdomain(const DoFHandlerType &dof_handler);
+ locally_relevant_dofs_per_subdomain(
+ const DoFHandler<dim, spacedim> &dof_handler);
/**
* Same as extract_locally_relevant_dofs() but for multigrid DoFs for the
* given @p level.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_locally_relevant_level_dofs(const DoFHandlerType &dof_handler,
- const unsigned int level,
- IndexSet & dof_set);
+ extract_locally_relevant_level_dofs(
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ IndexSet & dof_set);
/**
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- get_subdomain_association(const DoFHandlerType & dof_handler,
+ get_subdomain_association(const DoFHandler<dim, spacedim> & dof_handler,
std::vector<types::subdomain_id> &subdomain);
/**
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
unsigned int
- count_dofs_with_subdomain_association(const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain);
+ count_dofs_with_subdomain_association(
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain);
/**
* Count how many degrees of freedom are uniquely associated with the given
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
count_dofs_with_subdomain_association(
- const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain,
- std::vector<unsigned int> &n_dofs_on_subdomain);
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain,
+ std::vector<unsigned int> & n_dofs_on_subdomain);
/**
* Return a set of indices that denotes the degrees of freedom that live on
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- dof_indices_with_subdomain_association(const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain);
+ dof_indices_with_subdomain_association(
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain);
// @}
/**
* @name DoF indices on patches of cells
* one considers the index into this array a local DoF index, then the local
* system that results retains the block structure of the global system.
*
- * @tparam DoFHandlerType A type that is either DoFHandler or
- * hp::DoFHandler. In C++, the compiler can not determine the type of
- * <code>DoFHandlerType</code> from the function call. You need to specify
- * it as an explicit template argument following the function name.
- *
* @param patch A collection of cells within an object of type
- * DoFHandlerType
+ * DoFHandler<dim, spacedim>::active_cell_iterator
*
* @return A list of those global degrees of freedom located on the patch,
* as defined above.
* degrees of freedom on these. In other words, this function can only work
* if all cells in the patch are either locally owned or ghost cells.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<types::global_dof_index>
get_dofs_on_patch(
- const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
+ const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
+ &patch);
+
+ /**
+ * The same as above.
+ *
+ * @deprecated Use the function that takes dim and spacedim as template
+ * argument.
+ */
+ template <typename DoFHandlerType>
+ DEAL_II_DEPRECATED std::vector<types::global_dof_index>
+ get_dofs_on_patch(
+ const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
/**
* Creates a sparsity pattern, which lists
* contains one vertex index for each block; if false, then the return value
* contains one block index or <tt>invalid_unsigned_int</tt> for each vertex.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<unsigned int>
- 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);
+ make_vertex_patches(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &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);
/**
* Same as above but allows boundary dofs on blocks to be excluded
* the patch if the boolean value for the corresponding block in the
* BlockMask of @p exclude_boundary_dofs is false.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<unsigned int>
- 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);
+ make_vertex_patches(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &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);
/**
* Create an incidence matrix that for every cell on a given level of a
* the domain, and thus need smoothing. This parameter has no effect if
* <tt>interior_dofs_only</tt> is false.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- make_child_patches(SparsityPattern & block_list,
- const DoFHandlerType &dof_handler,
- const unsigned int level,
- const bool interior_dofs_only,
- const bool boundary_dofs = false);
+ make_child_patches(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ const bool interior_dofs_only,
+ const bool boundary_dofs = false);
/**
* Create a block list with only a single patch, which in turn contains all
* @arg <tt>interior_dofs_only</tt>: if true, exclude degrees of freedom on
* the boundary of the domain.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- make_single_patch(SparsityPattern & block_list,
- const DoFHandlerType &dof_handler,
- const unsigned int level,
- const bool interior_dofs_only = false);
+ make_single_patch(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ const bool interior_dofs_only = false);
/**
* @}
* in @p target_component. If this is not the case, an assertion is thrown.
* The indices not targeted by target_components are left untouched.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<types::global_dof_index>
count_dofs_per_fe_component(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> &dof_handler,
const bool vector_valued_once = false,
const std::vector<unsigned int> &target_component = {});
* @deprecated A version of the previous function that returns its
* information through the non-`const` second argument.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
DEAL_II_DEPRECATED void
count_dofs_per_component(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
std::vector<types::global_dof_index> &dofs_per_component,
const bool vector_valued_once = false,
const std::vector<unsigned int> & target_component = {});
* element used by the dof_handler argument has blocks, or alternatively as
* many blocks as are enumerated in the target_blocks argument if given.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<types::global_dof_index>
- count_dofs_per_fe_block(const DoFHandlerType & dof,
+ count_dofs_per_fe_block(const DoFHandler<dim, spacedim> &dof,
const std::vector<unsigned int> &target_block =
std::vector<unsigned int>());
* @deprecated A version of the previous function that returns its
* information through the non-`const` second argument.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
DEAL_II_DEPRECATED void
- count_dofs_per_block(const DoFHandlerType & dof,
+ count_dofs_per_block(const DoFHandler<dim, spacedim> & dof,
std::vector<types::global_dof_index> &dofs_per_block,
const std::vector<unsigned int> & target_block =
std::vector<unsigned int>());
* finite element. For a hp::DoFHandler, the values may be different,
* though.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- get_active_fe_indices(const DoFHandlerType & dof_handler,
- std::vector<unsigned int> &active_fe_indices);
+ get_active_fe_indices(const DoFHandler<dim, spacedim> &dof_handler,
+ std::vector<unsigned int> & active_fe_indices);
/**
* Count how many degrees of freedom live on a set of cells (i.e., a patch)
* DoFTools::get_dofs_on_patch() will then help to make the connection
* between global degrees of freedom and the local ones.
*
- * @tparam DoFHandlerType A type that is either DoFHandler or
- * hp::DoFHandler. In C++, the compiler can not determine the type of
- * <code>DoFHandlerType</code> from the function call. You need to specify
- * it as an explicit template argument following the function name.
- *
* @param patch A collection of cells within an object of type
- * DoFHandlerType
+ * DoFHandler<dim, spacedim>
*
* @return The number of degrees of freedom associated with the cells of
* this patch.
* degrees of freedom on these. In other words, this function can only work
* if all cells in the patch are either locally owned or ghost cells.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
unsigned int
+ count_dofs_on_patch(
+ const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
+ &patch);
+
+ /**
+ * The same as above.
+ *
+ * @deprecated Use the function that takes dim and spacedim as template
+ * argument.
+ */
+ template <typename DoFHandlerType>
+ DEAL_II_DEPRECATED unsigned int
count_dofs_on_patch(
const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
*
* Prior content of @p mapping is deleted.
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- map_dof_to_boundary_indices(const DoFHandlerType & dof_handler,
+ map_dof_to_boundary_indices(const DoFHandler<dim, spacedim> & dof_handler,
std::vector<types::global_dof_index> &mapping);
/**
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- map_dof_to_boundary_indices(const DoFHandlerType & dof_handler,
+ map_dof_to_boundary_indices(const DoFHandler<dim, spacedim> & dof_handler,
const std::set<types::boundary_id> &boundary_ids,
std::vector<types::global_dof_index> &mapping);
* only the last value in the map returned by map_dofs_to_support_points() for
* each point will be returned.
*/
- template <typename DoFHandlerType, class Comp>
+ template <int dim, int spacedim, class Comp>
void
map_support_points_to_dofs(
- const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
- & mapping,
- const DoFHandlerType &dof_handler,
- std::map<Point<DoFHandlerType::space_dimension>,
- types::global_dof_index,
- Comp> & point_to_index_map);
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ std::map<Point<spacedim>, types::global_dof_index, Comp>
+ &point_to_index_map);
/**
* @}
*/
* functions that are non-zero in more than one vector component (in deal.II
* speak: they are non-primitive).
*/
- template <typename DoFHandlerType, typename Number>
+ template <int dim, int spacedim, typename Number>
void
- distribute_cell_to_dof_vector(const DoFHandlerType &dof_handler,
- const Vector<Number> &cell_data,
- Vector<double> & dof_data,
- const unsigned int component = 0);
+ distribute_cell_to_dof_vector(const DoFHandler<dim, spacedim> &dof_handler,
+ const Vector<Number> & cell_data,
+ Vector<double> & dof_data,
+ const unsigned int component = 0);
/**
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
make_zero_boundary_constraints(
- const DoFHandlerType<dim, spacedim> &dof,
- const types::boundary_id boundary_id,
- AffineConstraints<number> & zero_boundary_constraints,
- const ComponentMask & component_mask = ComponentMask());
+ const DoFHandler<dim, spacedim> &dof,
+ const types::boundary_id boundary_id,
+ AffineConstraints<number> & zero_boundary_constraints,
+ const ComponentMask & component_mask = ComponentMask());
/**
* Do the same as the previous function, except do it for all parts of the
*
* @ingroup constraints
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
make_zero_boundary_constraints(
- const DoFHandlerType<dim, spacedim> &dof,
- AffineConstraints<number> & zero_boundary_constraints,
- const ComponentMask & component_mask = ComponentMask());
+ const DoFHandler<dim, spacedim> &dof,
+ AffineConstraints<number> & zero_boundary_constraints,
+ const ComponentMask & component_mask = ComponentMask());
/**
* @}
// ---------------------- inline and template functions --------------------
- template <typename DoFHandlerType, class Comp>
+ template <int dim, int spacedim, class Comp>
void
map_support_points_to_dofs(
- const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
- & mapping,
- const DoFHandlerType &dof_handler,
- std::map<Point<DoFHandlerType::space_dimension>,
- types::global_dof_index,
- Comp> & point_to_index_map)
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ std::map<Point<spacedim>, types::global_dof_index, Comp>
+ &point_to_index_map)
{
// let the checking of arguments be
// done by the function first
// called
- std::vector<Point<DoFHandlerType::space_dimension>> support_points(
- dof_handler.n_dofs());
+ std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
map_dofs_to_support_points(mapping, dof_handler, support_points);
// now copy over the results of the
// previous function into the
for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
point_to_index_map[support_points[i]] = i;
}
+
+
+
+ template <typename DoFHandlerType, typename number>
+ inline void
+ make_periodicity_constraints(
+ const std::vector<
+ GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>
+ & periodic_faces,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask,
+ const std::vector<unsigned int> &first_vector_components,
+ const number periodicity_factor)
+ {
+ make_periodicity_constraints<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>(
+ periodic_faces,
+ constraints,
+ component_mask,
+ first_vector_components,
+ periodicity_factor);
+ }
+
+
+
+ template <typename DoFHandlerType>
+ inline std::vector<types::global_dof_index>
+ get_dofs_on_patch(
+ const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
+ {
+ return get_dofs_on_patch<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>(patch);
+ }
+
+
+
+ template <typename DoFHandlerType>
+ inline unsigned int
+ count_dofs_on_patch(
+ const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
+ {
+ return count_dofs_on_patch<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>(patch);
+ }
} // namespace DoFTools
#endif
// shape function
// - otherwise, the shape function is assigned the first component selected
// in the component_mask that corresponds to this shape function
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- get_component_association(const DoFHandlerType & dof,
- const ComponentMask & component_mask,
+ get_component_association(const DoFHandler<dim, spacedim> &dof,
+ const ComponentMask & component_mask,
std::vector<unsigned char> &dofs_by_component)
{
- const dealii::hp::FECollection<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>
- &fe_collection = dof.get_fe_collection();
+ const dealii::hp::FECollection<dim, spacedim> &fe_collection =
+ dof.get_fe_collection();
Assert(fe_collection.n_components() < 256, ExcNotImplemented());
Assert(dofs_by_component.size() == dof.n_locally_owned_dofs(),
ExcDimensionMismatch(dofs_by_component.size(),
fe_collection.size());
for (unsigned int f = 0; f < fe_collection.size(); ++f)
{
- const FiniteElement<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe =
- fe_collection[f];
+ const FiniteElement<dim, spacedim> &fe = fe_collection[f];
local_component_association[f] =
get_local_component_association(fe, component_mask);
}
// vector block. if the DoFHandler is based on a parallel distributed
// triangulation then the output array is index by
// dof.locally_owned_dofs().index_within_set(indices[i])
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
inline void
- get_block_association(const DoFHandlerType & dof,
- std::vector<unsigned char> &dofs_by_block)
+ get_block_association(const DoFHandler<dim, spacedim> &dof,
+ std::vector<unsigned char> & dofs_by_block)
{
- const dealii::hp::FECollection<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>
- &fe_collection = dof.get_fe_collection();
+ const dealii::hp::FECollection<dim, spacedim> &fe_collection =
+ dof.get_fe_collection();
Assert(fe_collection.n_components() < 256, ExcNotImplemented());
Assert(dofs_by_block.size() == dof.n_locally_owned_dofs(),
ExcDimensionMismatch(dofs_by_block.size(),
fe_collection.size());
for (unsigned int f = 0; f < fe_collection.size(); ++f)
{
- const FiniteElement<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe =
- fe_collection[f];
+ const FiniteElement<dim, spacedim> &fe = fe_collection[f];
local_block_association[f].resize(fe.dofs_per_cell,
static_cast<unsigned char>(-1));
for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
- template <typename DoFHandlerType, typename Number>
+ template <int dim, int spacedim, typename Number>
void
- distribute_cell_to_dof_vector(const DoFHandlerType &dof_handler,
- const Vector<Number> &cell_data,
- Vector<double> & dof_data,
- const unsigned int component)
+ distribute_cell_to_dof_vector(const DoFHandler<dim, spacedim> &dof_handler,
+ const Vector<Number> & cell_data,
+ Vector<double> & dof_data,
+ const unsigned int component)
{
- const unsigned int dim = DoFHandlerType::dimension;
- const unsigned int spacedim = DoFHandlerType::space_dimension;
const Triangulation<dim, spacedim> &tria = dof_handler.get_triangulation();
(void)tria;
// count how often we have added a value in the sum for each dof
std::vector<unsigned char> touch_count(dof_handler.n_dofs(), 0);
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
std::vector<types::global_dof_index> dof_indices;
dof_indices.reserve(fe_collection.max_dofs_per_cell());
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_dofs(const DoFHandlerType &dof,
- const ComponentMask & component_mask,
- std::vector<bool> & selected_dofs)
+ extract_dofs(const DoFHandler<dim, spacedim> &dof,
+ const ComponentMask & component_mask,
+ std::vector<bool> & selected_dofs)
{
Assert(component_mask.represents_n_components(
dof.get_fe_collection().n_components()),
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- extract_dofs(const DoFHandlerType &dof, const ComponentMask &component_mask)
+ extract_dofs(const DoFHandler<dim, spacedim> &dof,
+ const ComponentMask & component_mask)
{
Assert(component_mask.represents_n_components(
dof.get_fe_collection().n_components()),
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_dofs(const DoFHandlerType &dof,
- const BlockMask & block_mask,
- std::vector<bool> & selected_dofs)
+ extract_dofs(const DoFHandler<dim, spacedim> &dof,
+ const BlockMask & block_mask,
+ std::vector<bool> & selected_dofs)
{
// simply forward to the function that works based on a component mask
- extract_dofs<DoFHandlerType>(
+ extract_dofs<dim, spacedim>(
dof, dof.get_fe_collection().component_mask(block_mask), selected_dofs);
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- extract_dofs(const DoFHandlerType &dof, const BlockMask &block_mask)
+ extract_dofs(const DoFHandler<dim, spacedim> &dof,
+ const BlockMask & block_mask)
{
// simply forward to the function that works based on a component mask
- return extract_dofs<DoFHandlerType>(
+ return extract_dofs<dim, spacedim>(
dof, dof.get_fe_collection().component_mask(block_mask));
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<IndexSet>
- locally_owned_dofs_per_component(const DoFHandlerType &dof,
- const ComponentMask & component_mask)
+ locally_owned_dofs_per_component(const DoFHandler<dim, spacedim> &dof,
+ const ComponentMask &component_mask)
{
const auto n_comps = dof.get_fe_collection().n_components();
Assert(component_mask.represents_n_components(n_comps),
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_level_dofs(const unsigned int level,
- const DoFHandlerType &dof,
- const ComponentMask & component_mask,
- std::vector<bool> & selected_dofs)
+ extract_level_dofs(const unsigned int level,
+ const DoFHandler<dim, spacedim> &dof,
+ const ComponentMask & component_mask,
+ std::vector<bool> & selected_dofs)
{
- const FiniteElement<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe = dof.get_fe();
+ const FiniteElement<dim, spacedim> &fe = dof.get_fe();
Assert(component_mask.represents_n_components(
dof.get_fe_collection().n_components()),
local_selected_dofs[i] = component_mask[local_component_asssociation[i]];
// then loop over all cells and do work
- std::vector<types::global_dof_index> indices(fe.dofs_per_cell);
- typename DoFHandlerType::level_cell_iterator c;
+ std::vector<types::global_dof_index> indices(fe.dofs_per_cell);
+ typename DoFHandler<dim, spacedim>::level_cell_iterator c;
for (c = dof.begin(level); c != dof.end(level); ++c)
{
c->get_mg_dof_indices(indices);
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_level_dofs(const unsigned int level,
- const DoFHandlerType &dof,
- const BlockMask & block_mask,
- std::vector<bool> & selected_dofs)
+ extract_level_dofs(const unsigned int level,
+ const DoFHandler<dim, spacedim> &dof,
+ const BlockMask & block_mask,
+ std::vector<bool> & selected_dofs)
{
// simply defer to the other extract_level_dofs() function
extract_level_dofs(level,
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_boundary_dofs(const DoFHandlerType & dof_handler,
+ extract_boundary_dofs(const DoFHandler<dim, spacedim> & dof_handler,
const ComponentMask & component_mask,
std::vector<bool> & selected_dofs,
const std::set<types::boundary_id> &boundary_ids)
{
- Assert((dynamic_cast<const parallel::distributed::Triangulation<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ Assert((dynamic_cast<
+ const parallel::distributed::Triangulation<dim, spacedim> *>(
&dof_handler.get_triangulation()) == nullptr),
ExcMessage(
"This function can not be used with distributed triangulations. "
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_boundary_dofs(const DoFHandlerType & dof_handler,
+ extract_boundary_dofs(const DoFHandler<dim, spacedim> & dof_handler,
const ComponentMask & component_mask,
IndexSet & selected_dofs,
const std::set<types::boundary_id> &boundary_ids)
Assert(boundary_ids.find(numbers::internal_face_boundary_id) ==
boundary_ids.end(),
ExcInvalidBoundaryIndicator());
- const unsigned int dim = DoFHandlerType::dimension;
// first reset output argument
selected_dofs.clear();
// only work on cells that are either locally owned or at least ghost
// cells
if (cell->is_artificial() == false)
- for (const unsigned int face :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int face : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(face))
if (!check_boundary_id ||
(boundary_ids.find(cell->face(face)->boundary_id()) !=
boundary_ids.end()))
{
- const FiniteElement<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe =
- cell->get_fe();
+ const FiniteElement<dim, spacedim> &fe = cell->get_fe();
const unsigned int dofs_per_face = fe.dofs_per_face;
face_dof_indices.resize(dofs_per_face);
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
extract_dofs_with_support_on_boundary(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
const ComponentMask & component_mask,
std::vector<bool> & selected_dofs,
const std::set<types::boundary_id> &boundary_ids)
// boundary line is also part of a boundary face which we will be
// visiting sooner or later
for (const auto &cell : dof_handler.active_cell_iterators())
- for (const unsigned int face :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int face : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(face))
if (!check_boundary_id ||
(boundary_ids.find(cell->face(face)->boundary_id()) !=
boundary_ids.end()))
{
- const FiniteElement<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe =
- cell->get_fe();
+ const FiniteElement<dim, spacedim> &fe = cell->get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
cell_dof_indices.resize(dofs_per_cell);
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
IndexSet
extract_dofs_with_support_contained_within(
- const DoFHandlerType &dof_handler,
+ const DoFHandler<dim, spacedim> &dof_handler,
const std::function<
- bool(const typename DoFHandlerType::active_cell_iterator &)> &predicate,
- const AffineConstraints<number> & cm)
+ bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
+ & predicate,
+ const AffineConstraints<number> &cm)
{
const std::function<bool(
- const typename DoFHandlerType::active_cell_iterator &)>
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
predicate_local =
- [=](const typename DoFHandlerType::active_cell_iterator &cell) -> bool {
- return cell->is_locally_owned() && predicate(cell);
- };
+ [=](
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell)
+ -> bool { return cell->is_locally_owned() && predicate(cell); };
std::vector<types::global_dof_index> local_dof_indices;
local_dof_indices.reserve(
// Get all the dofs that live on the subdomain:
std::set<types::global_dof_index> predicate_dofs;
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
if (!cell->is_artificial() && predicate(cell))
{
// Get halo layer and accumulate its DoFs
std::set<types::global_dof_index> dofs_with_support_on_halo_cells;
- const std::vector<typename DoFHandlerType::active_cell_iterator>
+ const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
halo_cells =
GridTools::compute_active_cell_halo_layer(dof_handler, predicate_local);
- for (typename std::vector<
- typename DoFHandlerType::active_cell_iterator>::const_iterator it =
+ for (typename std::vector<typename DoFHandler<dim, spacedim>::
+ active_cell_iterator>::const_iterator it =
halo_cells.begin();
it != halo_cells.end();
++it)
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_hanging_node_dofs(const DoFHandlerType &dof_handler,
- std::vector<bool> & selected_dofs)
+ extract_hanging_node_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ std::vector<bool> & selected_dofs)
{
const IndexSet selected_dofs_as_index_set =
extract_hanging_node_dofs(dof_handler);
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- extract_hanging_node_dofs(const DoFHandlerType &dof_handler)
+ extract_hanging_node_dofs(const DoFHandler<dim, spacedim> &dof_handler)
{
return internal::extract_hanging_node_dofs(dof_handler);
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_subdomain_dofs(const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain_id,
- std::vector<bool> & selected_dofs)
+ extract_subdomain_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain_id,
+ std::vector<bool> & selected_dofs)
{
Assert(selected_dofs.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(selected_dofs.size(), dof_handler.n_dofs()));
// this function is similar to the make_sparsity_pattern function, see
// there for more information
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
if (cell->subdomain_id() == subdomain_id)
{
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_locally_active_dofs(const DoFHandlerType &dof_handler,
- IndexSet & dof_set)
+ extract_locally_active_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ IndexSet & dof_set)
{
// collect all the locally owned dofs
dof_set = dof_handler.locally_owned_dofs();
std::vector<types::global_dof_index> dof_indices;
std::set<types::global_dof_index> global_dof_indices;
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
if (cell->is_locally_owned())
{
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_locally_relevant_dofs(const DoFHandlerType &dof_handler,
- IndexSet & dof_set)
+ extract_locally_relevant_dofs(const DoFHandler<dim, spacedim> &dof_handler,
+ IndexSet & dof_set)
{
// collect all the locally owned dofs
dof_set = dof_handler.locally_owned_dofs();
std::vector<types::global_dof_index> dof_indices;
std::vector<types::global_dof_index> dofs_on_ghosts;
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
if (cell->is_ghost())
{
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_locally_relevant_level_dofs(const DoFHandlerType &dof_handler,
- const unsigned int level,
- IndexSet & dof_set)
+ extract_locally_relevant_level_dofs(
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ IndexSet & dof_set)
{
// collect all the locally owned dofs
dof_set = dof_handler.locally_owned_mg_dofs(level);
std::vector<types::global_dof_index> dof_indices;
std::vector<types::global_dof_index> dofs_on_ghosts;
- typename DoFHandlerType::cell_iterator cell = dof_handler.begin(level),
- endc = dof_handler.end(level);
+ typename DoFHandler<dim, spacedim>::cell_iterator cell = dof_handler.begin(
+ level),
+ endc =
+ dof_handler.end(level);
for (; cell != endc; ++cell)
{
const types::subdomain_id id = cell->level_subdomain_id();
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- extract_constant_modes(const DoFHandlerType & dof_handler,
- const ComponentMask & component_mask,
- std::vector<std::vector<bool>> &constant_modes)
+ extract_constant_modes(const DoFHandler<dim, spacedim> &dof_handler,
+ const ComponentMask & component_mask,
+ std::vector<std::vector<bool>> & constant_modes)
{
// If there are no locally owned DoFs, return with an empty
// constant_modes object:
//
// TODO: We might be able to extend this also for elements which do not
// have the same constant modes, but that is messy...
- const dealii::hp::FECollection<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>
- & fe_collection = dof_handler.get_fe_collection();
+ const dealii::hp::FECollection<dim, spacedim> &fe_collection =
+ dof_handler.get_fe_collection();
std::vector<Table<2, bool>> element_constant_modes;
std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
constant_mode_to_component_translation(n_components);
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- get_active_fe_indices(const DoFHandlerType & dof_handler,
- std::vector<unsigned int> &active_fe_indices)
+ get_active_fe_indices(const DoFHandler<dim, spacedim> &dof_handler,
+ std::vector<unsigned int> & active_fe_indices)
{
AssertDimension(active_fe_indices.size(),
dof_handler.get_triangulation().n_active_cells());
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<IndexSet>
- locally_owned_dofs_per_subdomain(const DoFHandlerType &dof_handler)
+ locally_owned_dofs_per_subdomain(const DoFHandler<dim, spacedim> &dof_handler)
{
Assert(dof_handler.n_dofs() > 0,
ExcMessage("The given DoFHandler has no DoFs."));
// If the Triangulation is distributed, the only thing we can usefully
// ask is for its locally owned subdomain
- Assert((dynamic_cast<const parallel::distributed::Triangulation<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ Assert((dynamic_cast<
+ const parallel::distributed::Triangulation<dim, spacedim> *>(
&dof_handler.get_triangulation()) == nullptr),
ExcMessage(
"For parallel::distributed::Triangulation objects and "
// collect information for each subdomain index anyway, not just for the
// used one.)
const unsigned int n_subdomains =
- (dynamic_cast<const parallel::TriangulationBase<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
&dof_handler.get_triangulation()) == nullptr ?
[&dof_handler]() {
unsigned int max_subdomain_id = 0;
return max_subdomain_id + 1;
}() :
Utilities::MPI::n_mpi_processes(
- dynamic_cast<const parallel::TriangulationBase<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
&dof_handler.get_triangulation())
->get_communicator()));
Assert(n_subdomains > *std::max_element(subdomain_association.begin(),
return index_sets;
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<IndexSet>
- locally_relevant_dofs_per_subdomain(const DoFHandlerType &dof_handler)
+ locally_relevant_dofs_per_subdomain(
+ const DoFHandler<dim, spacedim> &dof_handler)
{
// If the Triangulation is distributed, the only thing we can usefully
// ask is for its locally owned subdomain
- Assert((dynamic_cast<const parallel::distributed::Triangulation<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ Assert((dynamic_cast<
+ const parallel::distributed::Triangulation<dim, spacedim> *>(
&dof_handler.get_triangulation()) == nullptr),
ExcMessage(
"For parallel::distributed::Triangulation objects and "
{
// Extract the layer of cells around this subdomain
std::function<bool(
- const typename DoFHandlerType::active_cell_iterator &)>
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
predicate = IteratorFilters::SubdomainEqualTo(subdomain_id);
- const std::vector<typename DoFHandlerType::active_cell_iterator>
+ const std::vector<
+ typename DoFHandler<dim, spacedim>::active_cell_iterator>
active_halo_layer =
GridTools::compute_active_cell_halo_layer(dof_handler, predicate);
std::vector<types::global_dof_index> local_dof_indices;
std::set<types::global_dof_index> subdomain_halo_global_dof_indices;
for (typename std::vector<
- typename DoFHandlerType::active_cell_iterator>::const_iterator
- it_cell = active_halo_layer.begin();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator>::
+ const_iterator it_cell = active_halo_layer.begin();
it_cell != active_halo_layer.end();
++it_cell)
{
- const typename DoFHandlerType::active_cell_iterator &cell =
- *it_cell;
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator
+ &cell = *it_cell;
Assert(
cell->subdomain_id() != subdomain_id,
ExcMessage(
return dof_set;
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
get_subdomain_association(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
std::vector<types::subdomain_id> &subdomain_association)
{
// if the Triangulation is distributed, the only thing we can usefully
// ask is for its locally owned subdomain
- Assert((dynamic_cast<const parallel::distributed::Triangulation<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ Assert((dynamic_cast<
+ const parallel::distributed::Triangulation<dim, spacedim> *>(
&dof_handler.get_triangulation()) == nullptr),
ExcMessage(
"For parallel::distributed::Triangulation objects and "
// subdomain_id as stored in cell->subdomain_id().
std::vector<types::subdomain_id> cell_owners(
dof_handler.get_triangulation().n_active_cells());
- if (const parallel::shared::Triangulation<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>
- *tr = (dynamic_cast<const parallel::shared::Triangulation<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ if (const parallel::shared::Triangulation<dim, spacedim> *tr =
+ (dynamic_cast<const parallel::shared::Triangulation<dim, spacedim> *>(
&dof_handler.get_triangulation())))
{
cell_owners = tr->get_true_subdomain_ids_of_cells();
}
else
{
- for (typename DoFHandlerType::active_cell_iterator cell =
+ for (typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
dof_handler.begin_active();
cell != dof_handler.end();
cell++)
// loop over all cells and record which subdomain a DoF belongs to.
// give to the smaller subdomain_id in case it is on an interface
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
{
const types::subdomain_id subdomain_id =
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
unsigned int
- count_dofs_with_subdomain_association(const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain)
+ count_dofs_with_subdomain_association(
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain)
{
std::vector<types::subdomain_id> subdomain_association(
dof_handler.n_dofs());
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
IndexSet
- dof_indices_with_subdomain_association(const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain)
+ dof_indices_with_subdomain_association(
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain)
{
// If we have a distributed::Triangulation only allow locally_owned
// subdomain.
// more expensive than a vector
std::vector<types::global_dof_index> subdomain_indices;
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
if ((cell->is_artificial() == false) &&
(cell->subdomain_id() == subdomain))
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
count_dofs_with_subdomain_association(
- const DoFHandlerType & dof_handler,
- const types::subdomain_id subdomain,
- std::vector<unsigned int> &n_dofs_on_subdomain)
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const types::subdomain_id subdomain,
+ std::vector<unsigned int> & n_dofs_on_subdomain)
{
Assert(n_dofs_on_subdomain.size() == dof_handler.get_fe(0).n_components(),
ExcDimensionMismatch(n_dofs_on_subdomain.size(),
// Make sure there are at least some cells with this subdomain id
Assert(std::any_of(
dof_handler.begin_active(),
- typename DoFHandlerType::active_cell_iterator{dof_handler.end()},
- [subdomain](const typename DoFHandlerType::cell_accessor &cell) {
+ typename DoFHandler<dim, spacedim>::active_cell_iterator{
+ dof_handler.end()},
+ [subdomain](
+ const typename DoFHandler<dim, spacedim>::cell_accessor &cell) {
return cell.subdomain_id() == subdomain;
}),
ExcMessage("There are no cells for the given subdomain!"));
// deprecated function
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
count_dofs_per_component(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
std::vector<types::global_dof_index> &dofs_per_component,
const bool only_once,
const std::vector<unsigned int> & target_component)
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<types::global_dof_index>
count_dofs_per_fe_component(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> &dof_handler,
const bool only_once,
const std::vector<unsigned int> &target_component_)
{
// reduce information from all CPUs
#ifdef DEAL_II_WITH_MPI
- const unsigned int dim = DoFHandlerType::dimension;
- const unsigned int spacedim = DoFHandlerType::space_dimension;
if (const parallel::TriangulationBase<dim, spacedim> *tria =
(dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
// deprecated function
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- count_dofs_per_block(const DoFHandlerType & dof_handler,
+ count_dofs_per_block(const DoFHandler<dim, spacedim> & dof_handler,
std::vector<types::global_dof_index> &dofs_per_block,
const std::vector<unsigned int> & target_block)
{
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<types::global_dof_index>
- count_dofs_per_fe_block(const DoFHandlerType & dof_handler,
+ count_dofs_per_fe_block(const DoFHandler<dim, spacedim> &dof_handler,
const std::vector<unsigned int> &target_block_)
{
- const dealii::hp::FECollection<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>
- &fe_collection = dof_handler.get_fe_collection();
+ const dealii::hp::FECollection<dim, spacedim> &fe_collection =
+ dof_handler.get_fe_collection();
Assert(fe_collection.size() < 256, ExcNotImplemented());
// If the empty vector for target_block(e.g., as default argument), then
this_fe < fe_collection.size();
++this_fe)
{
- const FiniteElement<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe =
- fe_collection[this_fe];
+ const FiniteElement<dim, spacedim> &fe = fe_collection[this_fe];
std::vector<unsigned char> dofs_by_block(
dof_handler.n_locally_owned_dofs());
#ifdef DEAL_II_WITH_MPI
// if we are working on a parallel mesh, we now need to collect
// this information from all processors
- if (const parallel::TriangulationBase<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>
- *tria = (dynamic_cast<const parallel::TriangulationBase<
- DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> *>(
+ if (const parallel::TriangulationBase<dim, spacedim> *tria =
+ (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
&dof_handler.get_triangulation())))
{
std::vector<types::global_dof_index> local_dof_count =
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- map_dof_to_boundary_indices(const DoFHandlerType & dof_handler,
+ map_dof_to_boundary_indices(const DoFHandler<dim, spacedim> & dof_handler,
std::vector<types::global_dof_index> &mapping)
{
mapping.clear();
// do not support boundaries of dimension dim-2, and so every isolated
// boundary line is also part of a boundary face which we will be
// visiting sooner or later
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
- for (const unsigned int f :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int f : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(f))
{
const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- map_dof_to_boundary_indices(const DoFHandlerType & dof_handler,
+ map_dof_to_boundary_indices(const DoFHandler<dim, spacedim> & dof_handler,
const std::set<types::boundary_id> &boundary_ids,
std::vector<types::global_dof_index> &mapping)
{
dofs_on_face.reserve(dof_handler.get_fe_collection().max_dofs_per_face());
types::global_dof_index next_boundary_index = 0;
- typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell != endc; ++cell)
- for (const unsigned int f :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int f : GeometryInfo<dim>::face_indices())
if (boundary_ids.find(cell->face(f)->boundary_id()) !=
boundary_ids.end())
{
{
namespace
{
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
map_dofs_to_support_points(
- const hp::MappingCollection<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &mapping,
- const DoFHandlerType & dof_handler,
- std::map<types::global_dof_index,
- Point<DoFHandlerType::space_dimension>> &support_points,
- const ComponentMask & in_mask)
+ const hp::MappingCollection<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ std::map<types::global_dof_index, Point<spacedim>> &support_points,
+ const ComponentMask & in_mask)
{
- const unsigned int dim = DoFHandlerType::dimension;
- const unsigned int spacedim = DoFHandlerType::space_dimension;
-
const hp::FECollection<dim, spacedim> &fe_collection =
dof_handler.get_fe_collection();
hp::QCollection<dim> q_coll_dummy;
//
// The weights of the quadrature rule have been set to invalid
// values by the used constructor.
- hp::FEValues<dim, spacedim> hp_fe_values(mapping,
+ hp::FEValues<dim, spacedim> hp_fe_values(mapping,
fe_collection,
q_coll_dummy,
update_quadrature_points);
- typename DoFHandlerType::active_cell_iterator cell = dof_handler
- .begin_active(),
- endc = dof_handler.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
std::vector<types::global_dof_index> local_dof_indices;
for (; cell != endc; ++cell)
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
map_dofs_to_support_points(
- const hp::MappingCollection<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &mapping,
- const DoFHandlerType & dof_handler,
- std::vector<Point<DoFHandlerType::space_dimension>> &support_points,
- const ComponentMask & mask)
+ const hp::MappingCollection<dim, spacedim> &mapping,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ std::vector<Point<spacedim>> & support_points,
+ const ComponentMask & mask)
{
// get the data in the form of the map as above
- std::map<types::global_dof_index,
- Point<DoFHandlerType::space_dimension>>
- x_support_points;
+ std::map<types::global_dof_index, Point<spacedim>> x_support_points;
map_dofs_to_support_points(mapping,
dof_handler,
x_support_points,
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- make_single_patch(SparsityPattern & block_list,
- const DoFHandlerType &dof_handler,
- const unsigned int level,
- const bool interior_only)
+ make_single_patch(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ const bool interior_only)
{
- const FiniteElement<DoFHandlerType::dimension> &fe = dof_handler.get_fe();
+ const FiniteElement<dim> &fe = dof_handler.get_fe();
block_list.reinit(1, dof_handler.n_dofs(level), dof_handler.n_dofs(level));
- typename DoFHandlerType::level_cell_iterator cell;
- typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level);
+ typename DoFHandler<dim, spacedim>::level_cell_iterator cell;
+ typename DoFHandler<dim, spacedim>::level_cell_iterator endc =
+ dof_handler.end(level);
std::vector<types::global_dof_index> indices;
std::vector<bool> exclude;
std::fill(exclude.begin(), exclude.end(), false);
const unsigned int dpf = fe.dofs_per_face;
- for (const unsigned int face :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int face : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(face) ||
cell->neighbor(face)->level() != cell->level())
for (unsigned int i = 0; i < dpf; ++i)
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
void
- make_child_patches(SparsityPattern & block_list,
- const DoFHandlerType &dof_handler,
- const unsigned int level,
- const bool interior_dofs_only,
- const bool boundary_dofs)
+ make_child_patches(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ const bool interior_dofs_only,
+ const bool boundary_dofs)
{
Assert(level > 0 && level < dof_handler.get_triangulation().n_levels(),
ExcIndexRange(level, 1, dof_handler.get_triangulation().n_levels()));
- typename DoFHandlerType::level_cell_iterator pcell =
+ typename DoFHandler<dim, spacedim>::level_cell_iterator pcell =
dof_handler.begin(level - 1);
- typename DoFHandlerType::level_cell_iterator endc =
+ typename DoFHandler<dim, spacedim>::level_cell_iterator endc =
dof_handler.end(level - 1);
std::vector<types::global_dof_index> indices;
for (unsigned int child = 0; child < pcell->n_children(); ++child)
{
- const typename DoFHandlerType::level_cell_iterator cell =
+ const typename DoFHandler<dim, spacedim>::level_cell_iterator cell =
pcell->child(child);
// For hp, only this line here would have to be replaced.
- const FiniteElement<DoFHandlerType::dimension> &fe =
- dof_handler.get_fe();
- const unsigned int n_dofs = fe.dofs_per_cell;
+ const FiniteElement<dim> &fe = dof_handler.get_fe();
+ const unsigned int n_dofs = fe.dofs_per_cell;
indices.resize(n_dofs);
exclude.resize(n_dofs);
std::fill(exclude.begin(), exclude.end(), false);
// of the parent
const unsigned int dpf = fe.dofs_per_face;
- for (unsigned int d = 0; d < DoFHandlerType::dimension; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
- const unsigned int face = GeometryInfo<
- DoFHandlerType::dimension>::vertex_to_face[child][d];
+ const unsigned int face =
+ GeometryInfo<dim>::vertex_to_face[child][d];
for (unsigned int i = 0; i < dpf; ++i)
exclude[fe.face_to_cell_index(i, face)] = true;
}
// from the exclusion list
if (boundary_dofs)
for (const unsigned int face :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ GeometryInfo<dim>::face_indices())
if (cell->at_boundary(face))
for (unsigned int i = 0; i < dpf; ++i)
exclude[fe.face_to_cell_index(i, face)] = false;
}
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<unsigned int>
- make_vertex_patches(SparsityPattern & block_list,
- const DoFHandlerType &dof_handler,
- const unsigned int level,
- const bool interior_only,
- const bool boundary_patches,
- const bool level_boundary_patches,
- const bool single_cell_patches,
- const bool invert_vertex_mapping)
+ make_vertex_patches(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ const bool interior_only,
+ const bool boundary_patches,
+ const bool level_boundary_patches,
+ const bool single_cell_patches,
+ const bool invert_vertex_mapping)
{
const unsigned int n_blocks = dof_handler.get_fe().n_blocks();
BlockMask exclude_boundary_dofs = BlockMask(n_blocks, interior_only);
invert_vertex_mapping);
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<unsigned int>
- make_vertex_patches(SparsityPattern & block_list,
- const DoFHandlerType &dof_handler,
- const unsigned int level,
- const BlockMask & exclude_boundary_dofs,
- const bool boundary_patches,
- const bool level_boundary_patches,
- const bool single_cell_patches,
- const bool invert_vertex_mapping)
+ make_vertex_patches(SparsityPattern & block_list,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ const unsigned int level,
+ const BlockMask & exclude_boundary_dofs,
+ const bool boundary_patches,
+ const bool level_boundary_patches,
+ const bool single_cell_patches,
+ const bool invert_vertex_mapping)
{
- typename DoFHandlerType::level_cell_iterator cell;
- typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level);
+ typename DoFHandler<dim, spacedim>::level_cell_iterator cell;
+ typename DoFHandler<dim, spacedim>::level_cell_iterator endc =
+ dof_handler.end(level);
// Vector mapping from vertex index in the triangulation to consecutive
// block indices on this level The number of cells at a vertex
// Identify all vertices active on this level and remember some data
// about them
for (cell = dof_handler.begin(level); cell != endc; ++cell)
- for (const unsigned int v :
- GeometryInfo<DoFHandlerType::dimension>::vertex_indices())
+ for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
{
const unsigned int vg = cell->vertex_index(v);
vertex_dof_count[vg] += cell->get_fe().dofs_per_cell;
++vertex_cell_count[vg];
- for (unsigned int d = 0; d < DoFHandlerType::dimension; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
- const unsigned int face =
- GeometryInfo<DoFHandlerType::dimension>::vertex_to_face[v][d];
+ const unsigned int face = GeometryInfo<dim>::vertex_to_face[v][d];
if (cell->at_boundary(face))
vertex_boundary[vg] = true;
else if ((!level_boundary_patches) &&
for (cell = dof_handler.begin(level); cell != endc; ++cell)
{
- const FiniteElement<DoFHandlerType::dimension> &fe = cell->get_fe();
+ const FiniteElement<dim> &fe = cell->get_fe();
indices.resize(fe.dofs_per_cell);
cell->get_mg_dof_indices(indices);
- for (const unsigned int v :
- GeometryInfo<DoFHandlerType::dimension>::vertex_indices())
+ for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
{
const unsigned int vg = cell->vertex_index(v);
const unsigned int block = vertex_mapping[vg];
std::fill(exclude.begin(), exclude.end(), false);
const unsigned int dpf = fe.dofs_per_face;
- for (unsigned int d = 0; d < DoFHandlerType::dimension; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
- const unsigned int a_face = GeometryInfo<
- DoFHandlerType::dimension>::vertex_to_face[v][d];
- const unsigned int face = GeometryInfo<
- DoFHandlerType::dimension>::opposite_face[a_face];
+ const unsigned int a_face =
+ GeometryInfo<dim>::vertex_to_face[v][d];
+ const unsigned int face =
+ GeometryInfo<dim>::opposite_face[a_face];
for (unsigned int i = 0; i < dpf; ++i)
{
// For each dof, get the block it is in and decide to
}
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
unsigned int
count_dofs_on_patch(
- const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
+ const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
+ &patch)
{
std::set<types::global_dof_index> dofs_on_patch;
std::vector<types::global_dof_index> local_dof_indices;
// all duplicates are ignored
for (unsigned int i = 0; i < patch.size(); ++i)
{
- const typename DoFHandlerType::active_cell_iterator cell = patch[i];
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
+ patch[i];
Assert(cell->is_artificial() == false,
ExcMessage("This function can not be called with cells that are "
"not either locally owned or ghost cells."));
- template <typename DoFHandlerType>
+ template <int dim, int spacedim>
std::vector<types::global_dof_index>
get_dofs_on_patch(
- const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
+ const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
+ &patch)
{
std::set<types::global_dof_index> dofs_on_patch;
std::vector<types::global_dof_index> local_dof_indices;
// all duplicates are ignored
for (unsigned int i = 0; i < patch.size(); ++i)
{
- const typename DoFHandlerType::active_cell_iterator cell = patch[i];
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
+ patch[i];
Assert(cell->is_artificial() == false,
ExcMessage("This function can not be called with cells that are "
"not either locally owned or ghost cells."));
local_dof_indices.end());
}
- Assert(dofs_on_patch.size() == count_dofs_on_patch<DoFHandlerType>(patch),
+ Assert((dofs_on_patch.size() == count_dofs_on_patch<dim, spacedim>(patch)),
ExcInternalError());
// return a vector with the content of the set above. copying
// ---------------------------------------------------------------------
-for (DoFHandler : DOFHANDLER_TEMPLATES;
- deal_II_dimension, deal_II_space_dimension : DIMENSIONS)
+for (deal_II_dimension, deal_II_space_dimension : DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
namespace DoFTools
\{
template void
- extract_locally_relevant_dofs<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_locally_relevant_dofs<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension>
& dof_handler,
IndexSet &dof_set);
template void
- extract_locally_relevant_level_dofs<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_locally_relevant_level_dofs<deal_II_dimension,
+ deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension>
& dof_handler,
const unsigned int level,
IndexSet & dof_set);
template void
- extract_locally_active_dofs<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_locally_active_dofs<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension>
& dof_handler,
IndexSet &dof_set);
template std::vector<IndexSet>
- locally_owned_dofs_per_component<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ locally_owned_dofs_per_component<deal_II_dimension,
+ deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension>
& dof_handler,
const ComponentMask &components);
// deprecated versions of the count_dofs_per_*() functions
template void
- count_dofs_per_component<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ count_dofs_per_component<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
std::vector<types::global_dof_index> &,
const bool,
const std::vector<unsigned int> &);
template void
- count_dofs_per_block<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ count_dofs_per_block<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
std::vector<types::global_dof_index> &,
const std::vector<unsigned int> &);
// new versions of the count_dofs_per_*() functions
template std::vector<types::global_dof_index>
- count_dofs_per_fe_component<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ count_dofs_per_fe_component<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const bool,
const std::vector<unsigned int> &);
template std::vector<types::global_dof_index>
- count_dofs_per_fe_block<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ count_dofs_per_fe_block<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const std::vector<unsigned int> &);
template unsigned int
- count_dofs_on_patch<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ count_dofs_on_patch<deal_II_dimension, deal_II_space_dimension>(
const std::vector<
DoFHandler<deal_II_dimension,
deal_II_space_dimension>::active_cell_iterator> &patch);
template std::vector<types::global_dof_index>
- get_dofs_on_patch<DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ get_dofs_on_patch<deal_II_dimension, deal_II_space_dimension>(
const std::vector<
DoFHandler<deal_II_dimension,
deal_II_space_dimension>::active_cell_iterator> &patch);
// extract_dofs(): Deprecated versions that return information through
// the last argument
template void
- extract_dofs<DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_dofs<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const ComponentMask &,
std::vector<bool> &);
template void
- extract_dofs<DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_dofs<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const BlockMask &,
std::vector<bool> &);
// extract_dofs(): New versions that return information as an IndexSet
template IndexSet
- extract_dofs<DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_dofs<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const ComponentMask &);
template IndexSet
- extract_dofs<DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_dofs<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const BlockMask &);
\}
-for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS)
{
template std::vector<unsigned int> DoFTools::make_vertex_patches(
SparsityPattern &,
// TODO: can cleanup a bit more to fit into the scheme used above
- template void
- DoFTools::distribute_cell_to_dof_vector<DoFHandler<deal_II_dimension>>(
+ template void DoFTools::distribute_cell_to_dof_vector<deal_II_dimension,
+ deal_II_dimension>(
const DoFHandler<deal_II_dimension> &dof_handler,
const Vector<float> & cell_data,
Vector<double> & dof_data,
const unsigned int component);
- template void
- DoFTools::distribute_cell_to_dof_vector<DoFHandler<deal_II_dimension>>(
+ template void DoFTools::distribute_cell_to_dof_vector<deal_II_dimension,
+ deal_II_dimension>(
const DoFHandler<deal_II_dimension> &dof_handler,
const Vector<double> & cell_data,
Vector<double> & dof_data,
const unsigned int component);
- template void DoFTools::extract_boundary_dofs<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- const ComponentMask &,
- std::vector<bool> &,
- const std::set<types::boundary_id> &);
+ template void
+ DoFTools::extract_boundary_dofs<deal_II_dimension, deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &,
+ const ComponentMask &,
+ std::vector<bool> &,
+ const std::set<types::boundary_id> &);
- template void DoFTools::extract_boundary_dofs<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- const ComponentMask &,
- IndexSet &,
- const std::set<types::boundary_id> &);
+ template void
+ DoFTools::extract_boundary_dofs<deal_II_dimension, deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &,
+ const ComponentMask &,
+ IndexSet &,
+ const std::set<types::boundary_id> &);
template void DoFTools::extract_dofs_with_support_on_boundary<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- const ComponentMask &,
- std::vector<bool> &,
- const std::set<types::boundary_id> &);
+ deal_II_dimension,
+ deal_II_dimension>(const DoFHandler<deal_II_dimension> &,
+ const ComponentMask &,
+ std::vector<bool> &,
+ const std::set<types::boundary_id> &);
template IndexSet DoFTools::extract_hanging_node_dofs(
const DoFHandler<deal_II_dimension> &);
template void DoFTools::extract_hanging_node_dofs(
const DoFHandler<deal_II_dimension> &, std::vector<bool> &);
- template void
- DoFTools::extract_subdomain_dofs<DoFHandler<deal_II_dimension>>(
+ template void DoFTools::extract_subdomain_dofs<deal_II_dimension>(
const DoFHandler<deal_II_dimension> &dof_handler,
const types::subdomain_id subdomain_id,
std::vector<bool> & selected_dofs);
- template void
- DoFTools::extract_constant_modes<DoFHandler<deal_II_dimension>>(
+ template void DoFTools::extract_constant_modes<deal_II_dimension>(
const DoFHandler<deal_II_dimension> &dof_handler,
const ComponentMask & selected_components,
std::vector<std::vector<bool>> & constant_modes);
- template void
- DoFTools::get_active_fe_indices<DoFHandler<deal_II_dimension>>(
+ template void DoFTools::get_active_fe_indices<deal_II_dimension>(
const DoFHandler<deal_II_dimension> &dof_handler,
std::vector<unsigned int> & active_fe_indices);
- template void
- DoFTools::get_subdomain_association<DoFHandler<deal_II_dimension>>(
+ template void DoFTools::get_subdomain_association<deal_II_dimension>(
const DoFHandler<deal_II_dimension> &dof_handler,
std::vector<types::subdomain_id> & subdomain_association);
template std::vector<IndexSet>
- DoFTools::locally_owned_dofs_per_subdomain<DoFHandler<deal_II_dimension>>(
+ DoFTools::locally_owned_dofs_per_subdomain<deal_II_dimension>(
const DoFHandler<deal_II_dimension> &dof_handler);
- template std::vector<IndexSet> DoFTools::
- locally_relevant_dofs_per_subdomain<DoFHandler<deal_II_dimension>>(
- const DoFHandler<deal_II_dimension> &dof_handler);
+ template std::vector<IndexSet>
+ DoFTools::locally_relevant_dofs_per_subdomain<deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &dof_handler);
- template unsigned int DoFTools::count_dofs_with_subdomain_association<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- const types::subdomain_id);
- template IndexSet DoFTools::dof_indices_with_subdomain_association<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- const types::subdomain_id);
+ template unsigned int
+ DoFTools::count_dofs_with_subdomain_association<deal_II_dimension,
+ deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &, const types::subdomain_id);
+ template IndexSet
+ DoFTools::dof_indices_with_subdomain_association<deal_II_dimension,
+ deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &, const types::subdomain_id);
template void DoFTools::count_dofs_with_subdomain_association<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- const types::subdomain_id,
- std::vector<unsigned int> &);
+ deal_II_dimension,
+ deal_II_dimension>(const DoFHandler<deal_II_dimension> &,
+ const types::subdomain_id,
+ std::vector<unsigned int> &);
#if deal_II_dimension < 3
- template void DoFTools::extract_boundary_dofs<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template void
+ DoFTools::extract_boundary_dofs<deal_II_dimension, deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
const ComponentMask &,
std::vector<bool> &,
const std::set<types::boundary_id> &);
- template void DoFTools::extract_boundary_dofs<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template void
+ DoFTools::extract_boundary_dofs<deal_II_dimension, deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
const ComponentMask &,
IndexSet &,
const std::set<types::boundary_id> &);
- template unsigned int DoFTools::count_dofs_with_subdomain_association<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template unsigned int
+ DoFTools::count_dofs_with_subdomain_association<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
const types::subdomain_id);
- template IndexSet DoFTools::dof_indices_with_subdomain_association<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template IndexSet
+ DoFTools::dof_indices_with_subdomain_association<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
const types::subdomain_id);
- template void DoFTools::count_dofs_with_subdomain_association<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template void
+ DoFTools::count_dofs_with_subdomain_association<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
const types::subdomain_id,
std::vector<unsigned int> &);
- template void DoFTools::get_subdomain_association<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template void DoFTools::get_subdomain_association<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_handler,
std::vector<types::subdomain_id> &subdomain_association);
- template std::vector<IndexSet> DoFTools::locally_owned_dofs_per_subdomain<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template std::vector<IndexSet>
+ DoFTools::locally_owned_dofs_per_subdomain<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_handler);
template std::vector<IndexSet>
- DoFTools::locally_relevant_dofs_per_subdomain<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ DoFTools::locally_relevant_dofs_per_subdomain<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_handler);
#endif
#if deal_II_dimension == 3
- template void DoFTools::extract_boundary_dofs<DoFHandler<1, 3>>(
+ template void DoFTools::extract_boundary_dofs<1, 3>(
const DoFHandler<1, 3> &,
const ComponentMask &,
std::vector<bool> &,
const std::set<types::boundary_id> &);
- template void DoFTools::extract_boundary_dofs<DoFHandler<1, 3>>(
+ template void DoFTools::extract_boundary_dofs<1, 3>(
const DoFHandler<1, 3> &,
const ComponentMask &,
IndexSet &,
const std::set<types::boundary_id> &);
- template void DoFTools::get_subdomain_association<DoFHandler<1, 3>>(
+ template void DoFTools::get_subdomain_association<1, 3>(
const DoFHandler<1, 3> & dof_handler,
std::vector<types::subdomain_id> &subdomain_association);
template std::vector<IndexSet>
- DoFTools::locally_owned_dofs_per_subdomain<DoFHandler<1, 3>>(
+ DoFTools::locally_owned_dofs_per_subdomain<1, 3>(
const DoFHandler<1, 3> &dof_handler);
template std::vector<IndexSet>
- DoFTools::locally_relevant_dofs_per_subdomain<DoFHandler<1, 3>>(
+ DoFTools::locally_relevant_dofs_per_subdomain<1, 3>(
const DoFHandler<1, 3> &dof_handler);
- template unsigned int DoFTools::count_dofs_with_subdomain_association<
- DoFHandler<1, 3>>(const DoFHandler<1, 3> &, const types::subdomain_id);
- template IndexSet DoFTools::dof_indices_with_subdomain_association<
- DoFHandler<1, 3>>(const DoFHandler<1, 3> &, const types::subdomain_id);
- template void DoFTools::count_dofs_with_subdomain_association<
- DoFHandler<1, 3>>(const DoFHandler<1, 3> &,
- const types::subdomain_id,
- std::vector<unsigned int> &);
+ template unsigned int DoFTools::count_dofs_with_subdomain_association<1, 3>(
+ const DoFHandler<1, 3> &, const types::subdomain_id);
+ template IndexSet DoFTools::dof_indices_with_subdomain_association<1, 3>(
+ const DoFHandler<1, 3> &, const types::subdomain_id);
+ template void DoFTools::count_dofs_with_subdomain_association<1, 3>(
+ const DoFHandler<1, 3> &,
+ const types::subdomain_id,
+ std::vector<unsigned int> &);
#endif
- template void DoFTools::map_dof_to_boundary_indices<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- const std::set<types::boundary_id> &,
- std::vector<types::global_dof_index> &);
+ template void
+ DoFTools::map_dof_to_boundary_indices<deal_II_dimension, deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &,
+ const std::set<types::boundary_id> &,
+ std::vector<types::global_dof_index> &);
- template void DoFTools::map_dof_to_boundary_indices<
- DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
- std::vector<types::global_dof_index> &);
+ template void
+ DoFTools::map_dof_to_boundary_indices<deal_II_dimension, deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &,
+ std::vector<types::global_dof_index> &);
#if deal_II_dimension < 3
- template void DoFTools::map_dof_to_boundary_indices<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template void DoFTools::map_dof_to_boundary_indices<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
const std::set<types::boundary_id> &,
std::vector<types::global_dof_index> &);
- template void DoFTools::map_dof_to_boundary_indices<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
+ template void DoFTools::map_dof_to_boundary_indices<deal_II_dimension,
+ deal_II_dimension + 1>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
std::vector<types::global_dof_index> &);
#if deal_II_dimension == 3
- template void DoFTools::map_dof_to_boundary_indices<DoFHandler<1, 3>>(
+ template void DoFTools::map_dof_to_boundary_indices<1, 3>(
const DoFHandler<1, 3> &,
const std::set<types::boundary_id> &,
std::vector<types::global_dof_index> &);
- template void DoFTools::map_dof_to_boundary_indices<DoFHandler<1, 3>>(
+ template void DoFTools::map_dof_to_boundary_indices<1, 3>(
const DoFHandler<1, 3> &, std::vector<types::global_dof_index> &);
template IndexSet DoFTools::extract_hanging_node_dofs(
}
-for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS;
- S : REAL_AND_COMPLEX_SCALARS)
+for (deal_II_dimension : DIMENSIONS; S : REAL_AND_COMPLEX_SCALARS)
{
- template IndexSet DoFTools::extract_dofs_with_support_contained_within<
- DoFHandler<deal_II_dimension>,
- S>(
+ template IndexSet
+ DoFTools::extract_dofs_with_support_contained_within<deal_II_dimension,
+ deal_II_dimension,
+ S>(
const DoFHandler<deal_II_dimension> &,
const std::function<bool(
const typename DoFHandler<deal_II_dimension>::active_cell_iterator &)>
}
-for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS;
- deal_II_space_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
namespace DoFTools
\{
// extract_level_dofs() for ComponentMask and BlockMask
template void
- extract_level_dofs<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_level_dofs<deal_II_dimension, deal_II_space_dimension>(
const unsigned int level,
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const ComponentMask &,
std::vector<bool> &);
template void
- extract_level_dofs<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+ extract_level_dofs<deal_II_dimension, deal_II_space_dimension>(
const unsigned int level,
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const BlockMask &,
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
- make_hanging_node_constraints(const DoFHandlerType & dof_handler,
- AffineConstraints<number> &constraints)
+ make_hanging_node_constraints(const DoFHandler<dim, spacedim> &dof_handler,
+ AffineConstraints<number> & constraints)
{
// Decide whether to use the new or old make_hanging_node_constraints
// function. If all the FiniteElement or all elements in a FECollection
internal::make_hp_hanging_node_constraints(dof_handler, constraints);
else
internal::make_oldstyle_hanging_node_constraints(
- dof_handler,
- constraints,
- std::integral_constant<int, DoFHandlerType::dimension>());
+ dof_handler, constraints, std::integral_constant<int, dim>());
}
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
make_periodicity_constraints(
- const std::vector<
- GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>
- & periodic_faces,
- AffineConstraints<number> & constraints,
- const ComponentMask & component_mask,
+ const std::vector<GridTools::PeriodicFacePair<
+ typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask,
const std::vector<unsigned int> &first_vector_components,
const number periodicity_factor)
{
// Loop over all periodic faces...
for (auto &pair : periodic_faces)
{
- using FaceIterator = typename DoFHandlerType::face_iterator;
+ using FaceIterator = typename DoFHandler<dim, spacedim>::face_iterator;
const FaceIterator face_1 = pair.cell[0]->face(pair.face_idx[0]);
const FaceIterator face_2 = pair.cell[1]->face(pair.face_idx[1]);
// High level interface variants:
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
- make_periodicity_constraints(const DoFHandlerType & dof_handler,
+ make_periodicity_constraints(const DoFHandler<dim, spacedim> & dof_handler,
const types::boundary_id b_id1,
const types::boundary_id b_id2,
const unsigned int direction,
const ComponentMask &component_mask,
const number periodicity_factor)
{
- static const int spacedim = DoFHandlerType::space_dimension;
- (void)spacedim;
AssertIndexRange(direction, spacedim);
Assert(b_id1 != b_id2,
ExcMessage("The boundary indicators b_id1 and b_id2 must be "
"different to denote different boundaries."));
- std::vector<
- GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>
+ std::vector<GridTools::PeriodicFacePair<
+ typename DoFHandler<dim, spacedim>::cell_iterator>>
matched_faces;
// Collect matching periodic cells on the coarsest level:
GridTools::collect_periodic_faces(
dof_handler, b_id1, b_id2, direction, matched_faces);
- make_periodicity_constraints<DoFHandlerType>(matched_faces,
- constraints,
- component_mask,
- std::vector<unsigned int>(),
- periodicity_factor);
+ make_periodicity_constraints<dim, spacedim>(matched_faces,
+ constraints,
+ component_mask,
+ std::vector<unsigned int>(),
+ periodicity_factor);
}
- template <typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
- make_periodicity_constraints(const DoFHandlerType & dof_handler,
- const types::boundary_id b_id,
- const unsigned int direction,
- AffineConstraints<number> &constraints,
- const ComponentMask & component_mask,
- const number periodicity_factor)
+ make_periodicity_constraints(const DoFHandler<dim, spacedim> &dof_handler,
+ const types::boundary_id b_id,
+ const unsigned int direction,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask,
+ const number periodicity_factor)
{
- static const int dim = DoFHandlerType::dimension;
- static const int spacedim = DoFHandlerType::space_dimension;
- (void)dim;
- (void)spacedim;
-
AssertIndexRange(direction, spacedim);
Assert(dim == spacedim, ExcNotImplemented());
- std::vector<
- GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>
+ std::vector<GridTools::PeriodicFacePair<
+ typename DoFHandler<dim, spacedim>::cell_iterator>>
matched_faces;
// Collect matching periodic cells on the coarsest level:
direction,
matched_faces);
- make_periodicity_constraints<DoFHandlerType>(matched_faces,
- constraints,
- component_mask,
- std::vector<unsigned int>(),
- periodicity_factor);
+ make_periodicity_constraints<dim, spacedim>(matched_faces,
+ constraints,
+ component_mask,
+ std::vector<unsigned int>(),
+ periodicity_factor);
}
mask[coarse_component] = true;
coarse_dof_is_parameter =
- extract_dofs<DoFHandler<dim, spacedim>>(coarse_grid,
- ComponentMask(mask));
+ extract_dofs<dim, spacedim>(coarse_grid, ComponentMask(mask));
}
// now we know that the weights in each row constitute a constraint. enter
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
make_zero_boundary_constraints(
- const DoFHandlerType<dim, spacedim> &dof,
- const types::boundary_id boundary_id,
- AffineConstraints<number> & zero_boundary_constraints,
- const ComponentMask & component_mask)
+ const DoFHandler<dim, spacedim> &dof,
+ const types::boundary_id boundary_id,
+ AffineConstraints<number> & zero_boundary_constraints,
+ const ComponentMask & component_mask)
{
Assert(component_mask.represents_n_components(dof.get_fe(0).n_components()),
ExcMessage("The number of components in the mask has to be either "
std::vector<types::global_dof_index> cell_dofs;
cell_dofs.reserve(dof.get_fe_collection().max_dofs_per_cell());
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
cell = dof.begin_active(),
endc = dof.end();
for (; cell != endc; ++cell)
for (const auto face_no : cell->face_indices())
{
- const typename DoFHandlerType<dim, spacedim>::face_iterator face =
+ const typename DoFHandler<dim, spacedim>::face_iterator face =
cell->face(face_no);
// if face is on the boundary and satisfies the correct boundary
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
make_zero_boundary_constraints(
- const DoFHandlerType<dim, spacedim> &dof,
- AffineConstraints<number> & zero_boundary_constraints,
- const ComponentMask & component_mask)
+ const DoFHandler<dim, spacedim> &dof,
+ AffineConstraints<number> & zero_boundary_constraints,
+ const ComponentMask & component_mask)
{
make_zero_boundary_constraints(dof,
numbers::invalid_boundary_id,
#endif
}
-for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS)
{
- template void
- DoFTools::make_periodicity_constraints<DH<deal_II_dimension>, double>(
- const std::vector<
- GridTools::PeriodicFacePair<DH<deal_II_dimension>::cell_iterator>> &,
+ template void DoFTools::make_periodicity_constraints<deal_II_dimension,
+ deal_II_dimension,
+ double>(
+ const std::vector<GridTools::PeriodicFacePair<
+ DoFHandler<deal_II_dimension>::cell_iterator>> &,
AffineConstraints<double> &,
const ComponentMask &,
const std::vector<unsigned int> &,
const double);
#ifdef DEAL_II_WITH_COMPLEX_VALUES
- template void DoFTools::make_periodicity_constraints<DH<deal_II_dimension>,
+ template void DoFTools::make_periodicity_constraints<deal_II_dimension,
+ deal_II_dimension,
std::complex<double>>(
- const std::vector<
- GridTools::PeriodicFacePair<DH<deal_II_dimension>::cell_iterator>> &,
+ const std::vector<GridTools::PeriodicFacePair<
+ DoFHandler<deal_II_dimension>::cell_iterator>> &,
AffineConstraints<std::complex<double>> &,
const ComponentMask &,
const std::vector<unsigned int> &,
#endif
template void DoFTools::make_periodicity_constraints(
- const DH<deal_II_dimension> &,
+ const DoFHandler<deal_II_dimension> &,
const types::boundary_id,
const types::boundary_id,
const unsigned int,
#ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_periodicity_constraints(
- const DH<deal_II_dimension> &,
+ const DoFHandler<deal_II_dimension> &,
const types::boundary_id,
const types::boundary_id,
const unsigned int,
#endif
template void DoFTools::make_periodicity_constraints(
- const DH<deal_II_dimension> &,
+ const DoFHandler<deal_II_dimension> &,
const types::boundary_id,
const unsigned int,
AffineConstraints<double> &,
#ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_periodicity_constraints(
- const DH<deal_II_dimension> &,
+ const DoFHandler<deal_II_dimension> &,
const types::boundary_id,
const unsigned int,
AffineConstraints<std::complex<double>> &,
#endif
}
-for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS;
+for (DoFHandler : DOFHANDLER_TEMPLATE; deal_II_dimension : DIMENSIONS;
deal_II_space_dimension : SPACE_DIMENSIONS;
S : REAL_AND_COMPLEX_SCALARS)
{
#if deal_II_dimension <= deal_II_space_dimension
template void DoFTools::make_hanging_node_constraints(
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
AffineConstraints<S> &);
template void DoFTools::make_zero_boundary_constraints(
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
AffineConstraints<S> &,
const ComponentMask &);
template void DoFTools::make_zero_boundary_constraints(
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
AffineConstraints<S> &,
const ComponentMask &);
namespace DoFTools
{
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
- make_sparsity_pattern(const DoFHandlerType & dof,
+ make_sparsity_pattern(const DoFHandler<dim, spacedim> &dof,
SparsityPatternType & sparsity,
const AffineConstraints<number> &constraints,
const bool keep_constrained_dofs,
std::vector<types::global_dof_index> dofs_on_this_cell;
dofs_on_this_cell.reserve(dof.get_fe_collection().max_dofs_per_cell());
- typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof.begin_active(),
+ endc = dof.end();
// In case we work with a distributed sparsity pattern of Trilinos
// type, we only have to do the work if the current cell is owned by
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
- make_sparsity_pattern(const DoFHandlerType & dof,
+ make_sparsity_pattern(const DoFHandler<dim, spacedim> &dof,
const Table<2, Coupling> & couplings,
SparsityPatternType & sparsity,
const AffineConstraints<number> &constraints,
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
- const hp::FECollection<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension> &fe_collection =
+ const hp::FECollection<dim, spacedim> &fe_collection =
dof.get_fe_collection();
const std::vector<Table<2, Coupling>> dof_mask //(fe_collection.size())
std::vector<types::global_dof_index> dofs_on_this_cell(
fe_collection.max_dofs_per_cell());
- typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof.begin_active(),
+ endc = dof.end();
// In case we work with a distributed sparsity pattern of Trilinos
// type, we only have to do the work if the current cell is owned by
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_sparsity_pattern(const DoFHandlerType &dof_row,
- const DoFHandlerType &dof_col,
- SparsityPatternType & sparsity)
+ make_sparsity_pattern(const DoFHandler<dim, spacedim> &dof_row,
+ const DoFHandler<dim, spacedim> &dof_col,
+ SparsityPatternType & sparsity)
{
const types::global_dof_index n_dofs_row = dof_row.n_dofs();
const types::global_dof_index n_dofs_col = dof_col.n_dofs();
// different processors) and unequal: no processor will be responsible for
// assembling coupling terms between dofs on a cell owned by one processor
// and dofs on a cell owned by a different processor.
- constexpr int dim = DoFHandlerType::dimension;
- constexpr int spacedim = DoFHandlerType::space_dimension;
if (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
&dof_row.get_triangulation()) != nullptr ||
dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
// TODO: Looks like wasteful memory management here
- using cell_iterator = typename DoFHandlerType::cell_iterator;
+ using cell_iterator = typename DoFHandler<dim, spacedim>::cell_iterator;
std::list<std::pair<cell_iterator, cell_iterator>> cell_list =
GridTools::get_finest_common_cells(dof_row, dof_col);
}
else if (cell_row->has_children())
{
- const std::vector<typename DoFHandlerType::active_cell_iterator>
+ const std::vector<
+ typename DoFHandler<dim, spacedim>::active_cell_iterator>
child_cells =
- GridTools::get_active_child_cells<DoFHandlerType>(cell_row);
+ GridTools::get_active_child_cells<DoFHandler<dim, spacedim>>(
+ cell_row);
for (unsigned int i = 0; i < child_cells.size(); i++)
{
- const typename DoFHandlerType::cell_iterator cell_row_child =
- child_cells[i];
+ const typename DoFHandler<dim, spacedim>::cell_iterator
+ cell_row_child = child_cells[i];
const unsigned int dofs_per_cell_row =
cell_row_child->get_fe().dofs_per_cell;
const unsigned int dofs_per_cell_col =
}
else
{
- std::vector<typename DoFHandlerType::active_cell_iterator>
+ std::vector<
+ typename DoFHandler<dim, spacedim>::active_cell_iterator>
child_cells =
- GridTools::get_active_child_cells<DoFHandlerType>(cell_col);
+ GridTools::get_active_child_cells<DoFHandler<dim, spacedim>>(
+ cell_col);
for (unsigned int i = 0; i < child_cells.size(); i++)
{
- const typename DoFHandlerType::active_cell_iterator
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator
cell_col_child = child_cells[i];
const unsigned int dofs_per_cell_row =
cell_row->get_fe().dofs_per_cell;
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
make_boundary_sparsity_pattern(
- const DoFHandlerType & dof,
+ const DoFHandler<dim, spacedim> & dof,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPatternType & sparsity)
{
- if (DoFHandlerType::dimension == 1)
+ if (dim == 1)
{
// there are only 2 boundary indicators in 1d, so it is no
// performance problem to call the other function
- std::map<types::boundary_id,
- const Function<DoFHandlerType::space_dimension, double> *>
+ std::map<types::boundary_id, const Function<spacedim, double> *>
boundary_ids;
boundary_ids[0] = nullptr;
boundary_ids[1] = nullptr;
- make_boundary_sparsity_pattern<DoFHandlerType, SparsityPatternType>(
+ make_boundary_sparsity_pattern<dim, spacedim, SparsityPatternType>(
dof, boundary_ids, dof_to_boundary_mapping, sparsity);
return;
}
// @p{cell->has_boundary_lines}), since we do not support boundaries of
// dimension dim-2, and so every boundary line is also part of a
// boundary face.
- typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof.begin_active(),
+ endc = dof.end();
for (; cell != endc; ++cell)
- for (const unsigned int f :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int f : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(f))
{
const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
make_boundary_sparsity_pattern(
- const DoFHandlerType &dof,
- const std::map<types::boundary_id,
- const Function<DoFHandlerType::space_dimension, number> *>
+ const DoFHandler<dim, spacedim> &dof,
+ const std::map<types::boundary_id, const Function<spacedim, number> *>
& boundary_ids,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPatternType & sparsity)
{
- if (DoFHandlerType::dimension == 1)
+ if (dim == 1)
{
// first check left, then right boundary point
for (unsigned int direction = 0; direction < 2; ++direction)
// find active cell at that boundary: first go to left/right,
// then to children
- typename DoFHandlerType::level_cell_iterator cell = dof.begin(0);
+ typename DoFHandler<dim, spacedim>::level_cell_iterator cell =
+ dof.begin(0);
while (!cell->at_boundary(direction))
cell = cell->neighbor(direction);
while (!cell->is_active())
AssertDimension(dof_to_boundary_mapping.size(), n_dofs);
Assert(boundary_ids.find(numbers::internal_face_boundary_id) ==
boundary_ids.end(),
- typename DoFHandlerType::ExcInvalidBoundaryIndicator());
+ (typename DoFHandler<dim, spacedim>::ExcInvalidBoundaryIndicator()));
Assert(sparsity.n_rows() == dof.n_boundary_dofs(boundary_ids),
ExcDimensionMismatch(sparsity.n_rows(),
dof.n_boundary_dofs(boundary_ids)));
std::vector<types::global_dof_index> dofs_on_this_face;
dofs_on_this_face.reserve(dof.get_fe_collection().max_dofs_per_face());
- typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof.begin_active(),
+ endc = dof.end();
for (; cell != endc; ++cell)
- for (const unsigned int f :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int f : GeometryInfo<dim>::face_indices())
if (boundary_ids.find(cell->face(f)->boundary_id()) !=
boundary_ids.end())
{
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
- make_flux_sparsity_pattern(const DoFHandlerType & dof,
+ make_flux_sparsity_pattern(const DoFHandler<dim, spacedim> &dof,
SparsityPatternType & sparsity,
const AffineConstraints<number> &constraints,
const bool keep_constrained_dofs,
std::vector<types::global_dof_index> dofs_on_other_cell;
dofs_on_this_cell.reserve(dof.get_fe_collection().max_dofs_per_cell());
dofs_on_other_cell.reserve(dof.get_fe_collection().max_dofs_per_cell());
- typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
+ cell = dof.begin_active(),
+ endc = dof.end();
// TODO: in an old implementation, we used user flags before to tag
// faces that were already touched. this way, we could reduce the work
sparsity,
keep_constrained_dofs);
- for (const unsigned int face :
- GeometryInfo<DoFHandlerType::dimension>::face_indices())
+ for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
- typename DoFHandlerType::face_iterator cell_face =
+ typename DoFHandler<dim, spacedim>::face_iterator cell_face =
cell->face(face);
const bool periodic_neighbor = cell->has_periodic_neighbor(face);
if (!cell->at_boundary(face) || periodic_neighbor)
{
- typename DoFHandlerType::level_cell_iterator neighbor =
- cell->neighbor_or_periodic_neighbor(face);
+ typename DoFHandler<dim, spacedim>::level_cell_iterator
+ neighbor = cell->neighbor_or_periodic_neighbor(face);
// in 1d, we do not need to worry whether the neighbor
// might have children and then loop over those children.
// rather, we may as well go straight to the cell behind
// this particular cell's most terminal child
- if (DoFHandlerType::dimension == 1)
+ if (dim == 1)
while (neighbor->has_children())
neighbor = neighbor->child(face == 0 ? 1 : 0);
sub_nr != cell_face->number_of_children();
++sub_nr)
{
- const typename DoFHandlerType::level_cell_iterator
- sub_neighbor =
+ const typename DoFHandler<dim, spacedim>::
+ level_cell_iterator sub_neighbor =
periodic_neighbor ?
cell->periodic_neighbor_child_on_subface(
face, sub_nr) :
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_flux_sparsity_pattern(const DoFHandlerType &dof,
- SparsityPatternType & sparsity)
+ make_flux_sparsity_pattern(const DoFHandler<dim, spacedim> &dof,
+ SparsityPatternType & sparsity)
{
AffineConstraints<double> dummy;
make_flux_sparsity_pattern(dof, sparsity, dummy);
- template <typename DoFHandlerType, typename SparsityPatternType>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
- make_flux_sparsity_pattern(const DoFHandlerType & dof,
- SparsityPatternType & sparsity,
- const Table<2, Coupling> &int_mask,
- const Table<2, Coupling> &flux_mask,
- const types::subdomain_id subdomain_id)
+ make_flux_sparsity_pattern(const DoFHandler<dim, spacedim> &dof,
+ SparsityPatternType & sparsity,
+ const Table<2, Coupling> & int_mask,
+ const Table<2, Coupling> & flux_mask,
+ const types::subdomain_id subdomain_id)
{
AffineConstraints<double> dummy;
const bool keep_constrained_dofs = true;
- make_flux_sparsity_pattern(
- dof,
- sparsity,
- dummy,
- keep_constrained_dofs,
- int_mask,
- flux_mask,
- subdomain_id,
- internal::always_couple_on_faces<DoFHandlerType>);
+ make_flux_sparsity_pattern(dof,
+ sparsity,
+ dummy,
+ keep_constrained_dofs,
+ int_mask,
+ flux_mask,
+ subdomain_id,
+ internal::always_couple_on_faces<dim, spacedim>);
}
- template <typename DoFHandlerType,
+ template <int dim,
+ int spacedim,
typename SparsityPatternType,
typename number>
void
make_flux_sparsity_pattern(
- const DoFHandlerType & dof,
+ const DoFHandler<dim, spacedim> &dof,
SparsityPatternType & sparsity,
const AffineConstraints<number> &constraints,
const bool keep_constrained_dofs,
const Table<2, Coupling> & flux_mask,
const types::subdomain_id subdomain_id,
const std::function<
- bool(const typename DoFHandlerType::active_cell_iterator &,
+ bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &,
const unsigned int)> &face_has_flux_coupling)
{
// do the error checking and frame code here, and then pass on to more
//
// ---------------------------------------------------------------------
-for (DoFHandler : DOFHANDLER_TEMPLATES; scalar : REAL_SCALARS;
- SP : SPARSITY_PATTERNS;
+for (scalar : REAL_SCALARS; SP : SPARSITY_PATTERNS;
deal_II_dimension : DIMENSIONS)
{
- template void DoFTools::
- make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension>, SP, scalar>(
- const DoFHandler<deal_II_dimension> &dof,
- const std::map<types::boundary_id,
- const Function<deal_II_dimension, scalar> *>
- & boundary_ids,
- const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
- SP & sparsity);
+ template void DoFTools::make_boundary_sparsity_pattern<deal_II_dimension,
+ deal_II_dimension,
+ SP,
+ scalar>(
+ const DoFHandler<deal_II_dimension> & dof,
+ const std::map<types::boundary_id,
+ const Function<deal_II_dimension, scalar> *> &boundary_ids,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
+ SP & sparsity);
#if deal_II_dimension < 3
- template void DoFTools::make_boundary_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
- SP,
- scalar>(
+ template void
+ DoFTools::make_boundary_sparsity_pattern<deal_II_dimension,
+ deal_II_dimension + 1,
+ SP,
+ scalar>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
const std::map<types::boundary_id,
const Function<deal_II_dimension + 1, scalar> *>
#endif
#if deal_II_dimension == 1
- template void DoFTools::make_boundary_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 2>,
- SP,
- scalar>(
+ template void
+ DoFTools::make_boundary_sparsity_pattern<deal_II_dimension,
+ deal_II_dimension + 2,
+ SP,
+ scalar>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 2> &dof,
const std::map<types::boundary_id,
const Function<deal_II_dimension + 2, scalar> *>
#endif
}
-for (DoFHandler : DOFHANDLER_TEMPLATES; scalar : COMPLEX_SCALARS;
- SP : SPARSITY_PATTERNS;
+for (scalar : COMPLEX_SCALARS; SP : SPARSITY_PATTERNS;
deal_II_dimension : DIMENSIONS)
{
- template void DoFTools::
- make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension>, SP, scalar>(
- const DoFHandler<deal_II_dimension> &dof,
- const std::map<types::boundary_id,
- const Function<deal_II_dimension, scalar> *>
- & boundary_ids,
- const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
- SP & sparsity);
+ template void DoFTools::make_boundary_sparsity_pattern<deal_II_dimension,
+ deal_II_dimension,
+ SP,
+ scalar>(
+ const DoFHandler<deal_II_dimension> & dof,
+ const std::map<types::boundary_id,
+ const Function<deal_II_dimension, scalar> *> &boundary_ids,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
+ SP & sparsity);
#if deal_II_dimension < 3
- template void DoFTools::make_boundary_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
- SP,
- scalar>(
+ template void
+ DoFTools::make_boundary_sparsity_pattern<deal_II_dimension,
+ deal_II_dimension + 1,
+ SP,
+ scalar>(
const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
const std::map<types::boundary_id,
const Function<deal_II_dimension + 1, scalar> *>
#endif
}
-for (DoFHandler : DOFHANDLER_TEMPLATES; SP : SPARSITY_PATTERNS;
- deal_II_dimension : DIMENSIONS;
+for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS;
S : REAL_AND_COMPLEX_SCALARS)
{
- template void DoFTools::make_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension> &dof,
- SP & sparsity,
- const AffineConstraints<S> &,
- const bool,
- const types::subdomain_id);
-
- template void DoFTools::make_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension> &,
- const Table<2, Coupling> &,
- SP &,
- const AffineConstraints<S> &,
- const bool,
- const types::subdomain_id);
-
template void
- DoFTools::make_flux_sparsity_pattern<DoFHandler<deal_II_dimension>, SP>(
- const DoFHandler<deal_II_dimension> &dof,
- SP & sparsity,
+ DoFTools::make_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension> &dof,
+ SP & sparsity,
const AffineConstraints<S> &,
const bool,
- const Table<2, Coupling> &,
- const Table<2, Coupling> &,
- const types::subdomain_id,
- const std::function<bool(
- const typename DoFHandler<deal_II_dimension>::active_cell_iterator &,
- const unsigned int)> &);
+ const types::subdomain_id);
template void
- DoFTools::make_flux_sparsity_pattern<DoFHandler<deal_II_dimension>, SP>(
- const DoFHandler<deal_II_dimension> &dof,
- SP & sparsity,
+ DoFTools::make_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension> &,
+ const Table<2, Coupling> &,
+ SP &,
const AffineConstraints<S> &,
const bool,
const types::subdomain_id);
+ template void DoFTools::
+ make_flux_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension> &dof,
+ SP & sparsity,
+ const AffineConstraints<S> &,
+ const bool,
+ const Table<2, Coupling> &,
+ const Table<2, Coupling> &,
+ const types::subdomain_id,
+ const std::function<bool(
+ const typename DoFHandler<deal_II_dimension>::active_cell_iterator &,
+ const unsigned int)> &);
+
+ template void DoFTools::
+ make_flux_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension> &dof,
+ SP & sparsity,
+ const AffineConstraints<S> &,
+ const bool,
+ const types::subdomain_id);
+
#if deal_II_dimension < 3
- template void DoFTools::make_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
- SP & sparsity,
- const AffineConstraints<S> &,
- const bool,
- const types::subdomain_id);
-
- template void DoFTools::make_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
- const Table<2, Coupling> &,
- SP &,
- const AffineConstraints<S> &,
- const bool,
- const types::subdomain_id);
+ template void DoFTools::
+ make_sparsity_pattern<deal_II_dimension, deal_II_dimension + 1, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
+ SP & sparsity,
+ const AffineConstraints<S> &,
+ const bool,
+ const types::subdomain_id);
+
+ template void DoFTools::
+ make_sparsity_pattern<deal_II_dimension, deal_II_dimension + 1, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
+ const Table<2, Coupling> &,
+ SP &,
+ const AffineConstraints<S> &,
+ const bool,
+ const types::subdomain_id);
#endif
#if deal_II_dimension == 3
- template void DoFTools::make_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ template void DoFTools::make_sparsity_pattern<1, 3, SP>(
const DoFHandler<1, 3> &dof,
SP & sparsity,
const AffineConstraints<S> &,
const bool,
const types::subdomain_id);
- template void DoFTools::make_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ template void DoFTools::make_sparsity_pattern<1, 3, SP>(
const DoFHandler<1, 3> &,
const Table<2, Coupling> &,
SP &,
#endif
}
-for (DoFHandler : DOFHANDLER_TEMPLATES; SP : SPARSITY_PATTERNS;
- deal_II_dimension : DIMENSIONS)
+for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS)
{
- template void DoFTools::make_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension> &dof_row,
- const DoFHandler<deal_II_dimension, deal_II_dimension> &dof_col,
- SP & sparsity);
-
template void
- DoFTools::make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension>, SP>(
- const DoFHandler<deal_II_dimension> &dof,
- const std::vector<types::global_dof_index> &,
- SP &);
+ DoFTools::make_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension> &dof_row,
+ const DoFHandler<deal_II_dimension, deal_II_dimension> &dof_col,
+ SP & sparsity);
- template void
- DoFTools::make_flux_sparsity_pattern<DoFHandler<deal_II_dimension>, SP>(
- const DoFHandler<deal_II_dimension> &dof, SP &sparsity);
+ template void DoFTools::
+ make_boundary_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension> &dof,
+ const std::vector<types::global_dof_index> &,
+ SP &);
- template void
- DoFTools::make_flux_sparsity_pattern<DoFHandler<deal_II_dimension>, SP>(
- const DoFHandler<deal_II_dimension> &dof,
- SP & sparsity,
- const Table<2, Coupling> &,
- const Table<2, Coupling> &,
- const types::subdomain_id);
+ template void DoFTools::
+ make_flux_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension> &dof, SP &sparsity);
+
+ template void DoFTools::
+ make_flux_sparsity_pattern<deal_II_dimension, deal_II_dimension, SP>(
+ const DoFHandler<deal_II_dimension> &dof,
+ SP & sparsity,
+ const Table<2, Coupling> &,
+ const Table<2, Coupling> &,
+ const types::subdomain_id);
#if deal_II_dimension < 3
- template void DoFTools::make_flux_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
- SP & sparsity);
+ template void DoFTools::
+ make_flux_sparsity_pattern<deal_II_dimension, deal_II_dimension + 1, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
+ SP & sparsity);
- template void DoFTools::make_flux_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
- SP & sparsity,
- const Table<2, Coupling> &,
- const Table<2, Coupling> &,
- const types::subdomain_id);
+ template void DoFTools::
+ make_flux_sparsity_pattern<deal_II_dimension, deal_II_dimension + 1, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
+ SP & sparsity,
+ const Table<2, Coupling> &,
+ const Table<2, Coupling> &,
+ const types::subdomain_id);
- template void DoFTools::make_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
- SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_row,
- const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_col,
- SP & sparsity);
+ template void DoFTools::
+ make_sparsity_pattern<deal_II_dimension, deal_II_dimension + 1, SP>(
+ const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_row,
+ const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_col,
+ SP & sparsity);
template void DoFTools::make_boundary_sparsity_pattern<
- DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
+ deal_II_dimension,
+ deal_II_dimension + 1,
SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
const std::vector<types::global_dof_index> &,
SP &);
#if deal_II_dimension == 3
- template void DoFTools::make_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ template void DoFTools::make_sparsity_pattern<1, 3, SP>(
const DoFHandler<1, 3> &dof_row,
const DoFHandler<1, 3> &dof_col,
SP & sparsity);
- template void
- DoFTools::make_boundary_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ template void DoFTools::make_boundary_sparsity_pattern<1, 3, SP>(
const DoFHandler<1, 3> &dof,
const std::vector<types::global_dof_index> &,
SP &);
- template void DoFTools::make_flux_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ template void DoFTools::make_flux_sparsity_pattern<1, 3, SP>(
const DoFHandler<1, 3> &dof, SP &sparsity);
- template void DoFTools::make_flux_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ template void DoFTools::make_flux_sparsity_pattern<1, 3, SP>(
const DoFHandler<1, 3> &dof,
SP & sparsity,
const Table<2, Coupling> &,
const DoFHandler<dim, spacedim> &,
const ComponentMask &,
std::vector<bool> &) =
- &DoFTools::extract_level_dofs<DoFHandler<dim, spacedim>>;
+ &DoFTools::extract_level_dofs<dim, spacedim>;
std::vector<bool> tmp(n_components, false);
tmp[i] = true;
const DoFHandlerType &,
const BlockMask &,
std::vector<bool> &) =
- &DoFTools::extract_level_dofs<DoFHandlerType>;
+ &DoFTools::extract_level_dofs<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>;
std::vector<bool> tmp(n_blocks, false);
tmp[i] = true;
{
hanging_node_constraints.clear();
- void (*mhnc_p)(const hp::DoFHandler<dim> &, AffineConstraints<double> &) =
+ void (*mhnc_p)(const DoFHandler<dim> &, AffineConstraints<double> &) =
&DoFTools::make_hanging_node_constraints;
Threads::Thread<> mhnc_thread =