]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify some code by default copy constructor 13017/head
authorMartin Kronbichler <martin.kronbichler@it.uu.se>
Mon, 6 Dec 2021 15:20:29 +0000 (16:20 +0100)
committerMartin Kronbichler <martin.kronbichler@it.uu.se>
Mon, 6 Dec 2021 18:41:02 +0000 (19:41 +0100)
include/deal.II/matrix_free/fe_evaluation_base_data.h

index bca502b46d28987a35d76db673a9f2d153ab2b48..ab1d057382322c930eba31cdcdfe2107c62fdf15 100644 (file)
@@ -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<dim, Number, VectorizedArrayType>> &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<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  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 <int dim, typename Number, bool is_face, typename VectorizedArrayType>
 inline FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType> &
 FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::operator=(

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.