* information.
*/
template <int dim, int spacedim>
- void
- compute_projection_from_face_quadrature_points_matrix (const FiniteElement<dim, spacedim> &fe,
- const Quadrature<dim-1> &lhs_quadrature,
- const Quadrature<dim-1> &rhs_quadrature,
- const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
- const unsigned int face,
- FullMatrix<double> &X);
+ void compute_projection_from_face_quadrature_points_matrix(
+ const FiniteElement<dim, spacedim> &fe,
+ const Quadrature<dim - 1> &lhs_quadrature,
+ const Quadrature<dim - 1> &rhs_quadrature,
+ const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+ const unsigned int face,
+ FullMatrix<double> &X);
+
+
+
+ /**
+ * Wrapper around
+ * FiniteElement::convert_generalized_support_point_values_to_dof_values()
+ * that works with arbitrary number types.
+ *
+ * If the number type is double this function simply calls the
+ * FiniteElement::convert_generalized_support_point_values_to_dof_values()
+ * directly. Otherwise, temporary (per-thread storage) is used to call to
+ * above function.
+ */
+ template <int dim, int spacedim, typename number>
+ void convert_generalized_support_point_values_to_dof_values(
+ const FiniteElement<dim, spacedim> &finite_element,
+ const std::vector<Vector<number> > &support_point_values,
+ std::vector<number> &nodal_values);
+ namespace
+ {
+ // internal helper class to partially specialize the number type
+
+ template <int dim, int spacedim, typename number>
+ struct ConvertHelper
+ {
+ static void convert_generalized_support_point_values_to_dof_values(
+ const FiniteElement<dim, spacedim> &finite_element,
+ const std::vector<Vector<number> > &support_point_values,
+ std::vector<number> &dof_values)
+ {
+ static Threads::ThreadLocalStorage<std::vector<Vector<double> > >
+ double_support_point_values;
+ static Threads::ThreadLocalStorage<std::vector<double> >
+ double_dof_values;
+
+ double_support_point_values.get().resize(support_point_values.size());
+ double_dof_values.get().resize(dof_values.size());
+
+ for (unsigned int i = 0; i < support_point_values.size(); ++i)
+ {
+ double_support_point_values.get()[i].reinit(
+ finite_element.n_components(), false);
+ std::copy(std::begin(support_point_values[i]),
+ std::end(support_point_values[i]),
+ std::begin(double_support_point_values.get()[i]));
+ }
+
+ finite_element.convert_generalized_support_point_values_to_dof_values(
+ double_support_point_values.get(), double_dof_values.get());
+
+ std::copy(std::begin(double_dof_values.get()),
+ std::end(double_dof_values.get()),
+ std::begin(dof_values));
+ }
+ };
+
+ // In case of double simply call the finite element directly
+ template <int dim, int spacedim>
+ struct ConvertHelper<dim, spacedim, double>
+ {
+ static void convert_generalized_support_point_values_to_dof_values(
+ const FiniteElement<dim, spacedim> &finite_element,
+ const std::vector<Vector<double> > &support_point_values,
+ std::vector<double> &dof_values)
+ {
+ finite_element.convert_generalized_support_point_values_to_dof_values(
+ support_point_values, dof_values);
+ }
+ };
+
+ } /* anonymous namespace */
+
+
+
+ template <int dim, int spacedim, typename number>
+ void convert_generalized_support_point_values_to_dof_values(
+ const FiniteElement<dim, spacedim> &finite_element,
+ const std::vector<Vector<number> > &support_point_values,
+ std::vector<number> &dof_values)
+ {
+ AssertDimension(support_point_values.size(),
+ finite_element.get_generalized_support_points().size());
+ AssertDimension(dof_values.size(), finite_element.dofs_per_cell);
+
+ ConvertHelper<dim, spacedim, number>::
+ convert_generalized_support_point_values_to_dof_values(
+ finite_element, support_point_values, dof_values);
+ }
+
+
+
template <int dim>
void
hierarchic_to_lexicographic_numbering (unsigned int degree, std::vector<unsigned int> &h2l)