]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Slightly relax Hermite detection; add a test for Hermite type. 6261/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 18 Apr 2018 15:35:11 +0000 (17:35 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 18 Apr 2018 15:35:11 +0000 (17:35 +0200)
include/deal.II/matrix_free/evaluation_selector.h
include/deal.II/matrix_free/shape_info.templates.h
tests/matrix_free/shape_info.cc
tests/matrix_free/shape_info.output

index db65bbcbd6eef1476bf297a7a9735485a5ef33d9..0215bf0a3bc5ddd653b9aae3485bf1ceacd44a4a 100644 (file)
@@ -245,8 +245,7 @@ namespace
                                     const bool               evaluate_gradients,
                                     const bool               evaluate_hessians)
   {
-    Assert(shape_info.element_type == internal::MatrixFreeFunctions::tensor_symmetric||
-           shape_info.element_type == internal::MatrixFreeFunctions::tensor_symmetric_collocation,
+    Assert(shape_info.element_type <= internal::MatrixFreeFunctions::tensor_symmetric,
            ExcInternalError());
     Factory<dim, n_components, Number>::evaluate
     (shape_info, values_dofs_actual, values_quad, gradients_quad, hessians_quad,
@@ -268,8 +267,7 @@ namespace
                                      const bool               integrate_values,
                                      const bool               integrate_gradients)
   {
-    Assert(shape_info.element_type == internal::MatrixFreeFunctions::tensor_symmetric||
-           shape_info.element_type == internal::MatrixFreeFunctions::tensor_symmetric_collocation,
+    Assert(shape_info.element_type <= internal::MatrixFreeFunctions::tensor_symmetric,
            ExcInternalError());
     Factory<dim, n_components, Number>::integrate
     (shape_info, values_dofs_actual, values_quad, gradients_quad,
@@ -401,7 +399,7 @@ SelectEvaluator<dim, fe_degree, n_q_points_1d, n_components, Number>::evaluate
                  evaluate_values, evaluate_gradients, evaluate_hessians);
     }
   else if (fe_degree < n_q_points_1d &&
-           shape_info.element_type == internal::MatrixFreeFunctions::tensor_symmetric)
+           shape_info.element_type <= internal::MatrixFreeFunctions::tensor_symmetric)
     {
       internal::FEEvaluationImplTransformToCollocation<dim, fe_degree, n_q_points_1d, n_components, Number>
       ::evaluate(shape_info, values_dofs_actual, values_quad,
@@ -469,7 +467,7 @@ SelectEvaluator<dim, fe_degree, n_q_points_1d, n_components, Number>::integrate
                   integrate_values, integrate_gradients, false);
     }
   else if (fe_degree < n_q_points_1d &&
-           shape_info.element_type == internal::MatrixFreeFunctions::tensor_symmetric)
+           shape_info.element_type <= internal::MatrixFreeFunctions::tensor_symmetric)
     {
       internal::FEEvaluationImplTransformToCollocation<dim, fe_degree, n_q_points_1d, n_components, Number>
       ::integrate(shape_info, values_dofs_actual, values_quad,
index 8260f8f869d4cb236880d86ab01124306e2fa6ad..3a83d68912bbfb3c0b5658b8e3fd436eaa5a15a6 100644 (file)
@@ -278,7 +278,7 @@ namespace internal
             element_type = tensor_symmetric_collocation;
           else
             element_type = tensor_symmetric;
-          if (n_dofs_1d > 3 && element_type == tensor_symmetric)
+          if (n_dofs_1d > 2 && element_type == tensor_symmetric)
             {
               // check if we are a Hermite type
               element_type = tensor_symmetric_hermite;
index 35b63427abdc9ed93999722ebbb580cb7bdde5d7..a21a375bec29440b926f05ccf96dacd552578b25 100644 (file)
@@ -87,6 +87,20 @@ int main ()
   test(FE_DGQ<2>(17), gauss8);
   test(FE_DGQ<2>(25), gauss3);
 
+  test(FE_DGQHermite<2>(1), gauss3);
+  test(FE_DGQHermite<2>(1), gauss8);
+  test(FE_DGQHermite<2>(2), gauss3);
+  test(FE_DGQHermite<2>(2), gauss8);
+  test(FE_DGQHermite<2>(3), gauss3);
+  test(FE_DGQHermite<2>(3), gauss8);
+  test(FE_DGQHermite<2>(6), gauss3);
+  test(FE_DGQHermite<2>(6), gauss8);
+  test(FE_DGQHermite<2>(12), gauss3);
+  test(FE_DGQHermite<2>(12), gauss8);
+  test(FE_DGQHermite<2>(25), gauss3);
+  test(FE_DGQHermite<2>(25), gauss8);
+  test(FE_DGQHermite<2>(45), gauss8);
+
   test(FE_DGQArbitraryNodes<2>(QIterated<1>(QTrapez<1>(), 1)), gauss3);
   test(FE_DGQArbitraryNodes<3>(QIterated<1>(QTrapez<1>(), 6)), gauss3);
   test(FE_DGQArbitraryNodes<2>(QIterated<1>(QTrapez<1>(), 13)), gauss8);
index e84cf72bec17b4f6071460b0b57c4fb1d1421540..87b8dbfbd584185534925fc615fae1ccdf8be821 100644 (file)
@@ -29,6 +29,19 @@ DEAL::Detected shape info type for FE_DGQ<3>(6): 2
 DEAL::Detected shape info type for FE_Q_Hierarchical<3>(6): 3
 DEAL::Detected shape info type for FE_DGQ<2>(17): 2
 DEAL::Detected shape info type for FE_DGQ<2>(25): 2
+DEAL::Detected shape info type for FE_DGQHermite<2>(1): 2
+DEAL::Detected shape info type for FE_DGQHermite<2>(1): 2
+DEAL::Detected shape info type for FE_DGQHermite<2>(2): 3
+DEAL::Detected shape info type for FE_DGQHermite<2>(2): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(3): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(3): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(6): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(6): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(12): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(12): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(25): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(25): 1
+DEAL::Detected shape info type for FE_DGQHermite<2>(45): 1
 DEAL::Detected shape info type for FE_DGQ<2>(1): 2
 DEAL::Detected shape info type for FE_DGQArbitraryNodes<3>(QIterated(QTrapez(),6)): 2
 DEAL::Detected shape info type for FE_DGQArbitraryNodes<2>(QIterated(QTrapez(),13)): 2

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.