]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Implement convert_generalized_support_point_values_to_dof_values for wedges/pyramids 12853/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 20 Oct 2021 08:34:37 +0000 (10:34 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 20 Oct 2021 08:34:37 +0000 (10:34 +0200)
include/deal.II/fe/fe_pyramid_p.h
include/deal.II/fe/fe_wedge_p.h
source/fe/fe_pyramid_p.cc
source/fe/fe_wedge_p.cc

index b82028744d3f13c5412ed0db232920ea45bb6e7a..243a5c615eba28e104747068f316af5e8d2974ec 100644 (file)
@@ -41,6 +41,14 @@ public:
   FE_PyramidPoly(const unsigned int                                degree,
                  const internal::GenericDoFsPerObject &            dpos,
                  const typename FiniteElementData<dim>::Conformity conformity);
+
+  /**
+   * @copydoc dealii::FiniteElement::convert_generalized_support_point_values_to_dof_values()
+   */
+  virtual void
+  convert_generalized_support_point_values_to_dof_values(
+    const std::vector<Vector<double>> &support_point_values,
+    std::vector<double> &              nodal_values) const override;
 };
 
 /**
index 032bba660ef4e44a522414d4d98a6460c2d578ff..18d3227c19b7d1be3b4544f03b551f1c2394ccdb 100644 (file)
@@ -41,6 +41,14 @@ public:
   FE_WedgePoly(const unsigned int                                degree,
                const internal::GenericDoFsPerObject &            dpos,
                const typename FiniteElementData<dim>::Conformity conformity);
+
+  /**
+   * @copydoc dealii::FiniteElement::convert_generalized_support_point_values_to_dof_values()
+   */
+  virtual void
+  convert_generalized_support_point_values_to_dof_values(
+    const std::vector<Vector<double>> &support_point_values,
+    std::vector<double> &              nodal_values) const override;
 };
 
 /**
index 92d516e0bd67d5d8c6ab72e0988cea01005521ba..68209cfd1a88d5f6e48b4dfe24f690225643ac22 100644 (file)
@@ -108,6 +108,28 @@ FE_PyramidPoly<dim, spacedim>::FE_PyramidPoly(
 
 
 
+template <int dim, int spacedim>
+void
+FE_PyramidPoly<dim, spacedim>::
+  convert_generalized_support_point_values_to_dof_values(
+    const std::vector<Vector<double>> &support_point_values,
+    std::vector<double> &              nodal_values) const
+{
+  AssertDimension(support_point_values.size(),
+                  this->get_unit_support_points().size());
+  AssertDimension(support_point_values.size(), nodal_values.size());
+  AssertDimension(this->dofs_per_cell, nodal_values.size());
+
+  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+    {
+      AssertDimension(support_point_values[i].size(), 1);
+
+      nodal_values[i] = support_point_values[i](0);
+    }
+}
+
+
+
 template <int dim, int spacedim>
 FE_PyramidP<dim, spacedim>::FE_PyramidP(const unsigned int degree)
   : FE_PyramidPoly<dim, spacedim>(degree,
index 33a6b62abaa26a5823ef2388779736d6b20f1372..184796a86611dae8d466c89f380e6866919f907b 100644 (file)
@@ -116,6 +116,28 @@ FE_WedgePoly<dim, spacedim>::FE_WedgePoly(
 
 
 
+template <int dim, int spacedim>
+void
+FE_WedgePoly<dim, spacedim>::
+  convert_generalized_support_point_values_to_dof_values(
+    const std::vector<Vector<double>> &support_point_values,
+    std::vector<double> &              nodal_values) const
+{
+  AssertDimension(support_point_values.size(),
+                  this->get_unit_support_points().size());
+  AssertDimension(support_point_values.size(), nodal_values.size());
+  AssertDimension(this->dofs_per_cell, nodal_values.size());
+
+  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+    {
+      AssertDimension(support_point_values[i].size(), 1);
+
+      nodal_values[i] = support_point_values[i](0);
+    }
+}
+
+
+
 template <int dim, int spacedim>
 FE_WedgeP<dim, spacedim>::FE_WedgeP(const unsigned int degree)
   : FE_WedgePoly<dim, spacedim>(degree,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.