]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add ifdefs for is_reinitialized in FEEval 13274/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 20 Jan 2022 21:13:19 +0000 (22:13 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Thu, 20 Jan 2022 21:13:19 +0000 (22:13 +0100)
include/deal.II/matrix_free/fe_evaluation.h
include/deal.II/matrix_free/fe_evaluation_data.h

index 6d9b4290a7e4c4c4e763ca388fddf4e17d1f1222..1e2c7760a275399395dfff63e1f363e4acc2ab62 100644 (file)
@@ -4987,7 +4987,9 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
   submit_value(const Tensor<1, n_components_, VectorizedArrayType> val_in,
                const unsigned int                                  q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
   Assert(this->J_value != nullptr,
          internal::ExcMatrixFreeAccessToUninitializedMappingField(
@@ -5025,7 +5027,9 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
     const Tensor<1, n_components_, Tensor<1, dim, VectorizedArrayType>> grad_in,
     const unsigned int                                                  q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
   Assert(this->J_value != nullptr,
          internal::ExcMatrixFreeAccessToUninitializedMappingField(
@@ -5137,7 +5141,9 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
                        hessian_in,
     const unsigned int q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
   Assert(this->J_value != nullptr,
          internal::ExcMatrixFreeAccessToUninitializedMappingField(
@@ -5285,8 +5291,8 @@ inline Tensor<1, n_components_, VectorizedArrayType>
 FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
   integrate_value() const
 {
-  Assert(this->is_reinitialized, ExcNotInitialized());
 #  ifdef DEBUG
+  Assert(this->is_reinitialized, ExcNotInitialized());
   Assert(this->values_quad_submitted == true,
          internal::ExcAccessToUninitializedField());
 #  endif
@@ -5622,7 +5628,9 @@ FEEvaluationAccess<dim, 1, Number, is_face, VectorizedArrayType>::submit_value(
   const VectorizedArrayType val_in,
   const unsigned int        q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
   Assert(this->J_value != nullptr,
          internal::ExcMatrixFreeAccessToUninitializedMappingField(
@@ -5675,7 +5683,9 @@ FEEvaluationAccess<dim, 1, Number, is_face, VectorizedArrayType>::
   submit_gradient(const Tensor<1, dim, VectorizedArrayType> grad_in,
                   const unsigned int                        q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
   Assert(this->J_value != nullptr,
          internal::ExcMatrixFreeAccessToUninitializedMappingField(
@@ -5992,7 +6002,9 @@ FEEvaluationAccess<dim, dim, Number, is_face, VectorizedArrayType>::
   submit_divergence(const VectorizedArrayType div_in,
                     const unsigned int        q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
   Assert(this->J_value != nullptr,
          internal::ExcMatrixFreeAccessToUninitializedMappingField(
@@ -6054,7 +6066,9 @@ FEEvaluationAccess<dim, dim, Number, is_face, VectorizedArrayType>::
   // could have used base class operator, but that involves some overhead
   // which is inefficient. it is nice to have the symmetric tensor because
   // that saves some operations
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
   Assert(this->J_value != nullptr,
          internal::ExcMatrixFreeAccessToUninitializedMappingField(
@@ -6348,7 +6362,9 @@ FEEvaluationAccess<1, 1, Number, is_face, VectorizedArrayType>::submit_value(
   const VectorizedArrayType val_in,
   const unsigned int        q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
 #  ifdef DEBUG
   this->values_quad_submitted = true;
@@ -6397,7 +6413,9 @@ FEEvaluationAccess<1, 1, Number, is_face, VectorizedArrayType>::submit_gradient(
   const VectorizedArrayType grad_in,
   const unsigned int        q_point)
 {
+#  ifdef DEBUG
   Assert(this->is_reinitialized, ExcNotInitialized());
+#  endif
   AssertIndexRange(q_point, this->n_quadrature_points);
 #  ifdef DEBUG
   this->gradients_quad_submitted = true;
index b645f2edbb168281af8fa543051260f4bbdafd74..7de101a44ff575dc47360e85162b83cb9ed6124f 100644 (file)
@@ -478,8 +478,10 @@ public:
   const std::array<unsigned int, n_lanes> &
   get_cell_ids() const
   {
-    // implemented inline to avoid compilation problems on Windows
+// implemented inline to avoid compilation problems on Windows
+#ifdef DEBUG
     Assert(is_reinitialized, ExcNotInitialized());
+#endif
     return cell_ids;
   }
 
@@ -490,8 +492,11 @@ public:
   unsigned int
   get_cell_or_face_batch_id() const
   {
-    // implemented inline to avoid compilation problems on Windows
+// implemented inline to avoid compilation problems on Windows
+#ifdef DEBUG
     Assert(is_reinitialized, ExcNotInitialized());
+#endif
+
     return cell;
   }
 
@@ -502,8 +507,11 @@ public:
   const std::array<unsigned int, n_lanes> &
   get_cell_or_face_ids() const
   {
-    // implemented inline to avoid compilation problems on Windows
+// implemented inline to avoid compilation problems on Windows
+#ifdef DEBUG
     Assert(is_reinitialized, ExcNotInitialized());
+#endif
+
     if (!is_face || dof_access_index ==
                       internal::MatrixFreeFunctions::DoFInfo::dof_access_cell)
       return cell_ids;
@@ -1318,7 +1326,9 @@ template <int dim, typename Number, bool is_face>
 inline internal::MatrixFreeFunctions::GeometryType
 FEEvaluationData<dim, Number, is_face>::get_cell_type() const
 {
+#  ifdef DEBUG
   Assert(is_reinitialized, ExcNotInitialized());
+#  endif
   return cell_type;
 }
 

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.