From: Martin Kronbichler Date: Sat, 28 Oct 2017 16:00:47 +0000 (+0200) Subject: Rename ShapeInfo::dofs_per_cell -> ShapeInfo::dofs_per_component_on_cell X-Git-Tag: v9.0.0-rc1~857^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4da6caaf9e27da852690ec4e8305bb4e585b15b7;p=dealii.git Rename ShapeInfo::dofs_per_cell -> ShapeInfo::dofs_per_component_on_cell --- diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index 2c890e8cde..f5bc0cd9e1 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -175,7 +175,7 @@ namespace internal { values_dofs = expanded_dof_values; for (unsigned int c=0; c(shape_info.fe_degree+1); const int degree = fe_degree != -1 ? fe_degree : shape_info.fe_degree; @@ -334,7 +334,7 @@ namespace internal if (type == MatrixFreeFunctions::tensor_symmetric_plus_dg0 && evaluate_values) for (unsigned int c=0; c(shape_info.fe_degree+1); } @@ -492,13 +492,13 @@ namespace internal if (integrate_values) for (unsigned int c=0; c(); + values_dofs[c][shape_info.dofs_per_component_on_cell-1] = VectorizedArray(); } if (type == MatrixFreeFunctions::truncated_tensor) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index f1121778ef..ca1eff12f4 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -1914,8 +1914,8 @@ public: static const unsigned int n_components = n_components_; static const unsigned int static_n_q_points = Utilities::fixed_int_power::value; static const unsigned int static_dofs_per_component = Utilities::fixed_int_power::value; - static const unsigned int tensor_dofs_per_cell = Utilities::fixed_int_power::value; - static const unsigned int static_dofs_per_cell = n_components * Utilities::fixed_int_power::value; + static const unsigned int tensor_dofs_per_cell = n_components *static_dofs_per_component; + static const unsigned int static_dofs_per_cell = n_components *static_dofs_per_component; /** * Constructor. Takes all data stored in MatrixFree. If applied to problems @@ -2147,7 +2147,7 @@ FEEvaluationBase ExcNotInitialized()); AssertDimension (matrix_info->get_size_info().vectorization_length, VectorizedArray::n_array_elements); - AssertDimension (data->dofs_per_cell*n_fe_components, + AssertDimension (data->dofs_per_component_on_cell*n_fe_components, dof_info->dofs_per_cell[active_fe_index]); AssertDimension (data->n_q_points, mapping_info->mapping_data_gen[quad_no].n_q_points[active_quad_index]); @@ -2394,7 +2394,7 @@ FEEvaluationBase const unsigned int tensor_dofs_per_component = Utilities::fixed_power(this->data->fe_degree+1); - const unsigned int dofs_per_component = this->data->dofs_per_cell; + const unsigned int dofs_per_component = this->data->dofs_per_component_on_cell; const unsigned int n_quadrature_points = this->data->n_q_points; const unsigned int shift = std::max(tensor_dofs_per_component+1, dofs_per_component)* @@ -3008,10 +3008,10 @@ FEEvaluationBase { Assert (!local_dof_indices.empty(), ExcNotInitialized()); - unsigned int index = first_selected_component * this->data->dofs_per_cell; + unsigned int index = first_selected_component * this->data->dofs_per_component_on_cell; for (unsigned int comp = 0; compdata->dofs_per_cell; ++i, ++index) + for (unsigned int i=0; idata->dofs_per_component_on_cell; ++i, ++index) { operation.process_dof_global(local_dof_indices[this->data->lexicographic_numbering[index]], *src[0], values_dofs[comp][i][0]); @@ -3036,7 +3036,7 @@ FEEvaluationBase const std::pair *indicators_end = dof_info->end_indicators(cell); unsigned int ind_local = 0; - const unsigned int dofs_per_component = this->data->dofs_per_cell; + const unsigned int dofs_per_component = this->data->dofs_per_component_on_cell; const unsigned int n_irreg_components_filled = dof_info->row_starts[cell][2]; const bool at_irregular_cell = n_irreg_components_filled > 0; @@ -3462,7 +3462,7 @@ FEEvaluationBase // iterates over the elements of index_local_to_global and dof_indices // points to the global indices stored in index_local_to_global const unsigned int *dof_indices = dof_info->begin_indices_plain(cell); - const unsigned int dofs_per_component = this->data->dofs_per_cell; + const unsigned int dofs_per_component = this->data->dofs_per_component_on_cell; const unsigned int n_irreg_components_filled = dof_info->row_starts[cell][2]; const bool at_irregular_cell = n_irreg_components_filled > 0; @@ -3705,7 +3705,7 @@ Tensor<1,n_components_,VectorizedArray > FEEvaluationBase ::get_dof_value (const unsigned int dof) const { - AssertIndexRange (dof, this->data->dofs_per_cell); + AssertIndexRange (dof, this->data->dofs_per_component_on_cell); Tensor<1,n_components_,VectorizedArray > return_value; for (unsigned int comp=0; compvalues_dofs[comp][dof]; @@ -4067,7 +4067,7 @@ FEEvaluationBase #ifdef DEBUG this->dof_values_initialized = true; #endif - AssertIndexRange (dof, this->data->dofs_per_cell); + AssertIndexRange (dof, this->data->dofs_per_component_on_cell); for (unsigned int comp=0; compvalues_dofs[comp][dof] = val_in[comp]; } @@ -4287,7 +4287,7 @@ VectorizedArray FEEvaluationAccess ::get_dof_value (const unsigned int dof) const { - AssertIndexRange (dof, this->data->dofs_per_cell); + AssertIndexRange (dof, this->data->dofs_per_component_on_cell); return this->values_dofs[0][dof]; } @@ -4389,7 +4389,7 @@ FEEvaluationAccess { #ifdef DEBUG this->dof_values_initialized = true; - AssertIndexRange (dof, this->data->dofs_per_cell); + AssertIndexRange (dof, this->data->dofs_per_component_on_cell); #endif this->values_dofs[0][dof] = val_in; } @@ -4910,7 +4910,7 @@ VectorizedArray FEEvaluationAccess<1,1,Number> ::get_dof_value (const unsigned int dof) const { - AssertIndexRange (dof, this->data->dofs_per_cell); + AssertIndexRange (dof, this->data->dofs_per_component_on_cell); return this->values_dofs[0][dof]; } @@ -5007,7 +5007,7 @@ FEEvaluationAccess<1,1,Number> { #ifdef DEBUG this->dof_values_initialized = true; - AssertIndexRange (dof, this->data->dofs_per_cell); + AssertIndexRange (dof, this->data->dofs_per_component_on_cell); #endif this->values_dofs[0][dof] = val_in; } @@ -5099,8 +5099,8 @@ FEEvaluation const unsigned int quad_no) : BaseClass (data_in, fe_no, quad_no, fe_degree, static_n_q_points), - dofs_per_component (this->data->dofs_per_cell), - dofs_per_cell (this->data->dofs_per_cell*n_components_), + dofs_per_component (this->data->dofs_per_component_on_cell), + dofs_per_cell (this->data->dofs_per_component_on_cell *n_components_), n_q_points (this->data->n_q_points) { check_template_arguments(fe_no, 0); @@ -5121,8 +5121,8 @@ FEEvaluation BaseClass (mapping, fe, quadrature, update_flags, first_selected_component, static_cast*>(nullptr)), - dofs_per_component (this->data->dofs_per_cell), - dofs_per_cell (this->data->dofs_per_cell*n_components_), + dofs_per_component (this->data->dofs_per_component_on_cell), + dofs_per_cell (this->data->dofs_per_component_on_cell *n_components_), n_q_points (this->data->n_q_points) { check_template_arguments(numbers::invalid_unsigned_int, 0); @@ -5142,8 +5142,8 @@ FEEvaluation BaseClass (StaticMappingQ1::mapping, fe, quadrature, update_flags, first_selected_component, static_cast*>(nullptr)), - dofs_per_component (this->data->dofs_per_cell), - dofs_per_cell (this->data->dofs_per_cell*n_components_), + dofs_per_component (this->data->dofs_per_component_on_cell), + dofs_per_cell (this->data->dofs_per_component_on_cell *n_components_), n_q_points (this->data->n_q_points) { check_template_arguments(numbers::invalid_unsigned_int, 0); @@ -5164,8 +5164,8 @@ FEEvaluation fe, other.mapped_geometry->get_quadrature(), other.mapped_geometry->get_fe_values().get_update_flags(), first_selected_component, &other), - dofs_per_component (this->data->dofs_per_cell), - dofs_per_cell (this->data->dofs_per_cell*n_components_), + dofs_per_component (this->data->dofs_per_component_on_cell), + dofs_per_cell (this->data->dofs_per_component_on_cell *n_components_), n_q_points (this->data->n_q_points) { check_template_arguments(numbers::invalid_unsigned_int, 0); @@ -5180,8 +5180,8 @@ FEEvaluation ::FEEvaluation (const FEEvaluation &other) : BaseClass (other), - dofs_per_component (this->data->dofs_per_cell), - dofs_per_cell (this->data->dofs_per_cell*n_components_), + dofs_per_component (this->data->dofs_per_component_on_cell), + dofs_per_cell (this->data->dofs_per_component_on_cell *n_components_), n_q_points (this->data->n_q_points) { check_template_arguments(numbers::invalid_unsigned_int, 0); @@ -5328,7 +5328,7 @@ FEEvaluation AssertDimension (n_q_points, this->mapping_info->mapping_data_gen[this->quad_no]. n_q_points[this->active_quad_index]); - AssertDimension (this->data->dofs_per_cell * this->n_fe_components, + AssertDimension (this->data->dofs_per_component_on_cell * this->n_fe_components, this->dof_info->dofs_per_cell[this->active_fe_index]); } #endif diff --git a/include/deal.II/matrix_free/shape_info.h b/include/deal.II/matrix_free/shape_info.h index acb90f0040..582617a8ac 100644 --- a/include/deal.II/matrix_free/shape_info.h +++ b/include/deal.II/matrix_free/shape_info.h @@ -237,9 +237,10 @@ namespace internal unsigned int n_q_points; /** - * Stores the number of DoFs per cell in @p dim dimensions. + * Stores the number of DoFs per cell of the scalar element in @p dim + * dimensions. */ - unsigned int dofs_per_cell; + unsigned int dofs_per_component_on_cell; /** * Stores the number of quadrature points per face in @p dim dimensions. @@ -249,7 +250,7 @@ namespace internal /** * Stores the number of DoFs per face in @p dim dimensions. */ - unsigned int dofs_per_face; + unsigned int dofs_per_component_on_face; /** * Indicates whether the basis functions are nodal in 0 and 1, i.e., the @@ -364,9 +365,9 @@ namespace internal fe_degree (0), n_q_points_1d (0), n_q_points (0), - dofs_per_cell (0), + dofs_per_component_on_cell (0), n_q_points_face (0), - dofs_per_face (0), + dofs_per_component_on_face (0), nodal_at_cell_boundaries (false) { reinit (quad, fe_in, base_element_number); diff --git a/include/deal.II/matrix_free/shape_info.templates.h b/include/deal.II/matrix_free/shape_info.templates.h index 489f51afdd..8260f8f869 100644 --- a/include/deal.II/matrix_free/shape_info.templates.h +++ b/include/deal.II/matrix_free/shape_info.templates.h @@ -62,9 +62,9 @@ namespace internal fe_degree (numbers::invalid_unsigned_int), n_q_points_1d(0), n_q_points (0), - dofs_per_cell (0), + dofs_per_component_on_cell (0), n_q_points_face (0), - dofs_per_face (0), + dofs_per_component_on_face (0), nodal_at_cell_boundaries (false) {} @@ -181,9 +181,9 @@ namespace internal } n_q_points = Utilities::fixed_power(n_q_points_1d); - dofs_per_cell = fe->dofs_per_cell; n_q_points_face = dim>1?Utilities::fixed_power(n_q_points_1d):1; - dofs_per_face = dim>1?Utilities::fixed_power(fe_degree+1):1; + dofs_per_component_on_cell = fe->dofs_per_cell; + dofs_per_component_on_face = dim>1?Utilities::fixed_power(fe_degree+1):1; const unsigned int array_size = n_dofs_1d*n_q_points_1d; this->shape_gradients.resize_fast (array_size); @@ -302,7 +302,7 @@ namespace internal if (nodal_at_cell_boundaries == true) { face_to_cell_index_nodal.reinit(GeometryInfo::faces_per_cell, - dofs_per_face); + dofs_per_component_on_face); for (unsigned int f=0; f::faces_per_cell; ++f) { const unsigned int direction = f/2; @@ -313,7 +313,7 @@ namespace internal const unsigned int offset = (f%2)*fe_degree*shift; if (direction == 0 || direction == dim-1) - for (unsigned int i=0; i::faces_per_cell, - 2*dofs_per_face); + 2*dofs_per_component_on_face); for (unsigned int f=0; f::faces_per_cell; ++f) { const unsigned int direction = f/2; @@ -346,7 +346,7 @@ namespace internal shift = -shift; if (direction == 0 || direction == dim-1) - for (unsigned int i=0; i::check_1d_shapes_symmetric(const unsigned int n_q_points_1d) { - if (dofs_per_cell == 0) + if (dofs_per_component_on_cell == 0) return false; const double zero_tol = @@ -476,7 +476,7 @@ namespace internal bool ShapeInfo::check_1d_shapes_collocation() { - if (dofs_per_cell != n_q_points) + if (dofs_per_component_on_cell != n_q_points) return false; const double zero_tol =