template <int dim, int spacedim>
class Mapping;
+namespace hp
+{
+ template <int dim, int spacedim>
+ class MappingCollection;
+}
+
namespace VectorTools
{
/**
* continuous again.
*
* See the general documentation of this namespace for further information.
- *
- * @todo The @p mapping argument should be replaced by a
- * hp::MappingCollection in case of a hp::DoFHandler.
*/
template <int dim, int spacedim, typename VectorType>
void
VectorType & vec,
const ComponentMask &component_mask = ComponentMask());
+ /**
+ * Same as above but in an hp context.
+ */
+ template <int dim, int spacedim, typename VectorType>
+ void
+ interpolate(
+ const hp::MappingCollection<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> & dof,
+ const Function<spacedim, typename VectorType::value_type> &function,
+ VectorType & vec,
+ const ComponentMask &component_mask = ComponentMask());
+
+
/**
* Call the @p interpolate() function above with
* <tt>mapping=MappingQGeneric1@<dim>@()</tt>.
// A given cell is skipped if function(cell) == nullptr
template <int dim, int spacedim, typename VectorType, typename T>
void
- interpolate(const Mapping<dim, spacedim> & mapping,
- const DoFHandler<dim, spacedim> &dof_handler,
- T & function,
- VectorType & vec,
- const ComponentMask & component_mask)
+ interpolate(const hp::MappingCollection<dim, spacedim> &mapping_collection,
+ 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()),
support_quadrature.push_back(Quadrature<dim>(points));
}
- const hp::MappingCollection<dim, spacedim> mapping_collection(mapping);
-
// An FEValues object to evaluate (generalized) support point
// locations as well as Jacobians and their inverses.
// the latter are only needed for Hcurl or Hdiv conforming elements,
template <int dim, int spacedim, typename VectorType>
void
interpolate(
- const Mapping<dim, spacedim> & mapping,
+ const hp::MappingCollection<dim, spacedim> & mapping,
const DoFHandler<dim, spacedim> & dof_handler,
const Function<spacedim, typename VectorType::value_type> &function,
VectorType & vec,
+ template <int dim, int spacedim, typename VectorType>
+ void
+ interpolate(
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const Function<spacedim, typename VectorType::value_type> &function,
+ VectorType & vec,
+ const ComponentMask & component_mask)
+ {
+ interpolate(hp::MappingCollection<dim, spacedim>(mapping),
+ dof_handler,
+ function,
+ vec,
+ component_mask);
+ }
+
+
+
template <int dim, int spacedim, typename VectorType>
void
interpolate(
return nullptr;
};
- internal::interpolate(
- mapping, dof_handler, function_map, vec, component_mask);
+ internal::interpolate(hp::MappingCollection<dim, spacedim>(mapping),
+ dof_handler,
+ function_map,
+ vec,
+ component_mask);
}
namespace internal