]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix bug with a bilinear finite element returning zero for all its
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 9 Feb 1999 20:02:31 +0000 (20:02 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 9 Feb 1999 20:02:31 +0000 (20:02 +0000)
second derivatives on the unit cell, which surely is not right.

git-svn-id: https://svn.dealii.org/trunk@776 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_lib.linear.cc

index c0ad349751c1ef444ab544ae2dcde350db978aa6..8382901fd20980f8aa510bcaf14a646720a0b984 100644 (file)
@@ -289,6 +289,23 @@ FELinear<2>::shape_grad_grad (const unsigned int i,
 {
   Assert((i<total_dofs), ExcInvalidIndex(i));
 
+  switch (i)
+    {
+      case 0:
+      case 2:
+      {
+           const double initializer[2][2] = {{0, 1},{1,0}};
+           return Tensor<2,2>(initializer);
+      };
+       
+      case 1:
+      case 3:
+      {
+           const double initializer[2][2] = {{0, -1},{-1,0}};
+           return Tensor<2,2>(initializer);
+      };
+    };    
+           
   return Tensor<2,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.