From 735967138ae6d9d6683fca65d67eb0d78c82ced0 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 6 Dec 2021 16:20:29 +0100 Subject: [PATCH] Simplify some code by default copy constructor --- .../matrix_free/fe_evaluation_base_data.h | 63 ++++--------------- 1 file changed, 11 insertions(+), 52 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation_base_data.h b/include/deal.II/matrix_free/fe_evaluation_base_data.h index bca502b46d..ab1d057382 100644 --- a/include/deal.II/matrix_free/fe_evaluation_base_data.h +++ b/include/deal.II/matrix_free/fe_evaluation_base_data.h @@ -125,6 +125,17 @@ class FEEvaluationBaseData public: static constexpr unsigned int dimension = dim; + /** + * Copy constructor. + */ + FEEvaluationBaseData(const FEEvaluationBaseData &other) = default; + + /** + * Copy assignment operator. + */ + FEEvaluationBaseData & + operator=(const FEEvaluationBaseData &other); + /** * @name 1: Access to geometry data at quadrature points */ @@ -387,20 +398,6 @@ protected: internal::MatrixFreeFunctions:: MappingDataOnTheFly> &mapping_data); - /** - * Copy constructor. - */ - FEEvaluationBaseData(const FEEvaluationBaseData &other); - - /** - * Copy assignment operator. If FEEvaluationBase was constructed from a - * mapping, fe, quadrature, and update flags, the underlying geometry - * evaluation based on FEValues will be deep-copied in order to allow for - * using in parallel with threads. - */ - FEEvaluationBaseData & - operator=(const FEEvaluationBaseData &other); - /** * Sets the pointers for values, gradients, hessians to the central * scratch_data_array inside the given scratch array, for a given number of @@ -765,44 +762,6 @@ inline FEEvaluationBaseData:: -template -inline FEEvaluationBaseData:: - FEEvaluationBaseData(const FEEvaluationBaseData &other) - : data(other.data) - , dof_info(other.dof_info) - , mapping_data(other.mapping_data) - , quad_no(other.quad_no) - , active_fe_index(other.active_fe_index) - , active_quad_index(other.active_quad_index) - , descriptor(other.descriptor) - , n_quadrature_points(other.n_quadrature_points) - , jacobian(nullptr) - , J_value(nullptr) - , normal_vectors(nullptr) - , normal_x_jacobian(nullptr) - , quadrature_weights(other.quadrature_weights) - , dof_values_initialized(false) - , values_quad_initialized(false) - , gradients_quad_initialized(false) - , hessians_quad_initialized(false) - , values_quad_submitted(false) - , gradients_quad_submitted(false) - , cell(numbers::invalid_unsigned_int) - , is_interior_face(other.is_interior_face) - , dof_access_index( - is_face ? - (is_interior_face ? - internal::MatrixFreeFunctions::DoFInfo::dof_access_face_interior : - internal::MatrixFreeFunctions::DoFInfo::dof_access_face_exterior) : - internal::MatrixFreeFunctions::DoFInfo::dof_access_cell) - , face_no(0) - , face_orientation(0) - , subface_index(0) - , cell_type(internal::MatrixFreeFunctions::general) -{} - - - template inline FEEvaluationBaseData & FEEvaluationBaseData::operator=( -- 2.39.5