]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a 0-dimensional face support point on FE_Q<1>. 12379/head
authorSimon Sticko <simon@sticko.se>
Wed, 2 Jun 2021 13:24:37 +0000 (15:24 +0200)
committerSimon Sticko <simon@sticko.se>
Thu, 3 Jun 2021 06:42:23 +0000 (08:42 +0200)
In several places QProjector is used to map the dim-1 dimensional face
support points to dim dimensional points, but this is not possible in
1D because unit_face_support_points currently contains no points for
FE_Q<1>. Add a single 0-dimensional point to unit_face_support_points
to fix this.

source/fe/fe_q_base.cc
tests/fe/fe_data_test.output
tests/fe/fe_support_points_q.cc
tests/fe/fe_support_points_q.output

index 10ceee4f0a410ca94aa008aeb655886e47df2547..f0eb0cd8e0d310e212e5adfadc45404ce28df897 100644 (file)
@@ -978,10 +978,6 @@ void
 FE_Q_Base<dim, spacedim>::initialize_unit_face_support_points(
   const std::vector<Point<1>> &points)
 {
-  // no faces in 1d, so nothing to do
-  if (dim == 1)
-    return;
-
   // TODO: the implementation makes the assumption that all faces have the
   // same number of dofs
   AssertDimension(this->n_unique_faces(), 1);
@@ -990,6 +986,11 @@ FE_Q_Base<dim, spacedim>::initialize_unit_face_support_points(
   this->unit_face_support_points[face_no].resize(
     Utilities::fixed_power<dim - 1>(q_degree + 1));
 
+  // In 1D, there is only one 0-dimensional support point, so there is nothing
+  // more to be done.
+  if (dim == 1)
+    return;
+
   // find renumbering of faces and assign from values of quadrature
   const std::vector<unsigned int> face_index_map =
     FETools::lexicographic_to_hierarchic_numbering<dim - 1>(q_degree);
index 95b0ee1f0bf329d8ba7e7d06a23e5b9c1bf9cd9f..e1f992eb8b3cd565171f9351629ac9790adeeca4 100644 (file)
@@ -50,7 +50,7 @@ DEAL::blocks=1:[2]->2
 DEAL::degree=1
 DEAL::conformity= Hcurl Hdiv H1
 DEAL::unit_support_points=2
-DEAL::unit_face_support_points=0
+DEAL::unit_face_support_points=1
 DEAL::generalized_support_points=2
 DEAL::face_to_equivalent_cell_index: 0
 DEAL::face_to_cell_index: 0
@@ -76,7 +76,7 @@ DEAL::blocks=1:[3]->3
 DEAL::degree=2
 DEAL::conformity= Hcurl Hdiv H1
 DEAL::unit_support_points=3
-DEAL::unit_face_support_points=0
+DEAL::unit_face_support_points=1
 DEAL::generalized_support_points=3
 DEAL::face_to_equivalent_cell_index: 0
 DEAL::face_to_cell_index: 0
@@ -102,7 +102,7 @@ DEAL::blocks=1:[5]->5
 DEAL::degree=4
 DEAL::conformity= Hcurl Hdiv H1
 DEAL::unit_support_points=5
-DEAL::unit_face_support_points=0
+DEAL::unit_face_support_points=1
 DEAL::generalized_support_points=5
 DEAL::face_to_equivalent_cell_index: 0
 DEAL::face_to_cell_index: 0
index 5c2a4250a98d1fd9b8cdb0e9e44973d53b4d4a98..b97018df0f8df022f56e9647bccc18325bd6ba38 100644 (file)
@@ -25,6 +25,8 @@ main()
 {
   initlog();
 
+  CHECK_ALL(Q, 1, 1);
+
   CHECK_ALL(Q, 1, 2);
   CHECK_ALL(Q, 2, 2);
   CHECK_ALL(Q, 3, 2);
index 11cc9484c5f7ee3c23101e994c58f29032cfaec0..c3532a4277f9900fd8d793321d424acc47c5e4dd 100644 (file)
@@ -1,4 +1,14 @@
 
+DEAL::Q1<1> cell support points
+DEAL::0.00
+DEAL::1.00
+DEAL::Q1<1> face 0 support points
+DEAL::0.00
+DEAL::Q1<1> face 1 support points
+DEAL::1.00
+DEAL::Q1<1> cell generalized support points
+DEAL::0.00
+DEAL::1.00
 DEAL::Q1<2> cell support points
 DEAL::0.00 0.00
 DEAL::1.00 0.00

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.