From: Peter Munch Date: Fri, 18 Dec 2020 11:12:05 +0000 (+0100) Subject: Simplify constructor of FEEvaluationBaseData X-Git-Tag: v9.3.0-rc1~746^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=291eabac628a326b9c2b2c4f785f69316ad0d81d;p=dealii.git Simplify constructor of FEEvaluationBaseData --- diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 2018a77a27..0f42479794 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -335,22 +335,6 @@ protected: */ const unsigned int quad_no; - /** - * The active fe index for this class for efficient indexing in the hp case. - */ - const unsigned int active_fe_index; - - /** - * The active quadrature index for this class for efficient indexing in the - * hp case. - */ - const unsigned int active_quad_index; - - /** - * The number of quadrature points in the current evaluation context. - */ - const unsigned int n_quadrature_points; - /** * A pointer to the underlying data. */ @@ -375,6 +359,22 @@ protected: Number, VectorizedArrayType> *mapping_data; + /** + * The active fe index for this class for efficient indexing in the hp case. + */ + const unsigned int active_fe_index; + + /** + * The active quadrature index for this class for efficient indexing in the + * hp case. + */ + const unsigned int active_quad_index; + + /** + * The number of quadrature points in the current evaluation context. + */ + const unsigned int n_quadrature_points; + /** * A pointer to the unit cell shape data, i.e., values, gradients and * Hessians in 1D at the quadrature points that constitute the tensor @@ -3316,6 +3316,13 @@ inline FEEvaluationBaseData:: const unsigned int active_quad_index_in) : scratch_data_array(data_in.acquire_scratch_data()) , quad_no(quad_no_in) + , matrix_info(&data_in) + , dof_info(&data_in.get_dof_info(dof_no)) + , mapping_data( + internal::MatrixFreeFunctions:: + MappingInfoCellsOrFaces::get( + data_in.get_mapping_info(), + quad_no)) , active_fe_index(fe_degree != numbers::invalid_unsigned_int ? data_in.get_dof_info(dof_no).fe_index_from_degree( first_selected_component, @@ -3325,50 +3332,12 @@ inline FEEvaluationBaseData:: 0)) , active_quad_index( fe_degree != numbers::invalid_unsigned_int ? - (is_face ? data_in.get_mapping_info() - .face_data[quad_no_in] - .quad_index_from_n_q_points(n_q_points) : - data_in.get_mapping_info() - .cell_data[quad_no_in] - .quad_index_from_n_q_points(n_q_points)) : + (mapping_data->quad_index_from_n_q_points(n_q_points)) : (active_quad_index_in != numbers::invalid_unsigned_int ? active_quad_index_in : std::min(active_fe_index, - (is_face ? data_in.get_mapping_info() - .face_data[quad_no_in] - .descriptor.size() : - data_in.get_mapping_info() - .cell_data[quad_no_in] - .descriptor.size()) - - 1))) - , n_quadrature_points( - fe_degree != numbers::invalid_unsigned_int ? - n_q_points : - (is_face ? data_in - .get_shape_info( - dof_no, - quad_no_in, - data_in.get_dof_info(dof_no) - .component_to_base_index[first_selected_component], - active_fe_index, - active_quad_index) - .n_q_points_face : - data_in - .get_shape_info( - dof_no, - quad_no_in, - data_in.get_dof_info(dof_no) - .component_to_base_index[first_selected_component], - active_fe_index, - active_quad_index) - .n_q_points)) - , matrix_info(&data_in) - , dof_info(&data_in.get_dof_info(dof_no)) - , mapping_data( - internal::MatrixFreeFunctions:: - MappingInfoCellsOrFaces::get( - data_in.get_mapping_info(), - quad_no)) + mapping_data->descriptor.size() - 1))) + , n_quadrature_points(mapping_data->descriptor[active_quad_index].n_q_points) , data(&data_in.get_shape_info( dof_no, quad_no_in,