]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Compute the number of symmetric tensors of rank 2 that we can fit into
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 23 Sep 2009 19:44:06 +0000 (19:44 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 23 Sep 2009 19:44:06 +0000 (19:44 +0000)
a vector valued element based on spacedim, not dim.

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

deal.II/deal.II/source/fe/fe_values.cc

index 36027ca2104e98b0ba3cb2eca60b344a8f00c649..c5c40cb1d3e141ba87ffbd0bc81f70b6ec69edf9 100644 (file)
@@ -233,7 +233,6 @@ namespace FEValuesViews
                  first_tensor_component(first_tensor_component),
                  shape_function_data(fe_values.fe->dofs_per_cell)
   {
-
     Assert(first_tensor_component + value_type::n_independent_components - 1
           <
           fe_values.fe->n_components(),
@@ -1085,9 +1084,10 @@ namespace internal
                                                        component);
        }
 
-      const unsigned int n_symmetric_second_order_tensors = (fe.n_components() >= 0.5*(dim*dim + dim) ?
-                                                            fe.n_components() - 0.5*(dim*dim + dim) + 1 :
-                                                            0);
+      const unsigned int n_symmetric_second_order_tensors
+       = (fe.n_components() >= (spacedim*spacedim + spacedim)/2 ?
+          fe.n_components() - (spacedim*spacedim + spacedim)/2 + 1 :
+          0);
       symmetric_second_order_tensors.resize(n_symmetric_second_order_tensors);
       for (unsigned int component = 0; component < n_symmetric_second_order_tensors; ++component)
        {

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.