From: Wolfgang Bangerth Date: Wed, 23 Sep 2009 19:44:06 +0000 (+0000) Subject: Compute the number of symmetric tensors of rank 2 that we can fit into X-Git-Tag: v8.0.0~7056 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e413c1abc244285c322a1b1958ddb55c1fed23ca;p=dealii.git Compute the number of symmetric tensors of rank 2 that we can fit into a vector valued element based on spacedim, not dim. git-svn-id: https://svn.dealii.org/trunk@19519 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index 36027ca210..c5c40cb1d3 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -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) {