From: kronbichler Date: Tue, 9 Dec 2008 10:35:24 +0000 (+0000) Subject: There was another error in the new get_function_*. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32634bc07e93d028dd51d33803378c42e159b38d;p=dealii-svn.git There was another error in the new get_function_*. git-svn-id: https://svn.dealii.org/trunk@17905 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 70033261f3..808b78ca7f 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -648,7 +648,11 @@ void FEValuesBase::get_function_values ( if (fe->is_primitive(shape_func)) { - const double *shape_value_ptr = &this->shape_values(shape_func, 0); + const unsigned int + row = fe->is_primitive() ? + shape_func : this->shape_function_to_row_table[shape_func]; + + const double *shape_value_ptr = &this->shape_values(row, 0); const unsigned int comp = fe->system_to_component_index(shape_func).first; for (unsigned int point=0; point::get_function_values ( if (fe->is_primitive(shape_func)) { - const double *shape_value_ptr = &this->shape_values(shape_func, 0); + const unsigned int + row = fe->is_primitive() ? + shape_func : this->shape_function_to_row_table[shape_func]; + + const double *shape_value_ptr = &this->shape_values(row, 0); const unsigned int comp = fe->system_to_component_index(shape_func).first + mc * n_components; for (unsigned int point=0; point::get_function_values ( if (fe->is_primitive(shape_func)) { - const double *shape_value_ptr = &this->shape_values(shape_func, 0); + const unsigned int + row = fe->is_primitive() ? + shape_func : this->shape_function_to_row_table[shape_func]; + + const double *shape_value_ptr = &this->shape_values(row, 0); const unsigned int comp = fe->system_to_component_index(shape_func).first + mc * n_components; if (quadrature_points_fastest) @@ -996,8 +1008,11 @@ FEValuesBase::get_function_gradients ( if (fe->is_primitive(shape_func)) { + const unsigned int + row = fe->is_primitive() ? + shape_func : this->shape_function_to_row_table[shape_func]; const Tensor<1,spacedim> *shape_gradient_ptr - = &this->shape_gradients[shape_func][0]; + = &this->shape_gradients[row][0]; const unsigned int comp = fe->system_to_component_index(shape_func).first; for (unsigned int point=0; point::get_function_gradients ( if (fe->is_primitive(shape_func)) { + const unsigned int + row = fe->is_primitive() ? + shape_func : this->shape_function_to_row_table[shape_func]; const Tensor<1,spacedim> *shape_gradient_ptr - = &this->shape_gradients[shape_func][0]; + = &this->shape_gradients[row][0]; const unsigned int comp = fe->system_to_component_index(shape_func).first + mc * n_components; @@ -1259,8 +1277,12 @@ get_function_hessians (const InputVector &fe_function, if (fe->is_primitive(shape_func)) { + const unsigned int + row = fe->is_primitive() ? + shape_func : this->shape_function_to_row_table[shape_func]; + const Tensor<2,spacedim> *shape_hessian_ptr - = &this->shape_hessians[shape_func][0]; + = &this->shape_hessians[row][0]; const unsigned int comp = fe->system_to_component_index(shape_func).first; if (quadrature_points_fastest) @@ -1366,8 +1388,12 @@ void FEValuesBase::get_function_hessians ( if (fe->is_primitive(shape_func)) { + const unsigned int + row = fe->is_primitive() ? + shape_func : this->shape_function_to_row_table[shape_func]; + const Tensor<2,spacedim> *shape_hessian_ptr - = &this->shape_hessians[shape_func][0]; + = &this->shape_hessians[row][0]; const unsigned int comp = fe->system_to_component_index(shape_func).first + mc * n_components;