]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a typo in the computation of the curl in 2d.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 14 Sep 2010 15:09:12 +0000 (15:09 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 14 Sep 2010 15:09:12 +0000 (15:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@21959 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_values.h

index 08c0c2ad570752e7e33a85e3be9185ee0fc9d2e7..c26b382a4a8d32998daef93eb5e45e83db338dab 100644 (file)
@@ -3870,17 +3870,16 @@ namespace FEValuesViews
               if (snc != -1) {
                  curl_type return_value;
 
-                 switch (shape_function_data[shape_function].single_nonzero_component_index) {
-                    case 0: {
-                       return_value[0] = -1.0 * fe_values.shape_gradients[snc][q_point][1];
-                       return return_value;
-                    }
-
-                    default: {
-                       return_value[0] = fe_values.shape_gradients[snc][q_point][2];
-                       return return_value;
-                    }
-                 }
+                                                 // the single
+                                                 // nonzero component
+                                                 // can only be zero
+                                                 // or one in 2d
+                 if (shape_function_data[shape_function].single_nonzero_component_index == 0)
+                  return_value[0] = -1.0 * fe_values.shape_gradients[snc][q_point][1];
+                else
+                  return_value[0] = fe_values.shape_gradients[snc][q_point][0];
+
+                return return_value;
               }
 
               else {

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.