std::map<types::global_dof_index, number> &boundary_values,
const ComponentMask &component_mask = ComponentMask());
+ /**
+ * Like the previous function, but take a mapping collection to go with
+ * DoFHandler objects with hp-capabilities.
+ */
+ template <int dim, int spacedim, typename number>
+ void
+ interpolate_boundary_values(
+ const hp::MappingCollection<dim, spacedim> &mapping,
+ 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,
+ const ComponentMask &component_mask = ComponentMask());
+
/**
* Call the other interpolate_boundary_values() function, see above, with
* <tt>mapping=MappingQGeneric@<dim,spacedim@>(1)</tt>. The same comments
AffineConstraints<number> &constraints,
const ComponentMask & component_mask = ComponentMask());
+ /**
+ * Like the previous function, but take a mapping collection to go with
+ * DoFHandler objects with hp-capabilities.
+ */
+ template <int dim, int spacedim, typename number>
+ void
+ interpolate_boundary_values(
+ const hp::MappingCollection<dim, spacedim> &mapping,
+ const DoFHandler<dim, spacedim> & dof,
+ const std::map<types::boundary_id, const Function<spacedim, number> *>
+ & function_map,
+ AffineConstraints<number> &constraints,
+ const ComponentMask & component_mask = ComponentMask());
+
/**
* Same function as above, but taking only one pair of boundary indicator
* and corresponding boundary function. The same comments apply as for the
AffineConstraints<number> & constraints,
const ComponentMask & component_mask = ComponentMask());
+ /**
+ * Like the previous function, but take a mapping collection to go with
+ * DoFHandler objects with hp-capabilities.
+ */
+ template <int dim, int spacedim, typename number>
+ void
+ interpolate_boundary_values(
+ const hp::MappingCollection<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
* <tt>mapping=MappingQGeneric@<dim,spacedim@>(1)</tt>. The same comments
+ template <int dim, int spacedim, typename number>
+ void
+ interpolate_boundary_values(
+ const hp::MappingCollection<dim, spacedim> &mapping,
+ 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,
+ const ComponentMask & component_mask)
+ {
+ std::map<types::boundary_id, const Function<spacedim, number> *>
+ function_map;
+ function_map[boundary_component] = &boundary_function;
+ interpolate_boundary_values(
+ mapping, dof, function_map, boundary_values, component_mask);
+ }
+
+
+
template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
+ template <int dim, int spacedim, typename number>
+ void
+ interpolate_boundary_values(
+ const hp::MappingCollection<dim, spacedim> &mapping,
+ const DoFHandler<dim, spacedim> & dof,
+ const std::map<types::boundary_id, const Function<spacedim, number> *>
+ & function_map,
+ AffineConstraints<number> &constraints,
+ const ComponentMask & component_mask_)
+ {
+ std::map<types::global_dof_index, number> boundary_values;
+ interpolate_boundary_values(
+ mapping, dof, function_map, boundary_values, component_mask_);
+ typename std::map<types::global_dof_index, number>::const_iterator
+ boundary_value = boundary_values.begin();
+ for (; boundary_value != boundary_values.end(); ++boundary_value)
+ {
+ if (constraints.can_store_line(boundary_value->first) &&
+ !constraints.is_constrained(boundary_value->first))
+ {
+ constraints.add_line(boundary_value->first);
+ constraints.set_inhomogeneity(boundary_value->first,
+ boundary_value->second);
+ }
+ }
+ }
+
+
+
+ template <int dim, int spacedim, typename number>
+ void
+ interpolate_boundary_values(
+ const hp::MappingCollection<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;
+ function_map[boundary_component] = &boundary_function;
+ interpolate_boundary_values(
+ mapping, dof, function_map, constraints, component_mask);
+ }
+
+
+
template <int dim, int spacedim, typename number>
void
interpolate_boundary_values(
template void
interpolate_boundary_values(
+ const hp::MappingCollection<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> &,
+ const ComponentMask &);
+
+ template void
+ interpolate_boundary_values(
+ const hp::MappingCollection<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> &,
template void
interpolate_boundary_values(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
- const std::map<types::boundary_id,
- const Function<deal_II_space_dimension, number> *> &,
+ const types::boundary_id,
+ const Function<deal_II_space_dimension, number> &,
std::map<types::global_dof_index, number> &,
const ComponentMask &);
- \}
-#endif
- }
-
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
- number : REAL_AND_COMPLEX_SCALARS)
- {
-#if deal_II_dimension <= deal_II_space_dimension
- namespace VectorTools
- \{
template void
interpolate_boundary_values(
- const hp::MappingCollection<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> &,
const ComponentMask &);
+ template void
+ interpolate_boundary_values(
+ const hp::MappingCollection<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> &,
+ const ComponentMask &);
+
+ template void
+ interpolate_boundary_values(
+ const hp::MappingCollection<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> &,
+ const ComponentMask &);
+
template void
interpolate_boundary_values(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,