]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add Hessian things for P1 nonconforming nonparametric element.
authorJaeryun Yim <jaeryun.yim@gmail.com>
Thu, 28 Jan 2016 18:54:43 +0000 (03:54 +0900)
committerJaeryun Yim <jaeryun.yim@gmail.com>
Fri, 16 Sep 2016 12:07:21 +0000 (21:07 +0900)
source/fe/fe_p1nc.cc

index d22c29d516417b505bf85505d37ba5f736eabbe3..4740152fca2bb68b48d5ea92862c89d37f06579a 100644 (file)
@@ -572,6 +572,23 @@ FE_P1NCNonparametric::fill_fe_values (const Triangulation<2,2>::cell_iterator
 
       }
 
+      // hessian
+      std::vector<Tensor<2,2> > hessians(flags & update_hessians ? this->dofs_per_cell : 0);
+      if (flags & update_hessians)
+      {
+        for (unsigned int i=0; i<n_q_points; ++i)
+        {
+            for (unsigned int k=0; k<this->dofs_per_cell; ++k)
+            {
+                hessians[k][0][0] = 0.0 ;
+                hessians[k][0][1] = 0.0 ;
+                hessians[k][1][0] = 0.0 ;
+                hessians[k][1][1] = 0.0 ;
+                output_data.shape_hessians[k][i] = hessians[k];
+            }
+        }
+      }
+
   // When this function is called for the graphic out,
   // MappingRelatedData does not work properly.
   // In this case, the quadrature points on the real cell is computed in manual sense, using 'mapping' and 'quadrature'.
@@ -874,7 +891,9 @@ UpdateFlags     FE_P1NCNonparametric::requires_update_flags (const UpdateFlags f
       out |= update_gradients ;
     if (flags & update_cell_normal_vectors)
       out |= update_cell_normal_vectors | update_JxW_values;
-
+    if (flags & update_hessians)
+      out |= update_hessians;
   return out;
 }
 

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.