#include <deal.II/base/config.h>
+#include <deal.II/dofs/dof_handler.h>
+
#include <deal.II/hp/mapping_collection.h>
#include <map>
*
* See the general documentation of this namespace for more information.
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
std::map<types::global_dof_index, number> &boundary_values,
* @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
interpolate_boundary_values(
const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> & dof,
+ const DoFHandler<dim, spacedim> & dof,
const types::boundary_id boundary_component,
const Function<spacedim, number> & boundary_function,
std::map<types::global_dof_index, number> &boundary_values,
* @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
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> & dof,
+ const DoFHandler<dim, spacedim> & dof,
const types::boundary_id boundary_component,
const Function<spacedim, number> & boundary_function,
std::map<types::global_dof_index, number> &boundary_values,
* apply as for the previous function, in particular about the use of the
* component mask and the requires size of the function object.
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> &dof,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
std::map<types::global_dof_index, number> &boundary_values,
*
* @ingroup constraints
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
AffineConstraints<number> &constraints,
* @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
interpolate_boundary_values(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
- const types::boundary_id boundary_component,
- const Function<spacedim, number> & boundary_function,
- AffineConstraints<number> & constraints,
- const ComponentMask & component_mask = ComponentMask());
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> & dof,
+ const types::boundary_id boundary_component,
+ const Function<spacedim, number> &boundary_function,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask = ComponentMask());
/**
* Call the other interpolate_boundary_values() function, see above, with
* @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
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> &dof,
- const types::boundary_id boundary_component,
- const Function<spacedim, number> & boundary_function,
- AffineConstraints<number> & constraints,
- const ComponentMask & component_mask = ComponentMask());
+ const DoFHandler<dim, spacedim> & dof,
+ const types::boundary_id boundary_component,
+ const Function<spacedim, number> &boundary_function,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask = ComponentMask());
/**
*
* @ingroup constraints
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> &dof,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
AffineConstraints<number> &constraints,
template <int dim,
int spacedim,
typename number,
- template <int, int> class DoFHandlerType,
template <int, int> class M_or_MC>
static inline void
do_interpolate_boundary_values(
- const M_or_MC<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
+ const M_or_MC<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
std::map<types::global_dof_index, number> &boundary_values,
q_collection,
update_quadrature_points);
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator
- cell = dof.begin_active(),
- endc = dof.end();
- for (; cell != endc; ++cell)
+ for (auto const &cell : dof.active_cell_iterators())
if (!cell->is_artificial())
for (const unsigned int face_no :
GeometryInfo<dim>::face_indices())
"use for non-primitive finite elements."));
}
- const typename DoFHandlerType<dim, spacedim>::face_iterator
- face = cell->face(face_no);
+ const typename DoFHandler<dim, spacedim>::face_iterator face =
+ cell->face(face_no);
const types::boundary_id boundary_component =
face->boundary_id();
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
std::map<types::global_dof_index, number> &boundary_values,
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> & dof,
+ const DoFHandler<dim, spacedim> & dof,
const types::boundary_id boundary_component,
const Function<spacedim, number> & boundary_function,
std::map<types::global_dof_index, number> &boundary_values,
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> & dof,
+ const DoFHandler<dim, spacedim> & dof,
const types::boundary_id boundary_component,
const Function<spacedim, number> & boundary_function,
std::map<types::global_dof_index, number> &boundary_values,
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> &dof,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
std::map<types::global_dof_index, number> &boundary_values,
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
AffineConstraints<number> &constraints,
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
- const types::boundary_id boundary_component,
- const Function<spacedim, number> & boundary_function,
- AffineConstraints<number> & constraints,
- const ComponentMask & component_mask)
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> & dof,
+ const types::boundary_id boundary_component,
+ const Function<spacedim, number> &boundary_function,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask)
{
std::map<types::boundary_id, const Function<spacedim, number> *>
function_map;
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> &dof,
- const types::boundary_id boundary_component,
- const Function<spacedim, number> & boundary_function,
- AffineConstraints<number> & constraints,
- const ComponentMask & component_mask)
+ const DoFHandler<dim, spacedim> & dof,
+ const types::boundary_id boundary_component,
+ const Function<spacedim, number> &boundary_function,
+ AffineConstraints<number> & constraints,
+ const ComponentMask & component_mask)
{
interpolate_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
dof,
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
- const DoFHandlerType<dim, spacedim> &dof,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& function_map,
AffineConstraints<number> &constraints,
template <int dim,
int spacedim,
- template <int, int> class DoFHandlerType,
template <int, int> class M_or_MC,
template <int> class Q_or_QC,
typename number>
void
do_project_boundary_values(
- const M_or_MC<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof,
+ const M_or_MC<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& boundary_functions,
const Q_or_QC<dim - 1> & q,
}
}
- template <int dim, typename DoFHandlerType, typename number>
+ template <int dim, int spacedim, typename number>
void
compute_project_boundary_values_curl_conforming_l2(
- const DoFHandlerType & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
const unsigned int first_vector_component,
const Function<dim, number> & boundary_function,
const types::boundary_id boundary_component,
update_JxW_values);
// Storage for dof values found and whether they have been processed:
- std::vector<bool> dofs_processed;
- std::vector<number> dof_values;
- std::vector<types::global_dof_index> face_dof_indices;
- typename DoFHandlerType::active_cell_iterator cell =
+ std::vector<bool> dofs_processed;
+ std::vector<number> dof_values;
+ std::vector<types::global_dof_index> face_dof_indices;
+ typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
dof_handler.begin_active();
switch (dim)
#include <deal.II/base/config.h>
+#include <deal.II/dofs/dof_handler.h>
+
#include <map>
#include <set>
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_nonzero_normal_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
const std::map<types::boundary_id, const Function<spacedim, double> *>
& function_map,
AffineConstraints<double> & constraints,
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_no_normal_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
- AffineConstraints<double> & constraints,
- const Mapping<dim, spacedim> & mapping =
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ AffineConstraints<double> & constraints,
+ const Mapping<dim, spacedim> & mapping =
StaticMappingQ1<dim, spacedim>::mapping);
/**
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_nonzero_tangential_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
const std::map<types::boundary_id, const Function<spacedim, double> *>
& function_map,
AffineConstraints<double> & constraints,
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_normal_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
- AffineConstraints<double> & constraints,
- const Mapping<dim, spacedim> & mapping =
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ AffineConstraints<double> & constraints,
+ const Mapping<dim, spacedim> & mapping =
StaticMappingQ1<dim, spacedim>::mapping);
//@}
} // namespace internal
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_nonzero_normal_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
const std::map<types::boundary_id, const Function<spacedim> *>
& function_map,
AffineConstraints<double> & constraints,
using DoFToNormalsMap = std::multimap<
internal::VectorDoFTuple<dim>,
std::pair<Tensor<1, dim>,
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator>>;
+ typename DoFHandler<dim, spacedim>::active_cell_iterator>>;
std::map<internal::VectorDoFTuple<dim>, Vector<double>>
dof_vector_to_b_values;
DoFToNormalsMap dof_to_normals_map;
// now loop over all cells and all faces
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
std::set<types::boundary_id>::iterator b_id;
boundary_ids.end())
{
const FiniteElement<dim> &fe = cell->get_fe();
- typename DoFHandlerType<dim, spacedim>::face_iterator face =
+ typename DoFHandler<dim, spacedim>::face_iterator face =
cell->face(face_no);
// get the indices of the dofs on this cell...
// vectors. the values of the map are pairs of normal vectors and
// number of cells that have contributed
using CellToNormalsMap =
- std::map<typename DoFHandlerType<dim, spacedim>::active_cell_iterator,
+ std::map<typename DoFHandler<dim, spacedim>::active_cell_iterator,
std::pair<Tensor<1, dim>, unsigned int>>;
CellToNormalsMap cell_to_normals_map;
// natural) because std::set requires that the stored elements
// are comparable with operator<
using CellContributions = std::map<
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator,
+ typename DoFHandler<dim, spacedim>::active_cell_iterator,
std::list<Tensor<1, dim>>>;
CellContributions cell_contributions;
};
} // namespace internal
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_nonzero_tangential_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
const std::map<types::boundary_id, const Function<spacedim> *>
& function_map,
AffineConstraints<double> & constraints,
boundary_ids.end())
{
const FiniteElement<dim> &fe = cell->get_fe();
- typename DoFHandlerType<dim, spacedim>::face_iterator face =
+ typename DoFHandler<dim, spacedim>::face_iterator face =
cell->face(face_no);
// get the indices of the dofs on this cell...
}
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_no_normal_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
- AffineConstraints<double> & constraints,
- const Mapping<dim, spacedim> & mapping)
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ AffineConstraints<double> & constraints,
+ const Mapping<dim, spacedim> & mapping)
{
Functions::ZeroFunction<dim> zero_function(dim);
std::map<types::boundary_id, const Function<spacedim> *> function_map;
mapping);
}
- template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim>
void
compute_normal_flux_constraints(
- const DoFHandlerType<dim, spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> & boundary_ids,
- AffineConstraints<double> & constraints,
- const Mapping<dim, spacedim> & mapping)
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ AffineConstraints<double> & constraints,
+ const Mapping<dim, spacedim> & mapping)
{
Functions::ZeroFunction<dim> zero_function(dim);
std::map<types::boundary_id, const Function<spacedim> *> function_map;
- template <int dim,
- class InVector,
- class OutVector,
- typename DoFHandlerType,
- int spacedim>
+ template <int dim, int spacedim, class InVector, class OutVector>
static void
do_integrate_difference(
const dealii::hp::MappingCollection<dim, spacedim> & mapping,
- const DoFHandlerType & dof,
+ const DoFHandler<dim, spacedim> & dof,
const InVector & fe_function,
const Function<spacedim, typename InVector::value_type> &exact_solution,
OutVector & difference,
difference(cell->active_cell_index()) = 0;
}
- template <int dim,
- class InVector,
- class OutVector,
- typename DoFHandlerType,
- int spacedim>
+ template <int dim, int spacedim, class InVector, class OutVector>
DEAL_II_DEPRECATED static typename std::enable_if<
!std::is_same<typename InVector::value_type, double>::value>::type
do_integrate_difference(
const dealii::hp::MappingCollection<dim, spacedim> &mapping,
- const DoFHandlerType & dof,
+ const DoFHandler<dim, spacedim> & dof,
const InVector & fe_function,
const Function<spacedim> & exact_solution,
OutVector & difference,
* with the hanging nodes from space @p dof afterwards, to make the result
* continuous again.
*
- * The template argument <code>DoFHandlerType</code> may either be of type
- * DoFHandler or hp::DoFHandler.
- *
* See the general documentation of this namespace for further information.
*
* @todo The @p mapping argument should be replaced by a
* between cells), then each subsequent call will rewrite the intercell @p
* dofs of the previous one.
*/
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
interpolate_based_on_material_id(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof_handler,
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof_handler,
const std::map<types::material_id,
const Function<spacedim, typename VectorType::value_type> *>
& function_map,
* parallel::distributed::Triangulation<dim>::no_automatic_repartitioning
* flag).
*/
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
- interpolate_to_different_mesh(const DoFHandlerType<dim, spacedim> &dof1,
- const VectorType & u1,
- const DoFHandlerType<dim, spacedim> &dof2,
- VectorType & u2);
+ interpolate_to_different_mesh(const DoFHandler<dim, spacedim> &dof1,
+ const VectorType & u1,
+ const DoFHandler<dim, spacedim> &dof2,
+ VectorType & u2);
/**
* Compute the interpolation of a @p dof1-function @p u1 to a @p dof2-function
* Without it - due to cellwise interpolation - the resulting output vector
* does not necessarily respect continuity requirements at hanging nodes.
*/
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
interpolate_to_different_mesh(
- const DoFHandlerType<dim, spacedim> & dof1,
+ const DoFHandler<dim, spacedim> & dof1,
const VectorType & u1,
- const DoFHandlerType<dim, spacedim> & dof2,
+ const DoFHandler<dim, spacedim> & dof2,
const AffineConstraints<typename VectorType::value_type> &constraints,
VectorType & u2);
* @p intergridmap has to be initialized via InterGridMap::make_mapping
* pointing from a source DoFHandler to a destination DoFHandler.
*/
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
interpolate_to_different_mesh(
- const InterGridMap<DoFHandlerType<dim, spacedim>> & intergridmap,
+ const InterGridMap<DoFHandler<dim, spacedim>> & intergridmap,
const VectorType & u1,
const AffineConstraints<typename VectorType::value_type> &constraints,
VectorType & u2);
* This function is only implemented for FiniteElements where the specified
* components are primitive.
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename VectorType>
+ template <int dim, int spacedim, typename VectorType>
void
- get_position_vector(const DoFHandlerType<dim, spacedim> &dh,
- VectorType & vector,
- const ComponentMask &mask = ComponentMask());
+ get_position_vector(const DoFHandler<dim, spacedim> &dh,
+ VectorType & vector,
+ const ComponentMask & mask = ComponentMask());
//@}
} // namespace VectorTools
// Function<spacedim, typename VectorType::value_type>*
//
// A given cell is skipped if function(cell) == nullptr
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType,
- typename T>
+ template <int dim, int spacedim, typename VectorType, typename T>
void
- interpolate(const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof_handler,
- T & function,
- VectorType & vec,
- const ComponentMask & component_mask)
+ interpolate(const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof_handler,
+ T & function,
+ VectorType & vec,
+ const ComponentMask & component_mask)
{
Assert(component_mask.represents_n_components(
dof_handler.get_fe_collection().n_components()),
}
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename VectorType>
+ template <int dim, int spacedim, typename VectorType>
void
- get_position_vector(const DoFHandlerType<dim, spacedim> &dh,
- VectorType & vector,
- const ComponentMask & mask)
+ get_position_vector(const DoFHandler<dim, spacedim> &dh,
+ VectorType & vector,
+ const ComponentMask & mask)
{
AssertDimension(vector.size(), dh.n_dofs());
const FiniteElement<dim, spacedim> &fe = dh.get_fe();
// interpolate from that vector space to this one, by
// carefully selecting the right components.
- FESystem<dim, spacedim> feq(FE_Q<dim, spacedim>(degree), spacedim);
- DoFHandlerType<dim, spacedim> dhq(dh.get_triangulation());
+ FESystem<dim, spacedim> feq(FE_Q<dim, spacedim>(degree), spacedim);
+ DoFHandler<dim, spacedim> dhq(dh.get_triangulation());
dhq.distribute_dofs(feq);
Vector<double> eulerq(dhq.n_dofs());
const ComponentMask maskq(spacedim, true);
}
}
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
interpolate_based_on_material_id(
- const Mapping<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> &dof_handler,
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> &dof_handler,
const std::map<types::material_id,
const Function<spacedim, typename VectorType::value_type> *>
& functions,
// Create a small lambda capture wrapping the function map and call the
// internal implementation
const auto function_map = [&functions](
- const typename DoFHandlerType<dim, spacedim>::active_cell_iterator &cell)
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell)
-> const Function<spacedim, typename VectorType::value_type> *
{
const auto function = functions.find(cell->material_id());
}
} // namespace internal
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
- interpolate_to_different_mesh(const DoFHandlerType<dim, spacedim> &dof1,
- const VectorType & u1,
- const DoFHandlerType<dim, spacedim> &dof2,
- VectorType & u2)
+ interpolate_to_different_mesh(const DoFHandler<dim, spacedim> &dof1,
+ const VectorType & u1,
+ const DoFHandler<dim, spacedim> &dof2,
+ VectorType & u2)
{
Assert(GridTools::have_same_coarse_mesh(dof1, dof2),
ExcMessage("The two DoF handlers must represent triangulations that "
"have the same coarse meshes"));
- InterGridMap<DoFHandlerType<dim, spacedim>> intergridmap;
+ InterGridMap<DoFHandler<dim, spacedim>> intergridmap;
intergridmap.make_mapping(dof1, dof2);
AffineConstraints<typename VectorType::value_type> dummy;
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
interpolate_to_different_mesh(
- const DoFHandlerType<dim, spacedim> & dof1,
+ const DoFHandler<dim, spacedim> & dof1,
const VectorType & u1,
- const DoFHandlerType<dim, spacedim> & dof2,
+ const DoFHandler<dim, spacedim> & dof2,
const AffineConstraints<typename VectorType::value_type> &constraints,
VectorType & u2)
{
ExcMessage("The two DoF handlers must represent triangulations that "
"have the same coarse meshes"));
- InterGridMap<DoFHandlerType<dim, spacedim>> intergridmap;
+ InterGridMap<DoFHandler<dim, spacedim>> intergridmap;
intergridmap.make_mapping(dof1, dof2);
interpolate_to_different_mesh(intergridmap, u1, constraints, u2);
}
- template <int dim,
- int spacedim,
- typename VectorType,
- template <int, int> class DoFHandlerType>
+ template <int dim, int spacedim, typename VectorType>
void
interpolate_to_different_mesh(
- const InterGridMap<DoFHandlerType<dim, spacedim>> & intergridmap,
+ const InterGridMap<DoFHandler<dim, spacedim>> & intergridmap,
const VectorType & u1,
const AffineConstraints<typename VectorType::value_type> &constraints,
VectorType & u2)
{
- const DoFHandlerType<dim, spacedim> &dof1 = intergridmap.get_source_grid();
- const DoFHandlerType<dim, spacedim> &dof2 =
- intergridmap.get_destination_grid();
+ const DoFHandler<dim, spacedim> &dof1 = intergridmap.get_source_grid();
+ const DoFHandler<dim, spacedim> &dof2 = intergridmap.get_destination_grid();
(void)dof2;
Assert(dof1.get_fe_collection() == dof2.get_fe_collection(),
// Therefore, loop over all cells
// (active and inactive) of the source
// grid ..
- typename DoFHandlerType<dim, spacedim>::cell_iterator cell1 = dof1.begin();
- const typename DoFHandlerType<dim, spacedim>::cell_iterator endc1 =
- dof1.end();
+ typename DoFHandler<dim, spacedim>::cell_iterator cell1 = dof1.begin();
+ const typename DoFHandler<dim, spacedim>::cell_iterator endc1 = dof1.end();
for (; cell1 != endc1; ++cell1)
{
- const typename DoFHandlerType<dim, spacedim>::cell_iterator cell2 =
+ const typename DoFHandler<dim, spacedim>::cell_iterator cell2 =
intergridmap[cell1];
// .. and skip if source and destination
* mapping here because the function we evaluate for the DoFs is zero in
* the mapped locations as well as in the original, unmapped locations
*/
- template <int dim,
- int spacedim,
- template <int, int> class DoFHandlerType,
- typename number>
+ template <int dim, int spacedim, typename number>
void
interpolate_zero_boundary_values(
- const DoFHandlerType<dim, spacedim> & dof_handler,
+ const DoFHandler<dim, spacedim> & dof_handler,
std::map<types::global_dof_index, number> &boundary_values)
{
// loop over all boundary faces
// that is actually wholly on
// the boundary, not only by
// one line or one vertex
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator
+ typename DoFHandler<dim, spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
std::vector<types::global_dof_index> face_dof_indices;
*/
template <int dim,
int spacedim,
- template <int, int> class DoFHandlerType,
template <int, int> class M_or_MC,
template <int> class Q_or_QC,
typename number>
void
project_compute_b_v(
const M_or_MC<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> & dof,
+ const DoFHandler<dim, spacedim> & dof,
const Function<spacedim, number> & function,
const bool enforce_zero_boundary,
const Q_or_QC<dim - 1> & q_boundary,
template <int dim,
int spacedim,
typename VectorType,
- template <int, int> class DoFHandlerType,
template <int, int> class M_or_MC,
template <int> class Q_or_QC>
void
do_project(
const M_or_MC<dim, spacedim> & mapping,
- const DoFHandlerType<dim, spacedim> & dof,
+ const DoFHandler<dim, spacedim> & dof,
const AffineConstraints<typename VectorType::value_type> & constraints,
const Q_or_QC<dim> & quadrature,
const Function<spacedim, typename VectorType::value_type> &function,
for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
- DH : DOFHANDLER_TEMPLATES;
number : REAL_AND_COMPLEX_SCALARS)
{
#if deal_II_dimension <= deal_II_space_dimension
template void
interpolate_boundary_values(
const Mapping<deal_II_dimension, deal_II_space_dimension> &,
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const std::map<types::boundary_id,
const Function<deal_II_space_dimension, number> *> &,
std::map<types::global_dof_index, number> &,
template void
interpolate_boundary_values(
const Mapping<deal_II_dimension, deal_II_space_dimension> &,
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const Function<deal_II_space_dimension, number> &,
std::map<types::global_dof_index, number> &,
template void
interpolate_boundary_values(
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const Function<deal_II_space_dimension, number> &,
std::map<types::global_dof_index, number> &,
template void
interpolate_boundary_values(
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const std::map<types::boundary_id,
const Function<deal_II_space_dimension, number> *> &,
std::map<types::global_dof_index, number> &,
for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
- DH : DOFHANDLER_TEMPLATES;
number : REAL_AND_COMPLEX_SCALARS)
{
#if deal_II_dimension <= deal_II_space_dimension
template void
interpolate_boundary_values(
const Mapping<deal_II_dimension, deal_II_space_dimension> &,
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const std::map<types::boundary_id,
const Function<deal_II_space_dimension, number> *> &,
AffineConstraints<number> &,
template void
interpolate_boundary_values(
const Mapping<deal_II_dimension, deal_II_space_dimension> &,
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const Function<deal_II_space_dimension, number> &,
AffineConstraints<number> &,
template void
interpolate_boundary_values(
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const Function<deal_II_space_dimension, number> &,
AffineConstraints<number> &,
template void
interpolate_boundary_values(
- const DH<deal_II_dimension, deal_II_space_dimension> &,
+ const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const std::map<types::boundary_id,
const Function<deal_II_space_dimension, number> *> &,
AffineConstraints<number> &,
// TODO[SP]: replace <deal_II_dimension> by <deal_II_dimension,
// deal_II_space_dimension>
// where applicable and move to codimension cases above also when applicable
-for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS;
- deal_II_space_dimension : SPACE_DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
{
namespace VectorTools
\{
}
-for (DoFHandler : DOFHANDLER_TEMPLATES; VEC : VECTOR_TYPES;
- deal_II_dimension : DIMENSIONS;
+for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS;
deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension