]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid implicit bool conversions
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 20 May 2021 18:19:19 +0000 (14:19 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 4 Jan 2022 17:56:29 +0000 (12:56 -0500)
70 files changed:
include/deal.II/base/geometry_info.h
include/deal.II/base/mpi_consensus_algorithms.templates.h
include/deal.II/base/patterns.h
include/deal.II/base/utilities.h
include/deal.II/fe/fe_poly.h
include/deal.II/fe/fe_poly.templates.h
include/deal.II/fe/fe_poly_face.templates.h
include/deal.II/fe/fe_poly_tensor.h
include/deal.II/grid/reference_cell.h
include/deal.II/grid/tria_accessor.templates.h
include/deal.II/lac/affine_constraints.h
include/deal.II/lac/chunk_sparse_matrix.templates.h
include/deal.II/lac/dynamic_sparsity_pattern.h
include/deal.II/lac/full_matrix.templates.h
include/deal.II/lac/la_parallel_block_vector.templates.h
include/deal.II/lac/sparse_decomposition.templates.h
include/deal.II/lac/sparse_matrix.templates.h
include/deal.II/lac/sparse_matrix_ez.templates.h
include/deal.II/matrix_free/evaluation_kernels.h
include/deal.II/matrix_free/fe_evaluation.h
include/deal.II/matrix_free/fe_point_evaluation.h
include/deal.II/matrix_free/mapping_data_on_the_fly.h
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/meshworker/integration_info.h
include/deal.II/meshworker/integration_info.templates.h
source/base/convergence_table.cc
source/base/data_out_base.cc
source/base/exceptions.cc
source/base/index_set.cc
source/base/logstream.cc
source/base/mpi.cc
source/base/mu_parser_internal.cc
source/base/parameter_handler.cc
source/base/patterns.cc
source/base/qprojector.cc
source/base/table_handler.cc
source/base/utilities.cc
source/distributed/fully_distributed_tria.cc
source/distributed/tria.cc
source/fe/fe.cc
source/fe/fe_dgp_nonparametric.cc
source/fe/fe_enriched.cc
source/fe/fe_face.cc
source/fe/fe_nedelec_sz.cc
source/fe/fe_p1nc.cc
source/fe/fe_poly_tensor.cc
source/fe/fe_q_hierarchical.cc
source/fe/fe_system.cc
source/fe/fe_values.cc
source/fe/mapping_cartesian.cc
source/fe/mapping_fe.cc
source/fe/mapping_fe_field.cc
source/fe/mapping_manifold.cc
source/fe/mapping_q.cc
source/grid/grid_generator.cc
source/grid/grid_in.cc
source/grid/grid_out.cc
source/grid/grid_tools_cache.cc
source/grid/tria.cc
source/grid/tria_accessor.cc
source/lac/dynamic_sparsity_pattern.cc
source/lac/lapack_full_matrix.cc
source/lac/sparsity_tools.cc
source/lac/trilinos_precondition_ml.cc
source/lac/trilinos_precondition_muelu.cc
source/matrix_free/task_info.cc
source/numerics/data_out.cc
source/numerics/data_out_faces.cc
source/numerics/data_out_rotation.cc
source/numerics/solution_transfer.cc

index 7d249ae37ab82fc0edda74868f70622f970eab79..fe4da3a3bee7c412ab1127c713ffef6f796cca07 100644 (file)
@@ -3827,7 +3827,7 @@ GeometryInfo<3>::line_refinement_case(
   const unsigned int direction[lines_per_cell] = {
     1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 2};
 
-  return ((cell_refinement_case & cut_one[direction[line_no]]) ?
+  return ((cell_refinement_case & cut_one[direction[line_no]]) != 0u ?
             RefinementCase<1>::cut_x :
             RefinementCase<1>::no_refinement);
 }
@@ -3879,8 +3879,8 @@ GeometryInfo<2>::min_cell_refinement_case_for_face_refinement(
   AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
 
   if (face_refinement_case == RefinementCase<dim>::cut_x)
-    return (face_no / 2) ? RefinementCase<dim>::cut_x :
-                           RefinementCase<dim>::cut_y;
+    return (face_no / 2) != 0u ? RefinementCase<dim>::cut_x :
+                                 RefinementCase<dim>::cut_y;
   else
     return RefinementCase<dim>::no_refinement;
 }
@@ -3975,7 +3975,8 @@ GeometryInfo<2>::min_cell_refinement_case_for_line_refinement(
   (void)dim;
   AssertIndexRange(line_no, GeometryInfo<dim>::lines_per_cell);
 
-  return (line_no / 2) ? RefinementCase<2>::cut_x : RefinementCase<2>::cut_y;
+  return (line_no / 2) != 0u ? RefinementCase<2>::cut_x :
+                               RefinementCase<2>::cut_y;
 }
 
 
index ac325d5c4aed5f6901a167d7e2da02373e21b990..b35bf3869bac8b1aab9c94fb636513684b9f9529 100644 (file)
@@ -156,7 +156,7 @@ namespace Utilities
                                       MPI_STATUSES_IGNORE);
         AssertThrowMPI(ierr);
 
-        return all_receive_requests_are_done;
+        return all_receive_requests_are_done != 0;
 #else
         return true;
 #endif
@@ -193,7 +193,7 @@ namespace Utilities
                                    &all_ranks_reached_barrier,
                                    MPI_STATUSES_IGNORE);
         AssertThrowMPI(ierr);
-        return all_ranks_reached_barrier;
+        return all_ranks_reached_barrier != 0;
 #else
         return true;
 #endif
@@ -228,7 +228,7 @@ namespace Utilities
                                      &status);
         AssertThrowMPI(ierr);
 
-        if (request_is_pending)
+        if (request_is_pending != 0)
           {
             // Get the rank of the requesting process and add it to the
             // list of requesting processes (which may contain duplicates).
index c0894c980e5d92083d7717e6b30bec63b4047b5a..b75b70bca9cc5223b3772d9d72dfaa7c098decc6 100644 (file)
@@ -2262,7 +2262,8 @@ namespace Patterns
         const auto  string_array = Convert<T>::to_string_internal_2(t, *p);
         std::string str;
         for (unsigned int i = 0; i < string_array.size(); ++i)
-          str += (i ? " " + p->get_separator() + " " : "") + string_array[i];
+          str +=
+            (i != 0u ? " " + p->get_separator() + " " : "") + string_array[i];
         AssertThrow(p->match(str), ExcNoMatch(str, p->description()));
         return str;
       }
index 255b70095985eb0ad941f6f8ae5de35eab88730a..09699322f7aed87e37385adb10fb41fec2277423 100644 (file)
@@ -1385,7 +1385,7 @@ namespace Utilities
     // source:
     // https://stackoverflow.com/questions/47981/how-do-you-set-clear-and-toggle-a-single-bit
     // "Checking a bit"
-    return (number >> n) & 1U;
+    return ((number >> n) & 1U) != 0u;
   }
 
 
index ae682b12e363e0fbc05e52e44fd718f66014b273..b350e6875446cf0ca564f4427e24dd2f4fc728eb 100644 (file)
@@ -281,13 +281,14 @@ protected:
     // polynomial to put the values and derivatives of shape functions
     // to put there, depending on what the user requested
     std::vector<double> values(
-      update_flags & update_values ? this->n_dofs_per_cell() : 0);
+      (update_flags & update_values) != 0u ? this->n_dofs_per_cell() : 0);
     std::vector<Tensor<1, dim>> grads(
-      update_flags & update_gradients ? this->n_dofs_per_cell() : 0);
+      (update_flags & update_gradients) != 0u ? this->n_dofs_per_cell() : 0);
     std::vector<Tensor<2, dim>> grad_grads(
-      update_flags & update_hessians ? this->n_dofs_per_cell() : 0);
+      (update_flags & update_hessians) != 0u ? this->n_dofs_per_cell() : 0);
     std::vector<Tensor<3, dim>> third_derivatives(
-      update_flags & update_3rd_derivatives ? this->n_dofs_per_cell() : 0);
+      (update_flags & update_3rd_derivatives) != 0u ? this->n_dofs_per_cell() :
+                                                      0);
     std::vector<Tensor<4, dim>>
       fourth_derivatives; // won't be needed, so leave empty
 
@@ -312,20 +313,20 @@ protected:
           (output_data.shape_values.n_cols() == n_q_points)))
       data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
 
-    if (update_flags & update_gradients)
+    if ((update_flags & update_gradients) != 0u)
       data.shape_gradients.reinit(this->n_dofs_per_cell(), n_q_points);
 
-    if (update_flags & update_hessians)
+    if ((update_flags & update_hessians) != 0u)
       data.shape_hessians.reinit(this->n_dofs_per_cell(), n_q_points);
 
-    if (update_flags & update_3rd_derivatives)
+    if ((update_flags & update_3rd_derivatives) != 0u)
       data.shape_3rd_derivatives.reinit(this->n_dofs_per_cell(), n_q_points);
 
     // next already fill those fields of which we have information by
     // now. note that the shape gradients are only those on the unit
     // cell, and need to be transformed when visiting an actual cell
-    if (update_flags & (update_values | update_gradients | update_hessians |
-                        update_3rd_derivatives))
+    if ((update_flags & (update_values | update_gradients | update_hessians |
+                         update_3rd_derivatives)) != 0u)
       for (unsigned int i = 0; i < n_q_points; ++i)
         {
           poly_space->evaluate(quadrature.point(i),
@@ -342,7 +343,7 @@ protected:
           // faces and subfaces, but we later on copy only a portion of it
           // into the output object; in that case, copy the data from all
           // faces into the scratch object
-          if (update_flags & update_values)
+          if ((update_flags & update_values) != 0u)
             if (output_data.shape_values.n_rows() > 0)
               {
                 if (output_data.shape_values.n_cols() == n_q_points)
@@ -356,15 +357,15 @@ protected:
           // for everything else, derivatives need to be transformed,
           // so we write them into our scratch space and only later
           // copy stuff into where FEValues wants it
-          if (update_flags & update_gradients)
+          if ((update_flags & update_gradients) != 0u)
             for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
               data.shape_gradients[k][i] = grads[k];
 
-          if (update_flags & update_hessians)
+          if ((update_flags & update_hessians) != 0u)
             for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
               data.shape_hessians[k][i] = grad_grads[k];
 
-          if (update_flags & update_3rd_derivatives)
+          if ((update_flags & update_3rd_derivatives) != 0u)
             for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
               data.shape_3rd_derivatives[k][i] = third_derivatives[k];
         }
index 90623fef91ea95f0ba9306533c2133077b4783b2..b4792440c395ccb7b7837e837bb53a5afa2528fa 100644 (file)
@@ -193,19 +193,19 @@ FE_Poly<dim, spacedim>::requires_update_flags(const UpdateFlags flags) const
 {
   UpdateFlags out = update_default;
 
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     out |= update_values;
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     out |= update_gradients | update_covariant_transformation;
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     out |= update_hessians | update_covariant_transformation |
            update_gradients | update_jacobian_pushed_forward_grads;
-  if (flags & update_3rd_derivatives)
+  if ((flags & update_3rd_derivatives) != 0u)
     out |= update_3rd_derivatives | update_covariant_transformation |
            update_hessians | update_gradients |
            update_jacobian_pushed_forward_grads |
            update_jacobian_pushed_forward_2nd_derivatives;
-  if (flags & update_normal_vectors)
+  if ((flags & update_normal_vectors) != 0u)
     out |= update_normal_vectors | update_JxW_values;
 
   return out;
@@ -293,7 +293,7 @@ FE_Poly<dim, spacedim>::fill_fe_values(
   // transform gradients and higher derivatives. there is nothing to do
   // for values since we already emplaced them into output_data when
   // we were in get_data()
-  if ((flags & update_gradients) &&
+  if (((flags & update_gradients) != 0u) &&
       (cell_similarity != CellSimilarity::translation))
     for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       mapping.transform(make_array_view(fe_data.shape_gradients, k),
@@ -301,7 +301,7 @@ FE_Poly<dim, spacedim>::fill_fe_values(
                         mapping_internal,
                         make_array_view(output_data.shape_gradients, k));
 
-  if ((flags & update_hessians) &&
+  if (((flags & update_hessians) != 0u) &&
       (cell_similarity != CellSimilarity::translation))
     {
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
@@ -314,7 +314,7 @@ FE_Poly<dim, spacedim>::fill_fe_values(
         correct_hessians(output_data, mapping_data, quadrature.size());
     }
 
-  if ((flags & update_3rd_derivatives) &&
+  if (((flags & update_3rd_derivatives) != 0u) &&
       (cell_similarity != CellSimilarity::translation))
     {
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
@@ -381,12 +381,12 @@ FE_Poly<dim, spacedim>::fill_fe_face_values(
   // transform gradients and higher derivatives. we also have to copy
   // the values (unlike in the case of fill_fe_values()) since
   // we need to take into account the offsets
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       for (unsigned int i = 0; i < n_q_points; ++i)
         output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
 
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       mapping.transform(
         make_array_view(fe_data.shape_gradients, k, offset, n_q_points),
@@ -394,7 +394,7 @@ FE_Poly<dim, spacedim>::fill_fe_face_values(
         mapping_internal,
         make_array_view(output_data.shape_gradients, k));
 
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     {
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(
@@ -407,7 +407,7 @@ FE_Poly<dim, spacedim>::fill_fe_face_values(
         correct_hessians(output_data, mapping_data, n_q_points);
     }
 
-  if (flags & update_3rd_derivatives)
+  if ((flags & update_3rd_derivatives) != 0u)
     {
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(
@@ -473,12 +473,12 @@ FE_Poly<dim, spacedim>::fill_fe_subface_values(
   // transform gradients and higher derivatives. we also have to copy
   // the values (unlike in the case of fill_fe_values()) since
   // we need to take into account the offsets
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       for (unsigned int i = 0; i < quadrature.size(); ++i)
         output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
 
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       mapping.transform(
         make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()),
@@ -486,7 +486,7 @@ FE_Poly<dim, spacedim>::fill_fe_subface_values(
         mapping_internal,
         make_array_view(output_data.shape_gradients, k));
 
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     {
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(
@@ -499,7 +499,7 @@ FE_Poly<dim, spacedim>::fill_fe_subface_values(
         correct_hessians(output_data, mapping_data, quadrature.size());
     }
 
-  if (flags & update_3rd_derivatives)
+  if ((flags & update_3rd_derivatives) != 0u)
     {
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(make_array_view(fe_data.shape_3rd_derivatives,
index 35b862ca85b639168937c6d640d01a322dc6ac11..641f91c2dc3b4ea589dd375367c040f1175eb140 100644 (file)
@@ -62,11 +62,11 @@ FE_PolyFace<PolynomialType, dim, spacedim>::requires_update_flags(
   const UpdateFlags flags) const
 {
   UpdateFlags out = flags & update_values;
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     out |= update_gradients | update_covariant_transformation;
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     out |= update_hessians | update_covariant_transformation;
-  if (flags & update_normal_vectors)
+  if ((flags & update_normal_vectors) != 0u)
     out |= update_normal_vectors | update_JxW_values;
 
   return out;
index 002f1fbfa484066558b1ad27691f998feaab04b9..307fdeacacbc2ec3d47b3ddac82b681f612c1b3a 100644 (file)
@@ -301,7 +301,8 @@ protected:
     std::vector<Tensor<4, dim>> third_derivatives(0);
     std::vector<Tensor<5, dim>> fourth_derivatives(0);
 
-    if (update_flags & (update_values | update_gradients | update_hessians))
+    if ((update_flags & (update_values | update_gradients | update_hessians)) !=
+        0u)
       data.dof_sign_change.resize(this->dofs_per_cell);
 
     // initialize fields only if really
@@ -324,7 +325,7 @@ protected:
     const bool update_transformed_shape_hessian_tensors =
       update_transformed_shape_values;
 
-    if (update_flags & update_values)
+    if ((update_flags & update_values) != 0u)
       {
         values.resize(this->n_dofs_per_cell());
         data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
@@ -332,7 +333,7 @@ protected:
           data.transformed_shape_values.resize(n_q_points);
       }
 
-    if (update_flags & update_gradients)
+    if ((update_flags & update_gradients) != 0u)
       {
         grads.resize(this->n_dofs_per_cell());
         data.shape_grads.reinit(this->n_dofs_per_cell(), n_q_points);
@@ -342,7 +343,7 @@ protected:
           data.untransformed_shape_grads.resize(n_q_points);
       }
 
-    if (update_flags & update_hessians)
+    if ((update_flags & update_hessians) != 0u)
       {
         grad_grads.resize(this->n_dofs_per_cell());
         data.shape_grad_grads.reinit(this->n_dofs_per_cell(), n_q_points);
@@ -358,7 +359,7 @@ protected:
     // node values N_i holds
     // N_i(v_j)=\delta_ij for all basis
     // functions v_j
-    if (update_flags & (update_values | update_gradients))
+    if ((update_flags & (update_values | update_gradients)) != 0u)
       for (unsigned int k = 0; k < n_q_points; ++k)
         {
           poly_space->evaluate(quadrature.point(k),
@@ -368,7 +369,7 @@ protected:
                                third_derivatives,
                                fourth_derivatives);
 
-          if (update_flags & update_values)
+          if ((update_flags & update_values) != 0u)
             {
               if (inverse_node_matrix.n_cols() == 0)
                 for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
@@ -383,7 +384,7 @@ protected:
                   }
             }
 
-          if (update_flags & update_gradients)
+          if ((update_flags & update_gradients) != 0u)
             {
               if (inverse_node_matrix.n_cols() == 0)
                 for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
@@ -398,7 +399,7 @@ protected:
                   }
             }
 
-          if (update_flags & update_hessians)
+          if ((update_flags & update_hessians) != 0u)
             {
               if (inverse_node_matrix.n_cols() == 0)
                 for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
index ee0a8add3e5199e94405d507bf5ebedc8771dade..bdcb4fb6b355997a96bdd20549f24f8a55d81ed3 100644 (file)
@@ -1366,7 +1366,7 @@ ReferenceCell::face_to_cell_vertices(const unsigned int  face,
       static const ndarray<unsigned int, 3, 2> table = {
         {{{0, 1}}, {{1, 2}}, {{2, 0}}}};
 
-      return table[face][face_orientation ? vertex : (1 - vertex)];
+      return table[face][face_orientation != 0u ? vertex : (1 - vertex)];
     }
   else if (*this == ReferenceCells::Quadrilateral)
     {
@@ -1451,7 +1451,8 @@ ReferenceCell::standard_to_real_face_vertex(
   else if (*this == ReferenceCells::Quadrilateral)
     {
       return GeometryInfo<2>::standard_to_real_line_vertex(vertex,
-                                                           face_orientation);
+                                                           face_orientation !=
+                                                             0u);
     }
   else if (*this == ReferenceCells::Tetrahedron)
     {
index 70ad55af027e2d7701477dadac4f54f398cfa391..7a11b7c35382636b41a480502776aa62b191684f 100644 (file)
@@ -845,7 +845,9 @@ namespace internal
         return accessor.reference_cell().standard_vs_true_line_orientation(
           pair[1],
           face_orientation_raw(accessor, quad_index),
-          accessor.quad(quad_index)->line_orientation(line_within_face_index));
+          static_cast<unsigned char>(
+            accessor.quad(quad_index)
+              ->line_orientation(line_within_face_index)));
       }
 
 
index cc981012022339fbac90187c005321f908f80044..fd182c15bc35530f75cb3e60c47b90e4d51ea357 100644 (file)
@@ -2226,7 +2226,7 @@ inline types::global_dof_index
 AffineConstraints<number>::calculate_line_index(const size_type line_n) const
 {
   // IndexSet is unused (serial case)
-  if (!local_lines.size())
+  if (local_lines.size() == 0)
     return line_n;
 
   Assert(local_lines.is_element(line_n), ExcRowNotStoredHere(line_n));
@@ -2238,7 +2238,7 @@ template <typename number>
 inline bool
 AffineConstraints<number>::can_store_line(size_type line_n) const
 {
-  return !local_lines.size() || local_lines.is_element(line_n);
+  return local_lines.size() == 0 || local_lines.is_element(line_n);
 }
 
 template <typename number>
index 184a28d194dd48e6a6162a541ec05adee5931fee..82c175867db69b10a6877f5803581d4c469e0f64 100644 (file)
@@ -1490,13 +1490,13 @@ ChunkSparseMatrix<number>::print_formatted(std::ostream &     out,
   if (scientific)
     {
       out.setf(std::ios::scientific, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 7;
     }
   else
     {
       out.setf(std::ios::fixed, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 2;
     }
 
index 8fe7a38671aea94b28369ecafbe6fdcde887d829..a6a2a8fdcf7ca16d0bbdad6ca456c4483b81ec7d 100644 (file)
@@ -1093,7 +1093,7 @@ DynamicSparsityPattern::column_number(const size_type row,
   Assert(rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
 
   const size_type local_row =
-    rowset.size() ? rowset.index_within_set(row) : row;
+    rowset.size() != 0u ? rowset.index_within_set(row) : row;
   AssertIndexRange(index, lines[local_row].entries.size());
   return lines[local_row].entries[index];
 }
index de60920244c070a10158f094e75e85b974ecf138..eb6c714b4d11d4132467f5c889e91a50f1f79675 100644 (file)
@@ -1769,13 +1769,13 @@ FullMatrix<number>::print_formatted(std::ostream &     out,
   if (scientific)
     {
       out.setf(std::ios::scientific, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 7;
     }
   else
     {
       out.setf(std::ios::fixed, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 2;
     }
 
index 805e2c07e2306612a73d2c5518d268458ad26182..8a8674f83db0940d2b533a959bc4a2919c4a2381 100644 (file)
@@ -635,7 +635,7 @@ namespace LinearAlgebra
         return -Utilities::MPI::max(
           local_result, this->block(0).partitioner->get_mpi_communicator());
       else
-        return local_result;
+        return local_result != 0;
     }
 
 
index 4627481cd41397e3b2221c73f7dedecff991880b..1736aea64ef265c5c7cf36d05cc24265e2d74d96 100644 (file)
@@ -59,7 +59,7 @@ SparseLUDecomposition<number>::clear()
 
   SparseMatrix<number>::clear();
 
-  if (own_sparsity)
+  if (own_sparsity != nullptr)
     {
       delete own_sparsity;
       own_sparsity = nullptr;
index 458b527632d83773c22173c7ed818a7d1b36fc3c..9e62e33f9c2d2132bb3e1b17d3d16dbf96ffb09c 100644 (file)
@@ -1916,13 +1916,13 @@ SparseMatrix<number>::print_formatted(std::ostream &     out,
   if (scientific)
     {
       out.setf(std::ios::scientific, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 7;
     }
   else
     {
       out.setf(std::ios::fixed, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 2;
     }
 
index 3d39a3b5823fad2d4fc0782e359f8e7ec96d02bf..61d50b2a1b83b84b3e5b1da4472040b6641e4424 100644 (file)
@@ -499,13 +499,13 @@ SparseMatrixEZ<number>::print_formatted(std::ostream &     out,
   if (scientific)
     {
       out.setf(std::ios::scientific, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 7;
     }
   else
     {
       out.setf(std::ios::fixed, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 2;
     }
 
index a2aed71703404e8d1da335bc1241bc8bfa613d0d..aee881a3224e4d0139ba925f9b9e982ada0f3015 100644 (file)
@@ -279,12 +279,12 @@ namespace internal
         case 1:
           for (unsigned int c = 0; c < n_components; ++c)
             {
-              if (evaluation_flag & EvaluationFlags::values)
+              if ((evaluation_flag & EvaluationFlags::values) != 0u)
                 eval0.template values<0, true, false>(values_dofs, values_quad);
-              if (evaluation_flag & EvaluationFlags::gradients)
+              if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
                 eval0.template gradients<0, true, false>(values_dofs,
                                                          gradients_quad);
-              if (evaluation_flag & EvaluationFlags::hessians)
+              if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
                 eval0.template hessians<0, true, false>(values_dofs,
                                                         hessians_quad);
 
@@ -300,15 +300,15 @@ namespace internal
           for (unsigned int c = 0; c < n_components; ++c)
             {
               // grad x
-              if (evaluation_flag & EvaluationFlags::gradients)
+              if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
                 {
                   eval0.template gradients<0, true, false>(values_dofs, temp1);
                   eval1.template values<1, true, false>(temp1, gradients_quad);
                 }
-              if (evaluation_flag & EvaluationFlags::hessians)
+              if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
                 {
                   // grad xy
-                  if (!(evaluation_flag & EvaluationFlags::gradients))
+                  if ((evaluation_flag & EvaluationFlags::gradients) == 0u)
                     eval0.template gradients<0, true, false>(values_dofs,
                                                              temp1);
                   eval1.template gradients<1, true, false>(temp1,
@@ -322,19 +322,19 @@ namespace internal
 
               // grad y
               eval0.template values<0, true, false>(values_dofs, temp1);
-              if (evaluation_flag & EvaluationFlags::gradients)
+              if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
                 eval1.template gradients<1, true, false>(temp1,
                                                          gradients_quad +
                                                            n_q_points);
 
               // grad yy
-              if (evaluation_flag & EvaluationFlags::hessians)
+              if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
                 eval1.template hessians<1, true, false>(temp1,
                                                         hessians_quad +
                                                           n_q_points);
 
               // val: can use values applied in x
-              if (evaluation_flag & EvaluationFlags::values)
+              if ((evaluation_flag & EvaluationFlags::values) != 0u)
                 eval1.template values<1, true, false>(temp1, values_quad);
 
               // advance to the next component in 1D array
@@ -348,7 +348,7 @@ namespace internal
         case 3:
           for (unsigned int c = 0; c < n_components; ++c)
             {
-              if (evaluation_flag & EvaluationFlags::gradients)
+              if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
                 {
                   // grad x
                   eval0.template gradients<0, true, false>(values_dofs, temp1);
@@ -356,10 +356,10 @@ namespace internal
                   eval2.template values<2, true, false>(temp2, gradients_quad);
                 }
 
-              if (evaluation_flag & EvaluationFlags::hessians)
+              if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
                 {
                   // grad xz
-                  if (!(evaluation_flag & EvaluationFlags::gradients))
+                  if ((evaluation_flag & EvaluationFlags::gradients) == 0u)
                     {
                       eval0.template gradients<0, true, false>(values_dofs,
                                                                temp1);
@@ -383,7 +383,7 @@ namespace internal
 
               // grad y
               eval0.template values<0, true, false>(values_dofs, temp1);
-              if (evaluation_flag & EvaluationFlags::gradients)
+              if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
                 {
                   eval1.template gradients<1, true, false>(temp1, temp2);
                   eval2.template values<2, true, false>(temp2,
@@ -391,10 +391,10 @@ namespace internal
                                                           n_q_points);
                 }
 
-              if (evaluation_flag & EvaluationFlags::hessians)
+              if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
                 {
                   // grad yz
-                  if (!(evaluation_flag & EvaluationFlags::gradients))
+                  if ((evaluation_flag & EvaluationFlags::gradients) == 0u)
                     eval1.template gradients<1, true, false>(temp1, temp2);
                   eval2.template gradients<2, true, false>(temp2,
                                                            hessians_quad +
@@ -410,21 +410,21 @@ namespace internal
               // grad z: can use the values applied in x direction stored in
               // temp1
               eval1.template values<1, true, false>(temp1, temp2);
-              if (evaluation_flag & EvaluationFlags::gradients)
+              if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
                 eval2.template gradients<2, true, false>(temp2,
                                                          gradients_quad +
                                                            2 * n_q_points);
 
               // grad zz: can use the values applied in x and y direction stored
               // in temp2
-              if (evaluation_flag & EvaluationFlags::hessians)
+              if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
                 eval2.template hessians<2, true, false>(temp2,
                                                         hessians_quad +
                                                           2 * n_q_points);
 
               // val: can use the values applied in x & y direction stored in
               // temp2
-              if (evaluation_flag & EvaluationFlags::values)
+              if ((evaluation_flag & EvaluationFlags::values) != 0u)
                 eval2.template values<2, true, false>(temp2, values_quad);
 
               // advance to the next component in 1D array
@@ -442,7 +442,7 @@ namespace internal
     // case additional dof for FE_Q_DG0: add values; gradients and second
     // derivatives evaluate to zero
     if (type == MatrixFreeFunctions::tensor_symmetric_plus_dg0 &&
-        (evaluation_flag & EvaluationFlags::values))
+        ((evaluation_flag & EvaluationFlags::values) != 0u))
       {
         values_quad -= n_components * n_q_points;
         values_dofs -= n_components * dofs_per_comp;
@@ -526,7 +526,7 @@ namespace internal
         case 1:
           for (unsigned int c = 0; c < n_components; ++c)
             {
-              if (integration_flag & EvaluationFlags::values)
+              if ((integration_flag & EvaluationFlags::values) != 0u)
                 {
                   if (add_into_values_array == false)
                     eval0.template values<0, false, false>(values_quad,
@@ -535,9 +535,9 @@ namespace internal
                     eval0.template values<0, false, true>(values_quad,
                                                           values_dofs);
                 }
-              if (integration_flag & EvaluationFlags::gradients)
+              if ((integration_flag & EvaluationFlags::gradients) != 0u)
                 {
-                  if (integration_flag & EvaluationFlags::values ||
+                  if (((integration_flag & EvaluationFlags::values) != 0u) ||
                       add_into_values_array == true)
                     eval0.template gradients<0, false, true>(gradients_quad,
                                                              values_dofs);
@@ -568,8 +568,8 @@ namespace internal
         case 2:
           for (unsigned int c = 0; c < n_components; ++c)
             {
-              if ((integration_flag & EvaluationFlags::values) &&
-                  !(integration_flag & EvaluationFlags::gradients))
+              if (((integration_flag & EvaluationFlags::values) != 0u) &&
+                  ((integration_flag & EvaluationFlags::gradients) == 0u))
                 {
                   eval1.template values<1, false, false>(values_quad, temp1);
                   if (add_into_values_array == false)
@@ -577,12 +577,12 @@ namespace internal
                   else
                     eval0.template values<0, false, true>(temp1, values_dofs);
                 }
-              if (integration_flag & EvaluationFlags::gradients)
+              if ((integration_flag & EvaluationFlags::gradients) != 0u)
                 {
                   eval1.template gradients<1, false, false>(gradients_quad +
                                                               n_q_points,
                                                             temp1);
-                  if (integration_flag & EvaluationFlags::values)
+                  if ((integration_flag & EvaluationFlags::values) != 0u)
                     eval1.template values<1, false, true>(values_quad, temp1);
                   if (add_into_values_array == false)
                     eval0.template values<0, false, false>(temp1, values_dofs);
@@ -628,8 +628,8 @@ namespace internal
         case 3:
           for (unsigned int c = 0; c < n_components; ++c)
             {
-              if ((integration_flag & EvaluationFlags::values) &&
-                  !(integration_flag & EvaluationFlags::gradients))
+              if (((integration_flag & EvaluationFlags::values) != 0u) &&
+                  ((integration_flag & EvaluationFlags::gradients) == 0u))
                 {
                   eval2.template values<2, false, false>(values_quad, temp1);
                   eval1.template values<1, false, false>(temp1, temp2);
@@ -638,12 +638,12 @@ namespace internal
                   else
                     eval0.template values<0, false, true>(temp2, values_dofs);
                 }
-              if (integration_flag & EvaluationFlags::gradients)
+              if ((integration_flag & EvaluationFlags::gradients) != 0u)
                 {
                   eval2.template gradients<2, false, false>(gradients_quad +
                                                               2 * n_q_points,
                                                             temp1);
-                  if (integration_flag & EvaluationFlags::values)
+                  if ((integration_flag & EvaluationFlags::values) != 0u)
                     eval2.template values<2, false, true>(values_quad, temp1);
                   eval1.template values<1, false, false>(temp1, temp2);
                   eval2.template values<2, false, false>(gradients_quad +
@@ -725,7 +725,7 @@ namespace internal
       {
         values_dofs -= n_components * dofs_per_comp - dofs_per_comp + 1;
         values_quad -= n_components * n_q_points;
-        if (integration_flag & EvaluationFlags::values)
+        if ((integration_flag & EvaluationFlags::values) != 0u)
           for (unsigned int c = 0; c < n_components; ++c)
             {
               values_dofs[0] = values_quad[0];
@@ -790,7 +790,7 @@ namespace internal
     using Eval =
       EvaluatorTensorProduct<evaluate_general, 1, 0, 0, Number, Number>;
 
-    if (evaluation_flag & EvaluationFlags::values)
+    if ((evaluation_flag & EvaluationFlags::values) != 0u)
       {
         const auto shape_values    = shape_data.front().shape_values.data();
         auto       values_quad_ptr = fe_eval.begin_values();
@@ -807,7 +807,7 @@ namespace internal
           }
       }
 
-    if (evaluation_flag & EvaluationFlags::gradients)
+    if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
       {
         const auto shape_gradients = shape_data.front().shape_gradients.data();
         auto       gradients_quad_ptr     = fe_eval.begin_gradients();
@@ -832,7 +832,7 @@ namespace internal
           }
       }
 
-    if (evaluation_flag & EvaluationFlags::hessians)
+    if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
       Assert(false, ExcNotImplemented());
   }
 
@@ -864,7 +864,7 @@ namespace internal
     using Eval =
       EvaluatorTensorProduct<evaluate_general, 1, 0, 0, Number, Number>;
 
-    if (integration_flag & EvaluationFlags::values)
+    if ((integration_flag & EvaluationFlags::values) != 0u)
       {
         const auto shape_values    = shape_data.front().shape_values.data();
         auto       values_quad_ptr = fe_eval.begin_values();
@@ -885,7 +885,7 @@ namespace internal
           }
       }
 
-    if (integration_flag & EvaluationFlags::gradients)
+    if ((integration_flag & EvaluationFlags::gradients) != 0u)
       {
         const auto shape_gradients = shape_data.front().shape_gradients.data();
         auto       gradients_quad_ptr     = fe_eval.begin_gradients();
@@ -902,7 +902,7 @@ namespace internal
                           n_q_points);
 
                 if ((add_into_values_array == false &&
-                     (integration_flag & EvaluationFlags::values) == false) &&
+                     (integration_flag & EvaluationFlags::values) == 0) &&
                     d == 0)
                   eval.template gradients<0, false, false>(
                     gradients_quad_ptr, values_dofs_actual_ptr);
@@ -1426,7 +1426,7 @@ namespace internal
                                                   gradients_quad +
                                                     2 * n_points);
       }
-    if (evaluation_flag & EvaluationFlags::hessians)
+    if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
       {
         eval.template hessians<0, true, false>(values_dofs, hessians_quad);
         if (dim > 1)
@@ -1535,7 +1535,7 @@ namespace internal
         if (dim == 2)
           {
             // grad xy, queue into gradient
-            if (integration_flag & EvaluationFlags::gradients)
+            if ((integration_flag & EvaluationFlags::gradients) != 0u)
               eval.template gradients<1, false, true>(hessians_quad +
                                                         2 * n_points,
                                                       gradients_quad);
@@ -1547,7 +1547,7 @@ namespace internal
         if (dim == 3)
           {
             // grad xy, queue into gradient
-            if (integration_flag & EvaluationFlags::gradients)
+            if ((integration_flag & EvaluationFlags::gradients) != 0u)
               eval.template gradients<1, false, true>(hessians_quad +
                                                         3 * n_points,
                                                       gradients_quad);
@@ -1562,7 +1562,7 @@ namespace internal
                                                     gradients_quad);
 
             // grad yz
-            if (integration_flag & EvaluationFlags::gradients)
+            if ((integration_flag & EvaluationFlags::gradients) != 0u)
               eval.template gradients<2, false, true>(
                 hessians_quad + 5 * n_points, gradients_quad + n_points);
             else
@@ -1662,8 +1662,8 @@ namespace internal
                               fe_eval.begin_values() + c * n_q_points);
 
         // apply derivatives in the collocation space
-        if (evaluation_flag &
-            (EvaluationFlags::gradients | EvaluationFlags::hessians))
+        if ((evaluation_flag &
+             (EvaluationFlags::gradients | EvaluationFlags::hessians)) != 0u)
           FEEvaluationImplCollocation<dim, n_q_points_1d - 1, Number>::
             do_evaluate(shape_data,
                         evaluation_flag & (EvaluationFlags::gradients |
@@ -1701,8 +1701,8 @@ namespace internal
     for (unsigned int c = 0; c < n_components; ++c)
       {
         // apply derivatives in collocation space
-        if (integration_flag &
-            (EvaluationFlags::gradients | EvaluationFlags::hessians))
+        if ((integration_flag &
+             (EvaluationFlags::gradients | EvaluationFlags::hessians)) != 0u)
           FEEvaluationImplCollocation<dim, n_q_points_1d - 1, Number>::
             do_integrate(shape_data,
                          integration_flag & (EvaluationFlags::gradients |
index 0ffa4399647342e889667a2b324f68beac5200b7..2de3e862bc594e9314239c0de191a5824e34eedb 100644 (file)
@@ -7107,11 +7107,11 @@ FEEvaluation<dim,
     }
 
 #  ifdef DEBUG
-  if (evaluation_flag_actual & EvaluationFlags::values)
+  if ((evaluation_flag_actual & EvaluationFlags::values) != 0u)
     this->values_quad_initialized = true;
-  if (evaluation_flag_actual & EvaluationFlags::gradients)
+  if ((evaluation_flag_actual & EvaluationFlags::gradients) != 0u)
     this->gradients_quad_initialized = true;
-  if (evaluation_flag_actual & EvaluationFlags::hessians)
+  if ((evaluation_flag_actual & EvaluationFlags::hessians) != 0u)
     this->hessians_quad_initialized = true;
 #  endif
 }
@@ -7343,10 +7343,10 @@ FEEvaluation<dim,
             const bool                             sum_into_values_array)
 {
 #  ifdef DEBUG
-  if (integration_flag & EvaluationFlags::values)
+  if ((integration_flag & EvaluationFlags::values) != 0u)
     Assert(this->values_quad_submitted == true,
            internal::ExcAccessToUninitializedField());
-  if (integration_flag & EvaluationFlags::gradients)
+  if ((integration_flag & EvaluationFlags::gradients) != 0u)
     Assert(this->gradients_quad_submitted == true,
            internal::ExcAccessToUninitializedField());
   if (integration_flag & EvaluationFlags::hessians)
@@ -7853,9 +7853,9 @@ FEFaceEvaluation<dim,
       n_components, evaluation_flag_actual, values_array, *this);
 
 #  ifdef DEBUG
-  if (evaluation_flag_actual & EvaluationFlags::values)
+  if ((evaluation_flag_actual & EvaluationFlags::values) != 0u)
     this->values_quad_initialized = true;
-  if (evaluation_flag_actual & EvaluationFlags::gradients)
+  if ((evaluation_flag_actual & EvaluationFlags::gradients) != 0u)
     this->gradients_quad_initialized = true;
   if (evaluation_flag_actual & EvaluationFlags::hessians)
     this->hessians_quad_initialized = true;
@@ -7962,7 +7962,7 @@ FEFaceEvaluation<dim,
                     "and EvaluationFlags::hessians are supported."));
 
   EvaluationFlags::EvaluationFlags integration_flag_actual = integration_flag;
-  if (integration_flag & EvaluationFlags::hessians &&
+  if (((integration_flag & EvaluationFlags::hessians) != 0u) &&
       (this->cell_type > internal::MatrixFreeFunctions::affine))
     {
       unsigned int size = n_components * dim * n_q_points;
index 32aadd9e0aaaa5e2683088905e812df0bdb8cc32..6f26a70e8f369af9f19270ef76c41f1af801d303 100644 (file)
@@ -800,12 +800,12 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::FEPointEvaluation(
     }
 
   // translate update flags
-  if (update_flags & update_jacobians)
+  if ((update_flags & update_jacobians) != 0u)
     update_flags_mapping |= update_jacobians;
-  if (update_flags & update_gradients ||
-      update_flags & update_inverse_jacobians)
+  if (((update_flags & update_gradients) != 0u) ||
+      ((update_flags & update_inverse_jacobians) != 0u))
     update_flags_mapping |= update_inverse_jacobians;
-  if (update_flags & update_quadrature_points)
+  if ((update_flags & update_quadrature_points) != 0u)
     update_flags_mapping |= update_quadrature_points;
 }
 
@@ -835,20 +835,20 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::reinit(
         update_flags | update_flags_mapping);
       fe_values->reinit(cell);
       mapping_data.initialize(unit_points.size(), update_flags_mapping);
-      if (update_flags_mapping & update_jacobians)
+      if ((update_flags_mapping & update_jacobians) != 0)
         for (unsigned int q = 0; q < unit_points.size(); ++q)
           mapping_data.jacobians[q] = fe_values->jacobian(q);
-      if (update_flags_mapping & update_inverse_jacobians)
+      if ((update_flags_mapping & update_inverse_jacobians) != 0)
         for (unsigned int q = 0; q < unit_points.size(); ++q)
           mapping_data.inverse_jacobians[q] = fe_values->inverse_jacobian(q);
-      if (update_flags_mapping & update_quadrature_points)
+      if ((update_flags_mapping & update_quadrature_points) != 0)
         for (unsigned int q = 0; q < unit_points.size(); ++q)
           mapping_data.quadrature_points[q] = fe_values->quadrature_point(q);
     }
 
-  if (update_flags & update_values)
+  if ((update_flags & update_values) != 0)
     values.resize(unit_points.size(), numbers::signaling_nan<value_type>());
-  if (update_flags & update_gradients)
+  if ((update_flags & update_gradients) != 0)
     gradients.resize(unit_points.size(),
                      numbers::signaling_nan<gradient_type>());
 }
@@ -865,8 +865,8 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::evaluate(
     return;
 
   AssertDimension(solution_values.size(), fe->dofs_per_cell);
-  if (((evaluation_flag & EvaluationFlags::values) ||
-       (evaluation_flag & EvaluationFlags::gradients)) &&
+  if ((((evaluation_flag & EvaluationFlags::values) != 0u) ||
+       ((evaluation_flag & EvaluationFlags::gradients) != 0u)) &&
       !poly.empty())
     {
       // fast path with tensor product evaluation
@@ -906,12 +906,12 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::evaluate(
               polynomials_are_hat_functions);
 
           // convert back to standard format
-          if (evaluation_flag & EvaluationFlags::values)
+          if ((evaluation_flag & EvaluationFlags::values) != 0u)
             for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
               internal::FEPointEvaluation::
                 EvaluatorTypeTraits<dim, n_components, Number>::set_value(
                   val_and_grad.first, j, values[i + j]);
-          if (evaluation_flag & EvaluationFlags::gradients)
+          if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
             {
               Assert(update_flags & update_gradients ||
                        update_flags & update_inverse_jacobians,
@@ -933,15 +933,15 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::evaluate(
             }
         }
     }
-  else if ((evaluation_flag & EvaluationFlags::values) ||
-           (evaluation_flag & EvaluationFlags::gradients))
+  else if (((evaluation_flag & EvaluationFlags::values) != 0u) ||
+           ((evaluation_flag & EvaluationFlags::gradients) != 0u))
     {
       // slow path with FEValues
       Assert(fe_values.get() != nullptr,
              ExcMessage(
                "Not initialized. Please call FEPointEvaluation::reinit()!"));
 
-      if (evaluation_flag & EvaluationFlags::values)
+      if ((evaluation_flag & EvaluationFlags::values) != 0u)
         {
           values.resize(unit_points.size());
           std::fill(values.begin(), values.end(), value_type());
@@ -964,7 +964,7 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::evaluate(
             }
         }
 
-      if (evaluation_flag & EvaluationFlags::gradients)
+      if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
         {
           gradients.resize(unit_points.size());
           std::fill(gradients.begin(), gradients.end(), gradient_type());
@@ -1004,15 +1004,15 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
     }
 
   AssertDimension(solution_values.size(), fe->dofs_per_cell);
-  if (((integration_flags & EvaluationFlags::values) ||
-       (integration_flags & EvaluationFlags::gradients)) &&
+  if ((((integration_flags & EvaluationFlags::values) != 0u) ||
+       ((integration_flags & EvaluationFlags::gradients) != 0u)) &&
       !poly.empty())
     {
       // fast path with tensor product integration
 
-      if (integration_flags & EvaluationFlags::values)
+      if ((integration_flags & EvaluationFlags::values) != 0u)
         AssertIndexRange(unit_points.size(), values.size() + 1);
-      if (integration_flags & EvaluationFlags::gradients)
+      if ((integration_flags & EvaluationFlags::gradients) != 0u)
         AssertIndexRange(unit_points.size(), gradients.size() + 1);
 
       if (solution_renumbered_vectorized.size() != dofs_per_component)
@@ -1044,12 +1044,12 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
                    VectorizedArray<Number>>::type>
             gradient;
 
-          if (integration_flags & EvaluationFlags::values)
+          if ((integration_flags & EvaluationFlags::values) != 0u)
             for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
               internal::FEPointEvaluation::
                 EvaluatorTypeTraits<dim, n_components, Number>::get_value(
                   value, j, values[i + j]);
-          if (integration_flags & EvaluationFlags::gradients)
+          if ((integration_flags & EvaluationFlags::gradients) != 0u)
             for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
               {
                 Assert(update_flags_mapping & update_inverse_jacobians,
@@ -1087,8 +1087,8 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
               result[0];
           }
     }
-  else if ((integration_flags & EvaluationFlags::values) ||
-           (integration_flags & EvaluationFlags::gradients))
+  else if (((integration_flags & EvaluationFlags::values) != 0u) ||
+           ((integration_flags & EvaluationFlags::gradients) != 0u))
     {
       // slow path with FEValues
 
@@ -1097,7 +1097,7 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
                "Not initialized. Please call FEPointEvaluation::reinit()!"));
       std::fill(solution_values.begin(), solution_values.end(), 0.0);
 
-      if (integration_flags & EvaluationFlags::values)
+      if ((integration_flags & EvaluationFlags::values) != 0u)
         {
           AssertIndexRange(unit_points.size(), values.size() + 1);
           for (unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
@@ -1121,7 +1121,7 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
             }
         }
 
-      if (integration_flags & EvaluationFlags::gradients)
+      if ((integration_flags & EvaluationFlags::gradients) != 0u)
         {
           AssertIndexRange(unit_points.size(), gradients.size() + 1);
           for (unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
index 822a4c66f253c4771628d2e21a4ae2274c3e8b9c..ebefb06f1f70edc4ffcf7d05921e7526e1ed99e7 100644 (file)
@@ -171,7 +171,7 @@ namespace internal
       mapping_info_storage.data_index_offsets.resize(1);
       mapping_info_storage.JxW_values.resize(fe_values.n_quadrature_points);
       mapping_info_storage.jacobians[0].resize(fe_values.n_quadrature_points);
-      if (update_flags & update_quadrature_points)
+      if ((update_flags & update_quadrature_points) != 0u)
         {
           mapping_info_storage.quadrature_point_offsets.resize(1, 0);
           mapping_info_storage.quadrature_points.resize(
index 99d23c9ead774457f08f556942d937a25b1d020d..42627038f6bddc1c26e7ca3511d6da7ae33f79e7 100644 (file)
@@ -88,8 +88,8 @@ namespace internal
           update_flags_cells, quad);
 
       this->update_flags_boundary_faces =
-        ((update_flags_inner_faces | update_flags_boundary_faces) &
-             update_quadrature_points ?
+        (((update_flags_inner_faces | update_flags_boundary_faces) &
+          update_quadrature_points) != 0u ?
            update_quadrature_points :
            update_default) |
         ((update_flags_inner_faces | update_flags_boundary_faces) &
@@ -1359,10 +1359,10 @@ namespace internal
             data_cells_local.back().first[my_q].JxW_values.size());
           cell_data[my_q].jacobians[0].resize_fast(
             cell_data[my_q].JxW_values.size());
-          if (update_flags_cells & update_jacobian_grads)
+          if ((update_flags_cells & update_jacobian_grads) != 0)
             cell_data[my_q].jacobian_gradients[0].resize_fast(
               cell_data[my_q].JxW_values.size());
-          if (update_flags_cells & update_quadrature_points)
+          if ((update_flags_cells & update_quadrature_points) != 0)
             {
               cell_data[my_q].quadrature_point_offsets.resize(cell_type.size());
               cell_data[my_q].quadrature_points.resize_fast(
@@ -2402,7 +2402,7 @@ namespace internal
             face_data[my_q].JxW_values.size());
           face_data[my_q].jacobians[1].resize_fast(
             face_data[my_q].JxW_values.size());
-          if (update_flags_common & update_jacobian_grads)
+          if ((update_flags_common & update_jacobian_grads) != 0u)
             {
               face_data[my_q].jacobian_gradients[0].resize_fast(
                 face_data[my_q].JxW_values.size());
@@ -2413,7 +2413,7 @@ namespace internal
             face_data[my_q].JxW_values.size());
           face_data[my_q].normals_times_jacobians[1].resize_fast(
             face_data[my_q].JxW_values.size());
-          if (update_flags_common & update_quadrature_points)
+          if ((update_flags_common & update_quadrature_points) != 0u)
             {
               face_data[my_q].quadrature_point_offsets.resize(face_type.size());
               face_data[my_q].quadrature_points.resize_fast(
@@ -2645,10 +2645,10 @@ namespace internal
 
           my_data.JxW_values.resize_fast(max_size);
           my_data.jacobians[0].resize_fast(max_size);
-          if (update_flags_cells & update_jacobian_grads)
+          if ((update_flags_cells & update_jacobian_grads) != 0)
             my_data.jacobian_gradients[0].resize_fast(max_size);
 
-          if (update_flags_cells & update_quadrature_points)
+          if ((update_flags_cells & update_quadrature_points) != 0)
             {
               my_data.quadrature_point_offsets.resize(cell_type.size());
               for (unsigned int cell = 1; cell < cell_type.size(); ++cell)
@@ -2772,7 +2772,7 @@ namespace internal
           my_data.normal_vectors.resize_fast(max_size);
           my_data.jacobians[0].resize_fast(max_size);
           my_data.jacobians[1].resize_fast(max_size);
-          if (update_flags_common & update_jacobian_grads)
+          if ((update_flags_common & update_jacobian_grads) != 0u)
             {
               my_data.jacobian_gradients[0].resize_fast(max_size);
               my_data.jacobian_gradients[1].resize_fast(max_size);
@@ -2780,7 +2780,7 @@ namespace internal
           my_data.normals_times_jacobians[0].resize_fast(max_size);
           my_data.normals_times_jacobians[1].resize_fast(max_size);
 
-          if (update_flags_common & update_quadrature_points)
+          if ((update_flags_common & update_quadrature_points) != 0u)
             {
               my_data.quadrature_point_offsets.resize(face_type.size());
               my_data.quadrature_point_offsets[0] = 0;
@@ -2876,7 +2876,7 @@ namespace internal
       const unsigned int n_quads = face_data_by_cells.size();
       const unsigned int n_lanes = VectorizedArrayType::size();
       UpdateFlags        update_flags =
-        (update_flags_faces_by_cells & update_quadrature_points ?
+        ((update_flags_faces_by_cells & update_quadrature_points) != 0 ?
            update_quadrature_points :
            update_default) |
         update_normal_vectors | update_JxW_values | update_jacobians;
@@ -2889,7 +2889,7 @@ namespace internal
           AssertDimension(cell_type.size(), cells.size() / n_lanes);
           face_data_by_cells[my_q].data_index_offsets.resize(
             cell_type.size() * GeometryInfo<dim>::faces_per_cell);
-          if (update_flags & update_quadrature_points)
+          if ((update_flags & update_quadrature_points) != 0)
             face_data_by_cells[my_q].quadrature_point_offsets.resize(
               cell_type.size() * GeometryInfo<dim>::faces_per_cell);
           std::size_t storage_length = 0;
@@ -2911,7 +2911,7 @@ namespace internal
                     storage_length +=
                       face_data_by_cells[my_q].descriptor[0].n_q_points;
                   }
-                if (update_flags & update_quadrature_points)
+                if ((update_flags & update_quadrature_points) != 0u)
                   face_data_by_cells[my_q].quadrature_point_offsets
                     [i * GeometryInfo<dim>::faces_per_cell + face] =
                     (i * GeometryInfo<dim>::faces_per_cell + face) *
@@ -2923,22 +2923,22 @@ namespace internal
             storage_length * GeometryInfo<dim>::faces_per_cell);
           face_data_by_cells[my_q].jacobians[1].resize_fast(
             storage_length * GeometryInfo<dim>::faces_per_cell);
-          if (update_flags & update_normal_vectors)
+          if ((update_flags & update_normal_vectors) != 0u)
             face_data_by_cells[my_q].normal_vectors.resize_fast(
               storage_length * GeometryInfo<dim>::faces_per_cell);
-          if (update_flags & update_normal_vectors &&
-              update_flags & update_jacobians)
+          if (((update_flags & update_normal_vectors) != 0u) &&
+              ((update_flags & update_jacobians) != 0u))
             face_data_by_cells[my_q].normals_times_jacobians[0].resize_fast(
               storage_length * GeometryInfo<dim>::faces_per_cell);
-          if (update_flags & update_normal_vectors &&
-              update_flags & update_jacobians)
+          if (((update_flags & update_normal_vectors) != 0u) &&
+              ((update_flags & update_jacobians) != 0u))
             face_data_by_cells[my_q].normals_times_jacobians[1].resize_fast(
               storage_length * GeometryInfo<dim>::faces_per_cell);
-          if (update_flags & update_jacobian_grads)
+          if ((update_flags & update_jacobian_grads) != 0u)
             face_data_by_cells[my_q].jacobian_gradients[0].resize_fast(
               storage_length * GeometryInfo<dim>::faces_per_cell);
 
-          if (update_flags & update_quadrature_points)
+          if ((update_flags & update_quadrature_points) != 0u)
             face_data_by_cells[my_q].quadrature_points.resize_fast(
               cell_type.size() * GeometryInfo<dim>::faces_per_cell *
               face_data_by_cells[my_q].descriptor[0].n_q_points);
@@ -3012,10 +3012,10 @@ namespace internal
                   // copy data for affine data type
                   if (cell_type[cell] <= affine)
                     {
-                      if (update_flags & update_JxW_values)
+                      if ((update_flags & update_JxW_values) != 0u)
                         face_data_by_cells[my_q].JxW_values[offset][v] =
                           fe_val.JxW(0) / fe_val.get_quadrature().weight(0);
-                      if (update_flags & update_jacobians)
+                      if ((update_flags & update_jacobians) != 0u)
                         {
                           DerivativeForm<1, dim, dim> inv_jac =
                             fe_val.jacobian(0).covariant_form();
@@ -3029,7 +3029,7 @@ namespace internal
                                   inv_jac[d][ee];
                               }
                         }
-                      if (is_local && (update_flags & update_jacobians))
+                      if (is_local && ((update_flags & update_jacobians) != 0u))
                         for (unsigned int q = 0; q < fe_val.n_quadrature_points;
                              ++q)
                           {
@@ -3046,11 +3046,11 @@ namespace internal
                                     inv_jac[d][ee];
                                 }
                           }
-                      if (update_flags & update_jacobian_grads)
+                      if ((update_flags & update_jacobian_grads) != 0u)
                         {
                           Assert(false, ExcNotImplemented());
                         }
-                      if (update_flags & update_normal_vectors)
+                      if ((update_flags & update_normal_vectors) != 0u)
                         for (unsigned int d = 0; d < dim; ++d)
                           face_data_by_cells[my_q]
                             .normal_vectors[offset][d][v] =
@@ -3059,12 +3059,12 @@ namespace internal
                   // copy data for general data type
                   else
                     {
-                      if (update_flags & update_JxW_values)
+                      if ((update_flags & update_JxW_values) != 0u)
                         for (unsigned int q = 0; q < fe_val.n_quadrature_points;
                              ++q)
                           face_data_by_cells[my_q].JxW_values[offset + q][v] =
                             fe_val.JxW(q);
-                      if (update_flags & update_jacobians)
+                      if ((update_flags & update_jacobians) != 0u)
                         for (unsigned int q = 0; q < fe_val.n_quadrature_points;
                              ++q)
                           {
@@ -3081,11 +3081,11 @@ namespace internal
                                     inv_jac[d][ee];
                                 }
                           }
-                      if (update_flags & update_jacobian_grads)
+                      if ((update_flags & update_jacobian_grads) != 0u)
                         {
                           Assert(false, ExcNotImplemented());
                         }
-                      if (update_flags & update_normal_vectors)
+                      if ((update_flags & update_normal_vectors) != 0u)
                         for (unsigned int q = 0; q < fe_val.n_quadrature_points;
                              ++q)
                           for (unsigned int d = 0; d < dim; ++d)
@@ -3093,7 +3093,7 @@ namespace internal
                               .normal_vectors[offset + q][d][v] =
                               fe_val.normal_vector(q)[d];
                     }
-                  if (update_flags & update_quadrature_points)
+                  if ((update_flags & update_quadrature_points) != 0u)
                     for (unsigned int q = 0; q < fe_val.n_quadrature_points;
                          ++q)
                       for (unsigned int d = 0; d < dim; ++d)
@@ -3102,8 +3102,8 @@ namespace internal
                              [cell * GeometryInfo<dim>::faces_per_cell + face] +
                            q][d][v] = fe_val.quadrature_point(q)[d];
                 }
-              if (update_flags & update_normal_vectors &&
-                  update_flags & update_jacobians)
+              if (((update_flags & update_normal_vectors) != 0u) &&
+                  ((update_flags & update_jacobians) != 0u))
                 for (unsigned int q = 0; q < (cell_type[cell] <= affine ?
                                                 1 :
                                                 fe_val.n_quadrature_points);
@@ -3112,8 +3112,8 @@ namespace internal
                     .normals_times_jacobians[0][offset + q] =
                     face_data_by_cells[my_q].normal_vectors[offset + q] *
                     face_data_by_cells[my_q].jacobians[0][offset + q];
-              if (update_flags & update_normal_vectors &&
-                  update_flags & update_jacobians)
+              if (((update_flags & update_normal_vectors) != 0u) &&
+                  ((update_flags & update_jacobians) != 0u))
                 for (unsigned int q = 0; q < (cell_type[cell] <= affine ?
                                                 1 :
                                                 fe_val.n_quadrature_points);
index 494cc8d4c70b288b0acc7317697f48bba40f8452..b8260d13d385c563e939db9df0604a82c28bbe82 100644 (file)
@@ -786,13 +786,13 @@ namespace MeshWorker
                                             const BlockInfo *block_info)
   {
     initialize_update_flags();
-    initialize_gauss_quadrature((cell_flags & update_values) ?
+    initialize_gauss_quadrature(((cell_flags & update_values) != 0) ?
                                   (el.tensor_degree() + 1) :
                                   el.tensor_degree(),
-                                (boundary_flags & update_values) ?
+                                ((boundary_flags & update_values) != 0) ?
                                   (el.tensor_degree() + 1) :
                                   el.tensor_degree(),
-                                (face_flags & update_values) ?
+                                ((face_flags & update_values) != 0) ?
                                   (el.tensor_degree() + 1) :
                                   el.tensor_degree(),
                                 false);
index e88bd2f74943013aff6d395f76ea42f677212992..d1b5aaabdd170b358e1eb3ca2184db2186293e17 100644 (file)
@@ -191,32 +191,32 @@ namespace MeshWorker
     face_flags |= boundary_flags;
     neighbor_flags |= neighbor_geometry ? boundary_flags : update_default;
 
-    if (cell_selector.has_values() != 0)
+    if (cell_selector.has_values())
       cell_flags |= update_values;
-    if (cell_selector.has_gradients() != 0)
+    if (cell_selector.has_gradients())
       cell_flags |= update_gradients;
-    if (cell_selector.has_hessians() != 0)
+    if (cell_selector.has_hessians())
       cell_flags |= update_hessians;
 
-    if (boundary_selector.has_values() != 0)
+    if (boundary_selector.has_values())
       boundary_flags |= update_values;
-    if (boundary_selector.has_gradients() != 0)
+    if (boundary_selector.has_gradients())
       boundary_flags |= update_gradients;
-    if (boundary_selector.has_hessians() != 0)
+    if (boundary_selector.has_hessians())
       boundary_flags |= update_hessians;
 
-    if (face_selector.has_values() != 0)
+    if (face_selector.has_values())
       face_flags |= update_values;
-    if (face_selector.has_gradients() != 0)
+    if (face_selector.has_gradients())
       face_flags |= update_gradients;
-    if (face_selector.has_hessians() != 0)
+    if (face_selector.has_hessians())
       face_flags |= update_hessians;
 
-    if (face_selector.has_values() != 0)
+    if (face_selector.has_values())
       neighbor_flags |= update_values;
-    if (face_selector.has_gradients() != 0)
+    if (face_selector.has_gradients())
       neighbor_flags |= update_gradients;
-    if (face_selector.has_hessians() != 0)
+    if (face_selector.has_hessians())
       neighbor_flags |= update_hessians;
   }
 
index ae77d7ac67bc0505bbc2dade9e0d55628163a86e..bc41d16bf86352d6c99f8dad6184514937d9e9be 100644 (file)
@@ -108,7 +108,7 @@ ConvergenceTable::evaluate_convergence_rates(
   set_precision(rate_key, 2);
 
   const std::string &superkey = data_column_key;
-  if (!supercolumns.count(superkey))
+  if (supercolumns.count(superkey) == 0u)
     {
       add_column_to_supercolumn(data_column_key, superkey);
       set_tex_supercaption(superkey, columns[data_column_key].tex_caption);
@@ -199,7 +199,7 @@ ConvergenceTable::evaluate_convergence_rates(const std::string &data_column_key,
   const std::string &superkey = data_column_key;
   // and set the tex caption of the supercolumn to the tex caption of the
   // data_column.
-  if (!supercolumns.count(superkey))
+  if (supercolumns.count(superkey) == 0u)
     {
       add_column_to_supercolumn(data_column_key, superkey);
       set_tex_supercaption(superkey, columns[data_column_key].tex_caption);
@@ -234,7 +234,7 @@ ConvergenceTable::evaluate_all_convergence_rates(
   for (std::map<std::string, Column>::const_iterator col_iter = columns.begin();
        col_iter != columns.end();
        ++col_iter)
-    if (!col_iter->second.flag)
+    if (col_iter->second.flag == 0u)
       evaluate_convergence_rates(col_iter->first,
                                  reference_column_key,
                                  rate_mode);
@@ -248,7 +248,7 @@ ConvergenceTable::evaluate_all_convergence_rates(const RateMode rate_mode)
   for (std::map<std::string, Column>::const_iterator col_iter = columns.begin();
        col_iter != columns.end();
        ++col_iter)
-    if (!col_iter->second.flag)
+    if (col_iter->second.flag == 0u)
       evaluate_convergence_rates(col_iter->first, rate_mode);
 }
 
index 5ded5afcebc8016e157c4d8430ddbdf74ba47451..d84b3b815b0fbe43eb41abb73365bbf3ab219a76 100644 (file)
@@ -860,7 +860,7 @@ namespace
 
     if (nbdy == 2) // Vertex DOF
       { // ijk is a corner node. Return the proper index (somewhere in [0,3]):
-        return (i ? (j ? 2 : 1) : (j ? 3 : 0));
+        return (i != 0u ? (j != 0u ? 2 : 1) : (j != 0u ? 3 : 0));
       }
 
     int offset = 4;
@@ -868,13 +868,15 @@ namespace
       {
         if (!ibdy)
           { // On i axis
-            return (i - 1) + (j ? order[0] - 1 + order[1] - 1 : 0) + offset;
+            return (i - 1) + (j != 0u ? order[0] - 1 + order[1] - 1 : 0) +
+                   offset;
           }
 
         if (!jbdy)
           { // On j axis
             return (j - 1) +
-                   (i ? order[0] - 1 : 2 * (order[0] - 1) + order[1] - 1) +
+                   (i != 0u ? order[0] - 1 :
+                              2 * (order[0] - 1) + order[1] - 1) +
                    offset;
           }
       }
@@ -907,7 +909,8 @@ namespace
 
     if (nbdy == 3) // Vertex DOF
       { // ijk is a corner node. Return the proper index (somewhere in [0,7]):
-        return (i ? (j ? 2 : 1) : (j ? 3 : 0)) + (k ? 4 : 0);
+        return (i != 0u ? (j != 0u ? 2 : 1) : (j != 0u ? 3 : 0)) +
+               (k != 0u ? 4 : 0);
       }
 
     int offset = 8;
@@ -915,18 +918,21 @@ namespace
       {
         if (!ibdy)
           { // On i axis
-            return (i - 1) + (j ? order[0] - 1 + order[1] - 1 : 0) +
-                   (k ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
+            return (i - 1) + (j != 0u ? order[0] - 1 + order[1] - 1 : 0) +
+                   (k != 0u ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
           }
         if (!jbdy)
           { // On j axis
             return (j - 1) +
-                   (i ? order[0] - 1 : 2 * (order[0] - 1) + order[1] - 1) +
-                   (k ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
+                   (i != 0u ? order[0] - 1 :
+                              2 * (order[0] - 1) + order[1] - 1) +
+                   (k != 0u ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
           }
         // !kbdy, On k axis
         offset += 4 * (order[0] - 1) + 4 * (order[1] - 1);
-        return (k - 1) + (order[2] - 1) * (i ? (j ? 3 : 1) : (j ? 2 : 0)) +
+        return (k - 1) +
+               (order[2] - 1) *
+                 (i != 0u ? (j != 0u ? 3 : 1) : (j != 0u ? 2 : 0)) +
                offset;
       }
 
@@ -936,18 +942,18 @@ namespace
         if (ibdy) // On i-normal face
           {
             return (j - 1) + ((order[1] - 1) * (k - 1)) +
-                   (i ? (order[1] - 1) * (order[2] - 1) : 0) + offset;
+                   (i != 0u ? (order[1] - 1) * (order[2] - 1) : 0) + offset;
           }
         offset += 2 * (order[1] - 1) * (order[2] - 1);
         if (jbdy) // On j-normal face
           {
             return (i - 1) + ((order[0] - 1) * (k - 1)) +
-                   (j ? (order[2] - 1) * (order[0] - 1) : 0) + offset;
+                   (j != 0u ? (order[2] - 1) * (order[0] - 1) : 0) + offset;
           }
         offset += 2 * (order[2] - 1) * (order[0] - 1);
         // kbdy, On k-normal face
         return (i - 1) + ((order[0] - 1) * (j - 1)) +
-               (k ? (order[0] - 1) * (order[1] - 1) : 0) + offset;
+               (k != 0u ? (order[0] - 1) * (order[1] - 1) : 0) + offset;
       }
 
     // nbdy == 0: Body DOF
index 37c85104b9916c38038b79505647b1f02a93b84b..8df4e1d597a04f59730748e06278ccebea36a488 100644 (file)
@@ -469,7 +469,7 @@ namespace deal_II_exceptions
 #ifdef DEAL_II_WITH_MPI
       int is_initialized;
       MPI_Initialized(&is_initialized);
-      if (is_initialized)
+      if (is_initialized != 0)
         {
           // do the same as in Utilities::MPI::n_mpi_processes() here,
           // but without error checking to not throw again.
index 774ddfacb6e452ad9ce6a556e879b19c8249c57c..51b3e2759cf18eab5eba0275bdd429721790a0ca 100644 (file)
@@ -499,7 +499,7 @@ IndexSet::block_read(std::istream &in)
   ranges.clear();
   set_size(size);
   ranges.resize(n_ranges, Range(0, 0));
-  if (n_ranges)
+  if (n_ranges != 0u)
     in.read(reinterpret_cast<char *>(&*ranges.begin()),
             ranges.size() * sizeof(Range));
 
index 29c72e5edbf2af3dc2d55338f48a9b817c0e5df5..76bbc402dae37245422e53307ead2f1f49b6b43b 100644 (file)
@@ -107,7 +107,7 @@ LogStream::~LogStream()
         // (note that we can't issue an assertion here either since Assert
         // may want to write to 'deallog' itself, and AssertThrow will
         // throw an exception that can't be caught)
-        if ((this == &deallog) && file)
+        if ((this == &deallog) && (file != nullptr))
           *std_out << ("You still have content that was written to 'deallog' "
                        "but not flushed to the screen or a file while the "
                        "program is being terminated. This would lead to a "
@@ -204,7 +204,7 @@ LogStream::operator<<(std::ostream &(*p)(std::ostream &))
       if (get_prefixes().size() <= std_depth)
         *std_out << stream.str();
 
-      if (file && (get_prefixes().size() <= file_depth))
+      if ((file != nullptr) && (get_prefixes().size() <= file_depth))
         *file << stream.str() << std::flush;
 
       // Start a new string:
@@ -414,7 +414,7 @@ LogStream::print_line_head()
         *std_out << head << ':';
     }
 
-  if (file && (get_prefixes().size() <= file_depth))
+  if ((file != nullptr) && (get_prefixes().size() <= file_depth))
     {
       if (print_thread_id)
         *file << '[' << thread << ']';
index bd639b9e455ae723fe65d4a5748baa406246cb18..e99fbad756c28a222e59b10c220576514f8a4ee8 100644 (file)
@@ -734,7 +734,7 @@ namespace Utilities
 
         int ierr =
           MPI_Op_create(reinterpret_cast<MPI_User_function *>(&max_reduce),
-                        true,
+                        static_cast<int>(true),
                         &op);
         AssertThrowMPI(ierr);
 
index 74b9890d6ee5c196f0c962da336e0129d88cfdeb..44ce4621cbd879a478ed915853a8ae6e3d65f028 100644 (file)
@@ -43,7 +43,7 @@ namespace internal
     double
     mu_if(double condition, double thenvalue, double elsevalue)
     {
-      if (mu_round(condition))
+      if (mu_round(condition) != 0)
         return thenvalue;
       else
         return elsevalue;
@@ -52,13 +52,15 @@ namespace internal
     double
     mu_or(double left, double right)
     {
-      return (mu_round(left)) || (mu_round(right));
+      return static_cast<double>((mu_round(left) != 0) ||
+                                 (mu_round(right) != 0));
     }
 
     double
     mu_and(double left, double right)
     {
-      return (mu_round(left)) && (mu_round(right));
+      return static_cast<double>((mu_round(left) != 0) &&
+                                 (mu_round(right) != 0));
     }
 
     double
index 5245cf7f9b503c0770aef9d9cb6b96415fc823e3..5862181ce7bc504e50ecc03b3801840de9c00a1a 100644 (file)
@@ -1260,7 +1260,7 @@ ParameterHandler::print_parameters(std::ostream &    out,
   boost::property_tree::ptree current_entries = *entries.get();
 
   // Sort parameters alphabetically, if needed.
-  if (!(style & KeepDeclarationOrder))
+  if ((style & KeepDeclarationOrder) == 0)
     {
       // Dive recursively into the subsections,
       // starting from the top level.
@@ -1282,13 +1282,13 @@ ParameterHandler::print_parameters(std::ostream &    out,
   // first
 
   // explicitly compress the tree if requested
-  if ((style & Short) && (style & (XML | JSON)))
+  if (((style & Short) != 0) && ((style & (XML | JSON)) != 0))
     {
       // modify the copy of the tree
       recursively_compress_tree(current_entries);
     }
 
-  if (style & XML)
+  if ((style & XML) != 0)
     {
       // call the writer function and exit as there is nothing
       // further to do down in this function
@@ -1306,29 +1306,29 @@ ParameterHandler::print_parameters(std::ostream &    out,
       return out;
     }
 
-  if (style & JSON)
+  if ((style & JSON) != 0)
     {
       write_json(out, current_entries);
       return out;
     }
 
   // for all of the other formats, print a preamble:
-  if ((style & Short) && (style & Text))
+  if (((style & Short) != 0) && ((style & Text) != 0))
     {
       // nothing to do
     }
-  else if (style & Text)
+  else if ((style & Text) != 0)
     {
       out << "# Listing of Parameters" << std::endl
           << "# ---------------------" << std::endl;
     }
-  else if (style & LaTeX)
+  else if ((style & LaTeX) != 0)
     {
       out << "\\subsection{Global parameters}" << std::endl;
       out << "\\label{parameters:global}" << std::endl;
       out << std::endl << std::endl;
     }
-  else if (style & Description)
+  else if ((style & Description) != 0)
     {
       out << "Listing of Parameters:" << std::endl << std::endl;
     }
@@ -1393,9 +1393,9 @@ ParameterHandler::recursively_print_parameters(
 
   unsigned int overall_indent_level = indent_level;
 
-  const bool is_short = style & Short;
+  const bool is_short = (style & Short) != 0;
 
-  if (style & Text)
+  if ((style & Text) != 0)
     {
       // first find out the longest entry name to be able to align the
       // equal signs to do this loop over all nodes of the current
@@ -1466,7 +1466,7 @@ ParameterHandler::recursively_print_parameters(
             out << '\n';
           }
     }
-  else if (style & LaTeX)
+  else if ((style & LaTeX) != 0)
     {
       auto escape = [](const std::string &input) {
         return Patterns::internal::escape(input, Patterns::PatternBase::LaTeX);
@@ -1598,7 +1598,7 @@ ParameterHandler::recursively_print_parameters(
           out << "\\end{itemize}" << '\n';
         }
     }
-  else if (style & Description)
+  else if ((style & Description) != 0)
     {
       // first find out the longest entry name to be able to align the
       // equal signs
@@ -1664,8 +1664,9 @@ ParameterHandler::recursively_print_parameters(
       else if (is_alias_node(p.second) == false)
         ++n_sections;
 
-    if (!(style & Description) && (!((style & Text) && is_short)) &&
-        (n_parameters != 0) && (n_sections != 0))
+    if (((style & Description) == 0) &&
+        (!(((style & Text) != 0) && is_short)) && (n_parameters != 0) &&
+        (n_sections != 0))
       out << "\n\n";
   }
 
@@ -1675,12 +1676,12 @@ ParameterHandler::recursively_print_parameters(
         (is_alias_node(p.second) == false))
       {
         // first print the subsection header
-        if ((style & Text) || (style & Description))
+        if (((style & Text) != 0) || ((style & Description) != 0))
           {
             out << std::setw(overall_indent_level * 2) << ""
                 << "subsection " << demangle(p.first) << '\n';
           }
-        else if (style & LaTeX)
+        else if ((style & LaTeX) != 0)
           {
             auto escape = [](const std::string &input) {
               return Patterns::internal::escape(input,
@@ -1717,13 +1718,13 @@ ParameterHandler::recursively_print_parameters(
         recursively_print_parameters(
           tree, directory_path, style, overall_indent_level + 1, out);
 
-        if (is_short && (style & Text))
+        if (is_short && ((style & Text) != 0))
           {
             // write end of subsection.
             out << std::setw(overall_indent_level * 2) << ""
                 << "end" << '\n';
           }
-        else if (style & Text)
+        else if ((style & Text) != 0)
           {
             // write end of subsection. one blank line after each
             // subsection
@@ -1736,11 +1737,11 @@ ParameterHandler::recursively_print_parameters(
             if (overall_indent_level == 0)
               out << '\n';
           }
-        else if (style & Description)
+        else if ((style & Description) != 0)
           {
             // nothing to do
           }
-        else if (style & LaTeX)
+        else if ((style & LaTeX) != 0)
           {
             // nothing to do
           }
@@ -1775,7 +1776,7 @@ ParameterHandler::log_parameters_section(LogStream &       out,
   boost::property_tree::ptree *current_entries = entries.get();
 
   // Sort parameters alphabetically, if needed.
-  if (!(style & KeepDeclarationOrder))
+  if ((style & KeepDeclarationOrder) == 0)
     {
       sorted_entries  = *entries;
       current_entries = &sorted_entries;
@@ -1859,7 +1860,7 @@ ParameterHandler::scan_line(std::string        line,
            Utilities::match_at_string_start(line, "end"))
     {
       line.erase(0, 3);
-      while ((line.size() > 0) && (std::isspace(line[0])))
+      while ((line.size() > 0) && ((std::isspace(line[0])) != 0))
         line.erase(0, 1);
 
       AssertThrow(
@@ -2291,9 +2292,9 @@ MultipleParameterLoop::Entry::split_different_values()
     multiple.erase(multiple.size() - 1, 1);
   // erase leading and trailing spaces
   // in multiple
-  while (std::isspace(multiple[0]))
+  while (std::isspace(multiple[0]) != 0)
     multiple.erase(0, 1);
-  while (std::isspace(multiple[multiple.size() - 1]))
+  while (std::isspace(multiple[multiple.size() - 1]) != 0)
     multiple.erase(multiple.size() - 1, 1);
 
   // delete spaces around '|'
index eaf7063c2e1b3821b67b56b25f1b589cb4e714e0..1b4fbede05dcde5bf54e7a6ce9cd80fcefaa189f 100644 (file)
@@ -548,7 +548,7 @@ namespace Patterns
     std::string tmp(sequence);
 
     // remove whitespace at beginning
-    while ((tmp.length() != 0) && (std::isspace(tmp[0])))
+    while ((tmp.length() != 0) && ((std::isspace(tmp[0])) != 0))
       tmp.erase(0, 1);
 
     // check the different possibilities
@@ -561,7 +561,7 @@ namespace Patterns
       }
 
     // remove whitespace at the end
-    while ((tmp.length() != 0) && (std::isspace(*(tmp.end() - 1))))
+    while ((tmp.length() != 0) && ((std::isspace(*(tmp.end() - 1))) != 0))
       tmp.erase(tmp.end() - 1);
 
     // check last choice, not finished by |
@@ -1272,9 +1272,9 @@ namespace Patterns
         else
           tmp = "";
 
-        while ((name.length() != 0) && (std::isspace(name[0])))
+        while ((name.length() != 0) && ((std::isspace(name[0])) != 0))
           name.erase(0, 1);
-        while (std::isspace(name[name.length() - 1]))
+        while (std::isspace(name[name.length() - 1]) != 0)
           name.erase(name.length() - 1, 1);
 
         split_names.push_back(name);
index 5344e007fcd17f2fa13bf05e79f769ba4b06d8c4..85ce6dea469886c7cad98411548a9001d194fb09 100644 (file)
@@ -1391,11 +1391,13 @@ QProjector<dim>::DataSetDescriptor::face(const ReferenceCell reference_cell,
       reference_cell == ReferenceCells::Tetrahedron)
     {
       if (dim == 2)
-        return {(2 * face_no + face_orientation) * n_quadrature_points};
+        return {(2 * face_no + (face_orientation ? 1 : 0)) *
+                n_quadrature_points};
       else if (dim == 3)
         {
-          const unsigned int orientation =
-            (face_flip * 2 + face_rotation) * 2 + face_orientation;
+          const unsigned int orientation = (face_flip ? 4 : 0) +
+                                           (face_rotation ? 2 : 0) +
+                                           (face_orientation ? 1 : 0);
           return {(6 * face_no + orientation) * n_quadrature_points};
         }
     }
@@ -1509,8 +1511,9 @@ QProjector<dim>::DataSetDescriptor::face(
                   quadrature[quadrature.size() == 1 ? 0 : face_no].size()};
       else if (dim == 3)
         {
-          const unsigned int orientation =
-            (face_flip * 2 + face_rotation) * 2 + face_orientation;
+          const unsigned int orientation = (face_flip ? 4 : 0) +
+                                           (face_rotation ? 2 : 0) +
+                                           (face_orientation ? 1 : 0);
 
           return {offset +
                   orientation *
index b62bf9b315ac1307949a7cf5fd8b6dc9d626d659..61aecfadda0e6b325ab553fc7a10c2ed8bbc9f0a 100644 (file)
@@ -254,7 +254,7 @@ TableHandler::add_column_to_supercolumn(const std::string &key,
 {
   Assert(columns.count(key), ExcColumnNotExistent(key));
 
-  if (!supercolumns.count(superkey))
+  if (supercolumns.count(superkey) == 0u)
     {
       std::pair<std::string, std::vector<std::string>> new_column(
         superkey, std::vector<std::string>());
@@ -277,7 +277,7 @@ TableHandler::add_column_to_supercolumn(const std::string &key,
         column_order.erase(order_iter);
     }
 
-  if (supercolumns.count(superkey))
+  if (supercolumns.count(superkey) != 0u)
     {
       supercolumns[superkey].push_back(key);
       // By default set the
index 9721503193eabd359438572ed7d8aad30fd3b8da..3d2237f094d5f1f37b0fad5f6a08c02feb3465f9 100644 (file)
@@ -535,7 +535,7 @@ namespace Utilities
 
     for (; left < input.size(); ++left)
       {
-        if (!std::isspace(input[left]))
+        if (std::isspace(input[left]) == 0)
           {
             break;
           }
@@ -543,7 +543,7 @@ namespace Utilities
 
     for (; right >= left; --right)
       {
-        if (!std::isspace(input[right]))
+        if (std::isspace(input[right]) == 0)
           {
             break;
           }
index ed8766a55f721577cee1bf89468e36847d138922..5c8a006b2162d38e8d7ec1078443eb3621b75a43 100644 (file)
@@ -73,8 +73,9 @@ namespace parallel
       settings = construction_data.settings;
 
       // set the smoothing properties
-      if (settings &
-          TriangulationDescription::Settings::construct_multigrid_hierarchy)
+      if ((settings &
+           TriangulationDescription::Settings::construct_multigrid_hierarchy) !=
+          0)
         this->set_mesh_smoothing(
           static_cast<
             typename dealii::Triangulation<dim, spacedim>::MeshSmoothing>(
@@ -202,8 +203,8 @@ namespace parallel
                     cell->set_subdomain_id(cell_info->subdomain_id);
 
                   // level subdomain id
-                  if (settings & TriangulationDescription::Settings::
-                                   construct_multigrid_hierarchy)
+                  if ((settings & TriangulationDescription::Settings::
+                                    construct_multigrid_hierarchy) != 0)
                     cell->set_level_subdomain_id(cell_info->level_subdomain_id);
                 }
             }
@@ -404,9 +405,8 @@ namespace parallel
     bool
     Triangulation<dim, spacedim>::is_multilevel_hierarchy_constructed() const
     {
-      return (
-        settings &
-        TriangulationDescription::Settings::construct_multigrid_hierarchy);
+      return (settings & TriangulationDescription::Settings::
+                           construct_multigrid_hierarchy) != 0;
     }
 
 
index c66a0fbfdf9fc82692682ec56ae61d2a60f83088..39f76f1e9f1026fb6ccca90791c4c59cc3a294c2 100644 (file)
@@ -1342,7 +1342,7 @@ namespace
     // if there are no more cells in our list the current cell can't be
     // flagged for refinement
     if (this_object->current_refine_pointer == this_object->refine_list.end())
-      return false;
+      return 0;
 
     Assert(coarse_cell_index <=
              this_object->current_refine_pointer->p.which_tree,
@@ -1351,7 +1351,7 @@ namespace
     // if p4est hasn't yet reached the tree of the next flagged cell the
     // current cell can't be flagged for refinement
     if (coarse_cell_index < this_object->current_refine_pointer->p.which_tree)
-      return false;
+      return 0;
 
     // now we're in the right tree in the forest
     Assert(coarse_cell_index <=
@@ -1369,11 +1369,11 @@ namespace
           quadrant, &*this_object->current_refine_pointer))
       {
         ++this_object->current_refine_pointer;
-        return true;
+        return 1;
       }
 
     // p4est cell is not in list
-    return false;
+    return 0;
   }
 
 
@@ -1392,7 +1392,7 @@ namespace
     // if there are no more cells in our list the current cell can't be
     // flagged for coarsening
     if (this_object->current_coarsen_pointer == this_object->coarsen_list.end())
-      return false;
+      return 0;
 
     Assert(coarse_cell_index <=
              this_object->current_coarsen_pointer->p.which_tree,
@@ -1401,7 +1401,7 @@ namespace
     // if p4est hasn't yet reached the tree of the next flagged cell the
     // current cell can't be flagged for coarsening
     if (coarse_cell_index < this_object->current_coarsen_pointer->p.which_tree)
-      return false;
+      return 0;
 
     // now we're in the right tree in the forest
     Assert(coarse_cell_index <=
@@ -1433,11 +1433,11 @@ namespace
             ++this_object->current_coarsen_pointer;
           }
 
-        return true;
+        return 1;
       }
 
     // p4est cell is not in list
-    return false;
+    return 0;
   }
 
 
index e58b252a73a7e906f34f6ea83a801b39179c4316..1ead74729e1370ee5890353699c42dfe01f99f53 100644 (file)
@@ -609,11 +609,11 @@ FiniteElement<dim, spacedim>::face_to_cell_index(const unsigned int face_index,
 
       // then get the number of this vertex on the cell and translate
       // this to a DoF number on the cell
-      return (this->reference_cell().face_to_cell_vertices(face,
-                                                           face_vertex,
-                                                           face_orientation +
-                                                             2 * face_rotation +
-                                                             4 * face_flip) *
+      return (this->reference_cell().face_to_cell_vertices(
+                face,
+                face_vertex,
+                (face_orientation ? 1 : 0) + (face_rotation ? 2 : 0) +
+                  (face_flip ? 4 : 0)) *
                 this->n_dofs_per_vertex() +
               dof_index_on_vertex);
     }
@@ -628,14 +628,15 @@ FiniteElement<dim, spacedim>::face_to_cell_index(const unsigned int face_index,
       const unsigned int face_line         = index / this->n_dofs_per_line();
       const unsigned int dof_index_on_line = index % this->n_dofs_per_line();
 
-      return (this->get_first_line_index() +
-              this->reference_cell().face_to_cell_lines(face,
-                                                        face_line,
-                                                        face_orientation +
-                                                          2 * face_rotation +
-                                                          4 * face_flip) *
-                this->n_dofs_per_line() +
-              dof_index_on_line);
+      return (
+        this->get_first_line_index() +
+        this->reference_cell().face_to_cell_lines(face,
+                                                  face_line,
+                                                  (face_orientation ? 1 : 0) +
+                                                    (face_rotation ? 2 : 0) +
+                                                    (face_flip ? 4 : 0)) *
+          this->n_dofs_per_line() +
+        dof_index_on_line);
     }
   else
     // DoF is on a quad
@@ -689,8 +690,10 @@ FiniteElement<dim, spacedim>::adjust_quad_dof_index_for_face_orientation(
          ExcInternalError());
   return index +
          adjust_quad_dof_index_for_face_orientation_table
-           [this->n_unique_quads() == 1 ? 0 : face](
-             index, 4 * face_orientation + 2 * face_flip + face_rotation);
+           [this->n_unique_quads() == 1 ? 0 : face](index,
+                                                    (face_orientation ? 4 : 0) +
+                                                      (face_flip ? 2 : 0) +
+                                                      (face_rotation ? 1 : 0));
 }
 
 
index 1505510170cacb7c90bc6540a1bfe64e25ed428c..2ce83530c66b3457ef9055310c5d96424d51d0d6 100644 (file)
@@ -262,7 +262,7 @@ FE_DGPNonparametric<dim, spacedim>::requires_update_flags(
 {
   UpdateFlags out = flags;
 
-  if (flags & (update_values | update_gradients | update_hessians))
+  if ((flags & (update_values | update_gradients | update_hessians)) != 0u)
     out |= update_quadrature_points;
 
   return out;
index 707168479fa7a0edc3ca807f7ec106642e44a028..3298acc8c7df68201eb88ffa7e6d8ec66cf8f038 100644 (file)
@@ -305,11 +305,11 @@ FE_Enriched<dim, spacedim>::requires_update_flags(const UpdateFlags flags) const
   if (is_enriched)
     {
       // if we ask for values or gradients, then we would need quadrature points
-      if (flags & (update_values | update_gradients))
+      if ((flags & (update_values | update_gradients)) != 0u)
         out |= update_quadrature_points;
 
       // if need gradients, add update_values due to product rule
-      if (out & update_gradients)
+      if ((out & update_gradients) != 0u)
         out |= update_values;
     }
 
index dd66427daa16ad85f026ade880f99c01d2882590..bed160f792f58244f9ae7d860326cfeb64a7efc9 100644 (file)
@@ -677,11 +677,11 @@ UpdateFlags
 FE_FaceQ<1, spacedim>::requires_update_flags(const UpdateFlags flags) const
 {
   UpdateFlags out = flags & update_values;
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     out |= update_gradients | update_covariant_transformation;
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     out |= update_hessians | update_covariant_transformation;
-  if (flags & update_normal_vectors)
+  if ((flags & update_normal_vectors) != 0u)
     out |= update_normal_vectors | update_JxW_values;
 
   return out;
@@ -956,7 +956,7 @@ FE_FaceP<dim, spacedim>::get_subface_interpolation_matrix(
           for (unsigned int k = 0; k < face_quadrature.size(); ++k)
             {
               const Point<dim - 1> p =
-                numbers::invalid_unsigned_int ?
+                numbers::invalid_unsigned_int != 0u ?
                   face_quadrature.point(k) :
                   GeometryInfo<dim - 1>::child_to_cell_coordinates(
                     face_quadrature.point(k), subface);
index 32e141c3419a003868c7502a02af0f440599f279..3e80a4103569bba8e764dbce0fe922bf0199a92c 100644 (file)
@@ -165,20 +165,20 @@ FE_NedelecSZ<dim, spacedim>::get_data(
                                 vertices_per_cell, std::vector<double>(dim)));
 
   // Resize shape function arrays according to update flags:
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     {
       data.shape_values.resize(this->n_dofs_per_cell(),
                                std::vector<Tensor<1, dim>>(n_q_points));
     }
 
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     {
       data.shape_grads.resize(this->n_dofs_per_cell(),
                               std::vector<DerivativeForm<1, dim, dim>>(
                                 n_q_points));
     }
   // Not implementing second derivatives yet:
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     {
       Assert(false, ExcNotImplemented());
     }
@@ -401,7 +401,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
             cell_type2_offset + degree * degree;
           const unsigned int cell_type3_offset2 = cell_type3_offset1 + degree;
 
-          if (flags & (update_values | update_gradients))
+          if ((flags & (update_values | update_gradients)) != 0u)
             {
               // compute all points we must evaluate the 1d polynomials at:
               std::vector<Point<dim>> cell_points(n_q_points);
@@ -429,7 +429,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
                   // Note that this will need to be updated if we're supporting
                   // update_hessians.
                   const unsigned int poly_length(
-                    (flags & update_gradients) ? 3 : 2);
+                    (flags & update_gradients) != 0u ? 3 : 2);
 
                   std::vector<std::vector<double>> polyx(
                     degree, std::vector<double>(poly_length));
@@ -446,7 +446,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
                         cell_points[q][1], polyy[i]);
                     }
                   // Now use these to compute the shape functions:
-                  if (flags & update_values)
+                  if ((flags & update_values) != 0u)
                     {
                       for (unsigned int j = 0; j < degree; ++j)
                         {
@@ -483,7 +483,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
                           data.shape_values[dof_index3_2][q][1] = polyx[j][0];
                         }
                     }
-                  if (flags & update_gradients)
+                  if ((flags & update_gradients) != 0u)
                     {
                       for (unsigned int j = 0; j < degree; ++j)
                         {
@@ -799,7 +799,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
 
               // for cell-based shape functions:
               // these don't depend on the cell, so can precompute all here:
-              if (flags & (update_values | update_gradients))
+              if ((flags & (update_values | update_gradients)) != 0u)
                 {
                   // Cell-based shape functions:
                   //
@@ -855,7 +855,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
                   // only need poly values and 1st derivative for update_values,
                   // but need 2nd derivative too for update_gradients.
                   const unsigned int poly_length(
-                    (flags & update_gradients) ? 3 : 2);
+                    (flags & update_gradients) != 0u ? 3 : 2);
                   // Loop through quad points:
                   for (unsigned int q = 0; q < n_q_points; ++q)
                     {
@@ -882,7 +882,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
                             cell_points[q][2], polyz[i]);
                         }
                       // Now use these to compute the shape functions:
-                      if (flags & update_values)
+                      if ((flags & update_values) != 0u)
                         {
                           for (unsigned int k = 0; k < degree; ++k)
                             {
@@ -965,7 +965,7 @@ FE_NedelecSZ<dim, spacedim>::get_data(
                                 }
                             }
                         }
-                      if (flags & update_gradients)
+                      if ((flags & update_gradients) != 0u)
                         {
                           for (unsigned int k = 0; k < degree; ++k)
                             {
@@ -1155,7 +1155,7 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
     {
       case 2:
         {
-          if (flags & (update_values | update_gradients))
+          if ((flags & (update_values | update_gradients)) != 0u)
             {
               // Define an edge numbering so that each edge, E_{m} = [e^{m}_{1},
               // e^{m}_{2}] e1 = higher global numbering of the two local
@@ -1248,8 +1248,8 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
               // If we want to generate shape gradients then we need second
               // derivatives of the 1d polynomials, but only first derivatives
               // for the shape values.
-              const unsigned int poly_length((flags & update_gradients) ? 3 :
-                                                                          2);
+              const unsigned int poly_length(
+                (flags & update_gradients) != 0u ? 3 : 2);
 
               for (unsigned int m = 0; m < lines_per_cell; ++m)
                 {
@@ -1267,7 +1267,7 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
                           IntegratedLegendrePolynomials[i + 1].value(
                             edge_sigma_values[m][q], poly[i - 1]);
                         }
-                      if (flags & update_values)
+                      if ((flags & update_values) != 0u)
                         {
                           // Lowest order edge shape functions:
                           for (unsigned int d = 0; d < dim; ++d)
@@ -1292,7 +1292,7 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
                                 }
                             }
                         }
-                      if (flags & update_gradients)
+                      if ((flags & update_gradients) != 0u)
                         {
                           // Lowest order edge shape functions:
                           for (unsigned int d1 = 0; d1 < dim; ++d1)
@@ -1340,7 +1340,7 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
         }
       case 3:
         {
-          if (flags & (update_values | update_gradients))
+          if ((flags & (update_values | update_gradients)) != 0u)
             {
               // Define an edge numbering so that each edge, E_{m} = [e^{m}_{1},
               // e^{m}_{2}] e1 = higher global numbering of the two local
@@ -1436,8 +1436,8 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
               // If we want to generate shape gradients then we need second
               // derivatives of the 1d polynomials, but only first derivatives
               // for the shape values.
-              const unsigned int poly_length((flags & update_gradients) ? 3 :
-                                                                          2);
+              const unsigned int poly_length(
+                (flags & update_gradients) != 0u ? 3 : 2);
               std::vector<std::vector<double>> poly(
                 degree, std::vector<double>(poly_length));
               for (unsigned int m = 0; m < lines_per_cell; ++m)
@@ -1454,7 +1454,7 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
                                 edge_sigma_values[m][q], poly[i]);
                             }
                         }
-                      if (flags & update_values)
+                      if ((flags & update_values) != 0u)
                         {
                           // Lowest order shape functions:
                           for (unsigned int d = 0; d < dim; ++d)
@@ -1478,7 +1478,7 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
                                 }
                             }
                         }
-                      if (flags & update_gradients)
+                      if ((flags & update_gradients) != 0u)
                         {
                           // Lowest order shape functions:
                           for (unsigned int d1 = 0; d1 < dim; ++d1)
@@ -1562,7 +1562,7 @@ FE_NedelecSZ<dim, spacedim>::fill_face_values(
     {
       const UpdateFlags flags(fe_data.update_each);
 
-      if (flags & (update_values | update_gradients))
+      if ((flags & (update_values | update_gradients)) != 0u)
         {
           const unsigned int n_q_points = quadrature.size();
 
@@ -1688,7 +1688,8 @@ FE_NedelecSZ<dim, spacedim>::fill_face_values(
                 }
             }
           // Now can generate the basis
-          const unsigned int poly_length((flags & update_gradients) ? 3 : 2);
+          const unsigned int poly_length((flags & update_gradients) != 0u ? 3 :
+                                                                            2);
           std::vector<std::vector<double>> polyxi(
             degree, std::vector<double>(poly_length));
           std::vector<std::vector<double>> polyeta(
@@ -1752,7 +1753,7 @@ FE_NedelecSZ<dim, spacedim>::fill_face_values(
                         face_eta_values[m][q], polyeta[i]);
                     }
                   // Now use these to compute the shape functions:
-                  if (flags & update_values)
+                  if ((flags & update_values) != 0u)
                     {
                       for (unsigned int j = 0; j < degree; ++j)
                         {
@@ -1804,7 +1805,7 @@ FE_NedelecSZ<dim, spacedim>::fill_face_values(
                             }
                         }
                     }
-                  if (flags & update_gradients)
+                  if ((flags & update_gradients) != 0u)
                     {
                       for (unsigned int j = 0; j < degree; ++j)
                         {
@@ -1901,7 +1902,7 @@ FE_NedelecSZ<dim, spacedim>::fill_face_values(
                 }
             }
         }
-      if (flags & update_hessians)
+      if ((flags & update_hessians) != 0u)
         {
           Assert(false, ExcNotImplemented());
         }
@@ -1949,7 +1950,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_values(
            fe_data.shape_values[0].size() == n_q_points,
          ExcDimensionMismatch(fe_data.shape_values[0].size(), n_q_points));
 
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     {
       // Now have all shape_values stored on the reference cell.
       // Must now transform to the physical cell.
@@ -1975,7 +1976,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_values(
             }
         }
     }
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     {
       // Now have all shape_grads stored on the reference cell.
       // Must now transform to the physical cell.
@@ -2082,7 +2083,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_face_values(
                                              cell->face_rotation(face_no),
                                              n_q_points);
 
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     {
       // Now have all shape_values stored on the reference cell.
       // Must now transform to the physical cell.
@@ -2111,7 +2112,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_face_values(
             }
         }
     }
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     {
       // Now have all shape_grads stored on the reference cell.
       // Must now transform to the physical cell.
@@ -2187,15 +2188,15 @@ FE_NedelecSZ<dim, spacedim>::requires_update_flags(
 {
   UpdateFlags out = update_default;
 
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     out |= update_values | update_covariant_transformation;
 
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     out |= update_gradients | update_values |
            update_jacobian_pushed_forward_grads |
            update_covariant_transformation;
 
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     //     Assert (false, ExcNotImplemented());
     out |= update_hessians | update_values | update_gradients |
            update_jacobian_pushed_forward_grads |
index e3033db0569329daf6c71ccea104ebde0e6ae2a4..efaab811001b827cc0eca0717c8921eac82ba35f 100644 (file)
@@ -51,13 +51,13 @@ FE_P1NC::requires_update_flags(const UpdateFlags flags) const
 {
   UpdateFlags out = update_default;
 
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     out |= update_values | update_quadrature_points;
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     out |= update_gradients;
-  if (flags & update_normal_vectors)
+  if ((flags & update_normal_vectors) != 0u)
     out |= update_normal_vectors | update_JxW_values;
-  if (flags & update_hessians)
+  if ((flags & update_hessians) != 0u)
     out |= update_hessians;
 
   return out;
@@ -148,7 +148,7 @@ FE_P1NC::get_data(
   output_data.initialize(n_q_points, FE_P1NC(), data_ptr->update_each);
 
   // this is a linear element, so its second derivatives are zero
-  if (data_ptr->update_each & update_hessians)
+  if ((data_ptr->update_each & update_hessians) != 0u)
     output_data.shape_hessians.fill(Tensor<2, 2>());
 
   return data_ptr;
@@ -174,7 +174,7 @@ FE_P1NC::get_face_data(
   output_data.initialize(n_q_points, FE_P1NC(), data_ptr->update_each);
 
   // this is a linear element, so its second derivatives are zero
-  if (data_ptr->update_each & update_hessians)
+  if ((data_ptr->update_each & update_hessians) != 0u)
     output_data.shape_hessians.fill(Tensor<2, 2>());
 
   return data_ptr;
@@ -198,7 +198,7 @@ FE_P1NC::get_subface_data(
   output_data.initialize(n_q_points, FE_P1NC(), data_ptr->update_each);
 
   // this is a linear element, so its second derivatives are zero
-  if (data_ptr->update_each & update_hessians)
+  if ((data_ptr->update_each & update_hessians) != 0u)
     output_data.shape_hessians.fill(Tensor<2, 2>());
 
   return data_ptr;
@@ -227,14 +227,14 @@ FE_P1NC::fill_fe_values(
   ndarray<double, 4, 3> coeffs = get_linear_shape_coefficients(cell);
 
   // compute on the cell
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     for (unsigned int i = 0; i < n_q_points; ++i)
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_values[k][i] =
           (coeffs[k][0] * mapping_data.quadrature_points[i](0) +
            coeffs[k][1] * mapping_data.quadrature_points[i](1) + coeffs[k][2]);
 
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     for (unsigned int i = 0; i < n_q_points; ++i)
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_gradients[k][i] =
@@ -268,7 +268,7 @@ FE_P1NC::fill_fe_face_values(
                                    quadrature[0],
                                    face_no);
 
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         {
@@ -281,7 +281,7 @@ FE_P1NC::fill_fe_face_values(
              coeffs[k][1] * quadrature_point(1) + coeffs[k][2]);
         }
 
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_gradients[k][i] =
@@ -312,7 +312,7 @@ FE_P1NC::fill_fe_subface_values(
   const Quadrature<2> quadrature_on_subface = QProjector<2>::project_to_subface(
     this->reference_cell(), quadrature, face_no, sub_no);
 
-  if (flags & update_values)
+  if ((flags & update_values) != 0u)
     for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
       {
         for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
@@ -327,7 +327,7 @@ FE_P1NC::fill_fe_subface_values(
           }
       }
 
-  if (flags & update_gradients)
+  if ((flags & update_gradients) != 0u)
     for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
       for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_gradients[k][i] =
index ca8179d4722ea28de43330c6bd9f49e7a0549bfe..f09ff7d157391e6cc84150cc5fc8ce7ac3bfb5ef 100644 (file)
@@ -267,9 +267,10 @@ FE_PolyTensor<dim, spacedim>::adjust_quad_dof_sign_for_face_orientation(
          ExcInternalError());
 
   return adjust_quad_dof_sign_for_face_orientation_table
-    [this->n_unique_quads() == 1 ? 0 : face](index,
-                                             4 * face_orientation +
-                                               2 * face_flip + face_rotation);
+    [this->n_unique_quads() == 1 ? 0 : face](
+      index,
+      4 * static_cast<int>(face_orientation) + 2 * static_cast<int>(face_flip) +
+        static_cast<int>(face_rotation));
 }
 
 
@@ -2424,14 +2425,14 @@ FE_PolyTensor<dim, spacedim>::requires_update_flags(
         {
           case mapping_none:
             {
-              if (flags & update_values)
+              if ((flags & update_values) != 0u)
                 out |= update_values;
 
-              if (flags & update_gradients)
+              if ((flags & update_gradients) != 0u)
                 out |= update_gradients | update_values |
                        update_jacobian_pushed_forward_grads;
 
-              if (flags & update_hessians)
+              if ((flags & update_hessians) != 0u)
                 out |= update_hessians | update_values | update_gradients |
                        update_jacobian_pushed_forward_grads |
                        update_jacobian_pushed_forward_2nd_derivatives;
@@ -2440,16 +2441,16 @@ FE_PolyTensor<dim, spacedim>::requires_update_flags(
           case mapping_raviart_thomas:
           case mapping_piola:
             {
-              if (flags & update_values)
+              if ((flags & update_values) != 0u)
                 out |= update_values | update_piola;
 
-              if (flags & update_gradients)
+              if ((flags & update_gradients) != 0u)
                 out |= update_gradients | update_values | update_piola |
                        update_jacobian_pushed_forward_grads |
                        update_covariant_transformation |
                        update_contravariant_transformation;
 
-              if (flags & update_hessians)
+              if ((flags & update_hessians) != 0u)
                 out |= update_hessians | update_piola | update_values |
                        update_gradients | update_jacobian_pushed_forward_grads |
                        update_jacobian_pushed_forward_2nd_derivatives |
@@ -2461,16 +2462,16 @@ FE_PolyTensor<dim, spacedim>::requires_update_flags(
 
           case mapping_contravariant:
             {
-              if (flags & update_values)
+              if ((flags & update_values) != 0u)
                 out |= update_values | update_piola;
 
-              if (flags & update_gradients)
+              if ((flags & update_gradients) != 0u)
                 out |= update_gradients | update_values |
                        update_jacobian_pushed_forward_grads |
                        update_covariant_transformation |
                        update_contravariant_transformation;
 
-              if (flags & update_hessians)
+              if ((flags & update_hessians) != 0u)
                 out |= update_hessians | update_piola | update_values |
                        update_gradients | update_jacobian_pushed_forward_grads |
                        update_jacobian_pushed_forward_2nd_derivatives |
@@ -2482,15 +2483,15 @@ FE_PolyTensor<dim, spacedim>::requires_update_flags(
           case mapping_nedelec:
           case mapping_covariant:
             {
-              if (flags & update_values)
+              if ((flags & update_values) != 0u)
                 out |= update_values | update_covariant_transformation;
 
-              if (flags & update_gradients)
+              if ((flags & update_gradients) != 0u)
                 out |= update_gradients | update_values |
                        update_jacobian_pushed_forward_grads |
                        update_covariant_transformation;
 
-              if (flags & update_hessians)
+              if ((flags & update_hessians) != 0u)
                 out |= update_hessians | update_values | update_gradients |
                        update_jacobian_pushed_forward_grads |
                        update_jacobian_pushed_forward_2nd_derivatives |
index 30f8568a43457ff48456f4b041970fe5574be225..da980aa82c8b6a21fa3d16052decfa531652e905 100644 (file)
@@ -1094,7 +1094,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                           factorial_ij *= j - i;
                           factorial_j *= j;
 
-                          if ((i + j) & 1)
+                          if (((i + j) & 1) != 0u)
                             interpolation_matrix(i, j) =
                               -1.0 * std::pow(0.5, j) * factorial_j /
                               (factorial_i * factorial_ij);
@@ -1237,7 +1237,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                               factorial_kl *= k - j;
                               factorial_l *= k;
 
-                              if ((j + k) & 1)
+                              if (((j + k) & 1) != 0u)
                                 interpolation_matrix(
                                   i + (j + 2) * source_fe.degree - j,
                                   i + (k + 2) * this->degree - k) =
@@ -1262,7 +1262,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                           factorial_ij *= j - i;
                           factorial_j *= j;
 
-                          if ((i + j) & 1)
+                          if (((i + j) & 1) != 0u)
                             {
                               tmp = -1.0 * std::pow(0.5, j) * factorial_j /
                                     (factorial_i * factorial_ij);
@@ -1288,7 +1288,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                                       factorial_kl *= l - k;
                                       factorial_l *= l;
 
-                                      if ((k + l) & 1)
+                                      if (((k + l) & 1) != 0u)
                                         interpolation_matrix(
                                           i + (k + 2) * source_fe.degree - k,
                                           j + (l + 2) * this->degree - l) =
@@ -1354,7 +1354,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                                       factorial_kl *= l - k;
                                       factorial_l *= l;
 
-                                      if ((k + l) & 1)
+                                      if (((k + l) & 1) != 0u)
                                         interpolation_matrix(
                                           i + (k + 2) * source_fe.degree - k,
                                           j + (l + 2) * this->degree - l) =
@@ -1495,7 +1495,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                                   factorial_kl *= l - k;
                                   factorial_l *= l;
 
-                                  if ((k + l) & 1)
+                                  if (((k + l) & 1) != 0u)
                                     interpolation_matrix(
                                       i + (k + 2) * source_fe.degree - k,
                                       j + (l + 2) * this->degree - l) =
@@ -1528,7 +1528,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                           interpolation_matrix(i + 3 * source_fe.degree - 1,
                                                j + 3 * this->degree - 1) = tmp;
 
-                          if ((i + j) & 1)
+                          if (((i + j) & 1) != 0u)
                             tmp *= -1.0;
 
                           interpolation_matrix(i + 2, j + 2) = tmp;
@@ -1565,7 +1565,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                               factorial_kl *= k - j;
                               factorial_l *= k;
 
-                              if ((j + k) & 1)
+                              if (((j + k) & 1) != 0u)
                                 interpolation_matrix(
                                   i + (j + 2) * source_fe.degree - j,
                                   i + (k + 2) * this->degree - k) =
@@ -1701,7 +1701,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
                           interpolation_matrix(i + source_fe.degree + 1,
                                                j + this->degree + 1) = tmp;
 
-                          if ((i + j) & 1)
+                          if (((i + j) & 1) != 0u)
                             tmp *= -1.0;
 
                           interpolation_matrix(i + 2 * source_fe.degree,
index e50998897ca0ee9fe07d0e91a0d6629bac59412f..c105825f55e3a1c990a1df1fd44d045408bcbccc 100644 (file)
@@ -135,7 +135,7 @@ FESystem<dim, spacedim>::FESystem(const FiniteElement<dim, spacedim> &fe1,
                                                                   &fe2,
                                                                   n2),
       FETools::Compositing::compute_nonzero_components(&fe1, n1, &fe2, n2))
-  , base_elements((n1 > 0) + (n2 > 0))
+  , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0))
 {
   std::vector<const FiniteElement<dim, spacedim> *> fes;
   fes.push_back(&fe1);
@@ -169,7 +169,8 @@ FESystem<dim, spacedim>::FESystem(const FiniteElement<dim, spacedim> &fe1,
                                                        n2,
                                                        &fe3,
                                                        n3))
-  , base_elements((n1 > 0) + (n2 > 0) + (n3 > 0))
+  , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
+                  static_cast<int>(n3 > 0))
 {
   std::vector<const FiniteElement<dim, spacedim> *> fes;
   fes.push_back(&fe1);
@@ -218,7 +219,8 @@ FESystem<dim, spacedim>::FESystem(const FiniteElement<dim, spacedim> &fe1,
                                                        n3,
                                                        &fe4,
                                                        n4))
-  , base_elements((n1 > 0) + (n2 > 0) + (n3 > 0) + (n4 > 0))
+  , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
+                  static_cast<int>(n3 > 0) + static_cast<int>(n4 > 0))
 {
   std::vector<const FiniteElement<dim, spacedim> *> fes;
   fes.push_back(&fe1);
@@ -269,7 +271,9 @@ FESystem<dim, spacedim>::FESystem(const FiniteElement<dim, spacedim> &fe1,
                                                        n4,
                                                        &fe5,
                                                        n5))
-  , base_elements((n1 > 0) + (n2 > 0) + (n3 > 0) + (n4 > 0) + (n5 > 0))
+  , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
+                  static_cast<int>(n3 > 0) + static_cast<int>(n4 > 0) +
+                  static_cast<int>(n5 > 0))
 {
   std::vector<const FiniteElement<dim, spacedim> *> fes;
   fes.push_back(&fe1);
index 7f555928cd8397d11ffd295d9ee8fa41c5ace95f..202e423e1fefd73a22f18b81658eef3c1a934348 100644 (file)
@@ -2705,55 +2705,55 @@ namespace internal
       const unsigned int n_quadrature_points,
       const UpdateFlags  flags)
     {
-      if (flags & update_quadrature_points)
+      if ((flags & update_quadrature_points) != 0u)
         this->quadrature_points.resize(
           n_quadrature_points,
           Point<spacedim>(numbers::signaling_nan<Tensor<1, spacedim>>()));
 
-      if (flags & update_JxW_values)
+      if ((flags & update_JxW_values) != 0u)
         this->JxW_values.resize(n_quadrature_points,
                                 numbers::signaling_nan<double>());
 
-      if (flags & update_jacobians)
+      if ((flags & update_jacobians) != 0u)
         this->jacobians.resize(
           n_quadrature_points,
           numbers::signaling_nan<DerivativeForm<1, dim, spacedim>>());
 
-      if (flags & update_jacobian_grads)
+      if ((flags & update_jacobian_grads) != 0u)
         this->jacobian_grads.resize(
           n_quadrature_points,
           numbers::signaling_nan<DerivativeForm<2, dim, spacedim>>());
 
-      if (flags & update_jacobian_pushed_forward_grads)
+      if ((flags & update_jacobian_pushed_forward_grads) != 0u)
         this->jacobian_pushed_forward_grads.resize(
           n_quadrature_points, numbers::signaling_nan<Tensor<3, spacedim>>());
 
-      if (flags & update_jacobian_2nd_derivatives)
+      if ((flags & update_jacobian_2nd_derivatives) != 0u)
         this->jacobian_2nd_derivatives.resize(
           n_quadrature_points,
           numbers::signaling_nan<DerivativeForm<3, dim, spacedim>>());
 
-      if (flags & update_jacobian_pushed_forward_2nd_derivatives)
+      if ((flags & update_jacobian_pushed_forward_2nd_derivatives) != 0u)
         this->jacobian_pushed_forward_2nd_derivatives.resize(
           n_quadrature_points, numbers::signaling_nan<Tensor<4, spacedim>>());
 
-      if (flags & update_jacobian_3rd_derivatives)
+      if ((flags & update_jacobian_3rd_derivatives) != 0u)
         this->jacobian_3rd_derivatives.resize(n_quadrature_points);
 
-      if (flags & update_jacobian_pushed_forward_3rd_derivatives)
+      if ((flags & update_jacobian_pushed_forward_3rd_derivatives) != 0u)
         this->jacobian_pushed_forward_3rd_derivatives.resize(
           n_quadrature_points, numbers::signaling_nan<Tensor<5, spacedim>>());
 
-      if (flags & update_inverse_jacobians)
+      if ((flags & update_inverse_jacobians) != 0u)
         this->inverse_jacobians.resize(
           n_quadrature_points,
           numbers::signaling_nan<DerivativeForm<1, spacedim, dim>>());
 
-      if (flags & update_boundary_forms)
+      if ((flags & update_boundary_forms) != 0u)
         this->boundary_forms.resize(
           n_quadrature_points, numbers::signaling_nan<Tensor<1, spacedim>>());
 
-      if (flags & update_normal_vectors)
+      if ((flags & update_normal_vectors) != 0u)
         this->normal_vectors.resize(
           n_quadrature_points, numbers::signaling_nan<Tensor<1, spacedim>>());
     }
@@ -2806,14 +2806,14 @@ namespace internal
 
       // with the number of rows now known, initialize those fields
       // that we will need to their correct size
-      if (flags & update_values)
+      if ((flags & update_values) != 0u)
         {
           this->shape_values.reinit(n_nonzero_shape_components,
                                     n_quadrature_points);
           this->shape_values.fill(numbers::signaling_nan<double>());
         }
 
-      if (flags & update_gradients)
+      if ((flags & update_gradients) != 0u)
         {
           this->shape_gradients.reinit(n_nonzero_shape_components,
                                        n_quadrature_points);
@@ -2821,7 +2821,7 @@ namespace internal
             numbers::signaling_nan<Tensor<1, spacedim>>());
         }
 
-      if (flags & update_hessians)
+      if ((flags & update_hessians) != 0u)
         {
           this->shape_hessians.reinit(n_nonzero_shape_components,
                                       n_quadrature_points);
@@ -2829,7 +2829,7 @@ namespace internal
             numbers::signaling_nan<Tensor<2, spacedim>>());
         }
 
-      if (flags & update_3rd_derivatives)
+      if ((flags & update_3rd_derivatives) != 0u)
         {
           this->shape_3rd_derivatives.reinit(n_nonzero_shape_components,
                                              n_quadrature_points);
@@ -4235,7 +4235,7 @@ FEValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
   const UpdateFlags flags = this->compute_update_flags(update_flags);
 
   // initialize the base classes
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     this->mapping_output.initialize(this->max_n_quadrature_points, flags);
   this->finite_element_output.initialize(this->max_n_quadrature_points,
                                          *this->fe,
@@ -4255,7 +4255,7 @@ FEValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
   Threads::Task<
     std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
     mapping_get_data;
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     mapping_get_data = Threads::new_task(
       [&]() { return this->mapping->get_data(flags, quadrature); });
 
@@ -4263,7 +4263,7 @@ FEValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
 
   // then collect answers from the two task above
   this->fe_data = std::move(fe_get_data.return_value());
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     this->mapping_data = std::move(mapping_get_data.return_value());
   else
     this->mapping_data =
@@ -4515,7 +4515,7 @@ FEFaceValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
   const UpdateFlags flags = this->compute_update_flags(update_flags);
 
   // initialize the base classes
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     this->mapping_output.initialize(this->max_n_quadrature_points, flags);
   this->finite_element_output.initialize(this->max_n_quadrature_points,
                                          *this->fe,
@@ -4550,7 +4550,7 @@ FEFaceValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
   Threads::Task<
     std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
     mapping_get_data;
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     mapping_get_data = Threads::new_task(mapping_get_face_data,
                                          *this->mapping,
                                          flags,
@@ -4560,7 +4560,7 @@ FEFaceValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
 
   // then collect answers from the two task above
   this->fe_data = std::move(fe_get_data.return_value());
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     this->mapping_data = std::move(mapping_get_data.return_value());
   else
     this->mapping_data =
@@ -4753,7 +4753,7 @@ FESubfaceValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
   const UpdateFlags flags = this->compute_update_flags(update_flags);
 
   // initialize the base classes
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     this->mapping_output.initialize(this->max_n_quadrature_points, flags);
   this->finite_element_output.initialize(this->max_n_quadrature_points,
                                          *this->fe,
@@ -4774,7 +4774,7 @@ FESubfaceValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
   Threads::Task<
     std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
     mapping_get_data;
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     mapping_get_data =
       Threads::new_task(&Mapping<dim, spacedim>::get_subface_data,
                         *this->mapping,
@@ -4785,7 +4785,7 @@ FESubfaceValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
 
   // then collect answers from the two task above
   this->fe_data = std::move(fe_get_data.return_value());
-  if (flags & update_mapping)
+  if ((flags & update_mapping) != 0u)
     this->mapping_data = std::move(mapping_get_data.return_value());
   else
     this->mapping_data =
index 84cc8a3ddc5e4d121b6cd41d91ccc83365cfaad0..92fe6b954f55ffa00023ca5b0eb3f90f04ab5498 100644 (file)
@@ -98,7 +98,7 @@ MappingCartesian<dim, spacedim>::requires_update_flags(
   // since they can be computed from the normal vectors without much
   // further ado
   UpdateFlags out = in;
-  if (out & update_boundary_forms)
+  if ((out & update_boundary_forms) != 0u)
     out |= update_normal_vectors;
 
   return out;
index 7a19a1b6c3451671097966b9624749fe2ad5c52a..46ced412501a6f4db68d9370001b538c9c7bd34a 100644 (file)
@@ -1022,18 +1022,18 @@ MappingFE<dim, spacedim>::requires_update_flags(const UpdateFlags in) const
       // update_boundary_forms is simply
       // ignored for the interior of a
       // cell.
-      if (out & (update_JxW_values | update_normal_vectors))
+      if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
         out |= update_boundary_forms;
 
-      if (out & (update_covariant_transformation | update_JxW_values |
-                 update_jacobians | update_jacobian_grads |
-                 update_boundary_forms | update_normal_vectors))
+      if ((out & (update_covariant_transformation | update_JxW_values |
+                  update_jacobians | update_jacobian_grads |
+                  update_boundary_forms | update_normal_vectors)) != 0u)
         out |= update_contravariant_transformation;
 
-      if (out &
-          (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
-           update_jacobian_pushed_forward_2nd_derivatives |
-           update_jacobian_pushed_forward_3rd_derivatives))
+      if ((out &
+           (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+            update_jacobian_pushed_forward_2nd_derivatives |
+            update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
         out |= update_covariant_transformation;
 
       // The contravariant transformation is used in the Piola
@@ -1042,12 +1042,12 @@ MappingFE<dim, spacedim>::requires_update_flags(const UpdateFlags in) const
       // knowing here whether the finite element wants to use the
       // contravariant or the Piola transforms, we add the JxW values
       // to the list of flags to be updated for each cell.
-      if (out & update_contravariant_transformation)
+      if ((out & update_contravariant_transformation) != 0u)
         out |= update_volume_elements;
 
       // the same is true when computing normal vectors: they require
       // the determinant of the Jacobian
-      if (out & update_normal_vectors)
+      if ((out & update_normal_vectors) != 0u)
         out |= update_volume_elements;
     }
 
@@ -1211,7 +1211,7 @@ MappingFE<dim, spacedim>::fill_fe_values(
   // Multiply quadrature weights by absolute value of Jacobian determinants or
   // the area element g=sqrt(DX^t DX) in case of codim > 0
 
-  if (update_flags & (update_normal_vectors | update_JxW_values))
+  if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
     {
       AssertDimension(output_data.JxW_values.size(), n_q_points);
 
@@ -1263,12 +1263,12 @@ MappingFE<dim, spacedim>::fill_fe_values(
                     CellSimilarity::inverted_translation)
                   {
                     // we only need to flip the normal
-                    if (update_flags & update_normal_vectors)
+                    if ((update_flags & update_normal_vectors) != 0u)
                       output_data.normal_vectors[point] *= -1.;
                   }
                 else
                   {
-                    if (update_flags & update_normal_vectors)
+                    if ((update_flags & update_normal_vectors) != 0u)
                       {
                         Assert(spacedim == dim + 1,
                                ExcMessage(
@@ -1301,7 +1301,7 @@ MappingFE<dim, spacedim>::fill_fe_values(
 
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_jacobians)
+  if ((update_flags & update_jacobians) != 0u)
     {
       AssertDimension(output_data.jacobians.size(), n_q_points);
       if (computed_cell_similarity != CellSimilarity::translation)
@@ -1310,7 +1310,7 @@ MappingFE<dim, spacedim>::fill_fe_values(
     }
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_inverse_jacobians)
+  if ((update_flags & update_inverse_jacobians) != 0u)
     {
       AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
       if (computed_cell_similarity != CellSimilarity::translation)
index 38f04aae0b1332c9556c292493519e5fb8bd213a..ef86e2e1f7855127781f41bcc48b475ee87b4cab 100644 (file)
@@ -201,7 +201,7 @@ MappingFEField<dim, spacedim, VectorType, void>::MappingFEField(
   , uses_level_dofs(false)
   , euler_vector({&euler_vector})
   , euler_dof_handler(&euler_dof_handler)
-  , fe_mask(mask.size() ?
+  , fe_mask(mask.size() != 0u ?
               mask :
               ComponentMask(
                 euler_dof_handler.get_fe().get_nonzero_components(0).size(),
@@ -230,7 +230,7 @@ MappingFEField<dim, spacedim, VectorType, void>::MappingFEField(
   : reference_cell(euler_dof_handler.get_fe().reference_cell())
   , uses_level_dofs(true)
   , euler_dof_handler(&euler_dof_handler)
-  , fe_mask(mask.size() ?
+  , fe_mask(mask.size() != 0u ?
               mask :
               ComponentMask(
                 euler_dof_handler.get_fe().get_nonzero_components(0).size(),
@@ -270,7 +270,7 @@ MappingFEField<dim, spacedim, VectorType, void>::MappingFEField(
   : reference_cell(euler_dof_handler.get_fe().reference_cell())
   , uses_level_dofs(true)
   , euler_dof_handler(&euler_dof_handler)
-  , fe_mask(mask.size() ?
+  , fe_mask(mask.size() != 0u ?
               mask :
               ComponentMask(
                 euler_dof_handler.get_fe().get_nonzero_components(0).size(),
@@ -483,18 +483,18 @@ MappingFEField<dim, spacedim, VectorType, void>::requires_update_flags(
       // update_boundary_forms is simply
       // ignored for the interior of a
       // cell.
-      if (out & (update_JxW_values | update_normal_vectors))
+      if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
         out |= update_boundary_forms;
 
-      if (out & (update_covariant_transformation | update_JxW_values |
-                 update_jacobians | update_jacobian_grads |
-                 update_boundary_forms | update_normal_vectors))
+      if ((out & (update_covariant_transformation | update_JxW_values |
+                  update_jacobians | update_jacobian_grads |
+                  update_boundary_forms | update_normal_vectors)) != 0u)
         out |= update_contravariant_transformation;
 
-      if (out &
-          (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
-           update_jacobian_pushed_forward_2nd_derivatives |
-           update_jacobian_pushed_forward_3rd_derivatives))
+      if ((out &
+           (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+            update_jacobian_pushed_forward_2nd_derivatives |
+            update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
         out |= update_covariant_transformation;
 
       // The contravariant transformation
@@ -503,10 +503,10 @@ MappingFEField<dim, spacedim, VectorType, void>::requires_update_flags(
       // Jacobi matrix of the transformation.
       // Therefore these values have to be
       // updated for each cell.
-      if (out & update_contravariant_transformation)
+      if ((out & update_contravariant_transformation) != 0u)
         out |= update_JxW_values;
 
-      if (out & update_normal_vectors)
+      if ((out & update_normal_vectors) != 0u)
         out |= update_JxW_values;
     }
 
@@ -1529,7 +1529,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_values(
   // Multiply quadrature weights by absolute value of Jacobian determinants or
   // the area element g=sqrt(DX^t DX) in case of codim > 0
 
-  if (update_flags & (update_normal_vectors | update_JxW_values))
+  if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
     {
       AssertDimension(output_data.JxW_values.size(), n_q_points);
 
@@ -1574,7 +1574,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_values(
               output_data.JxW_values[point] =
                 std::sqrt(determinant(G)) * weights[point];
 
-              if (update_flags & update_normal_vectors)
+              if ((update_flags & update_normal_vectors) != 0u)
                 {
                   Assert(spacedim - dim == 1,
                          ExcMessage("There is no cell normal in codim 2."));
@@ -1603,7 +1603,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_values(
     }
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_jacobians)
+  if ((update_flags & update_jacobians) != 0u)
     {
       AssertDimension(output_data.jacobians.size(), n_q_points);
       for (unsigned int point = 0; point < n_q_points; ++point)
@@ -1611,7 +1611,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_values(
     }
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_inverse_jacobians)
+  if ((update_flags & update_inverse_jacobians) != 0u)
     {
       AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
       for (unsigned int point = 0; point < n_q_points; ++point)
index 28bf83fdc9f64f1e8e3b35da93b49ecd5667fd0e..bd38a7ffb7feba5a0b3bae7f651f5c3cd01bbfdd 100644 (file)
@@ -225,18 +225,18 @@ MappingManifold<dim, spacedim>::requires_update_flags(
       // update_boundary_forms is simply
       // ignored for the interior of a
       // cell.
-      if (out & (update_JxW_values | update_normal_vectors))
+      if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
         out |= update_boundary_forms;
 
-      if (out & (update_covariant_transformation | update_JxW_values |
-                 update_jacobians | update_jacobian_grads |
-                 update_boundary_forms | update_normal_vectors))
+      if ((out & (update_covariant_transformation | update_JxW_values |
+                  update_jacobians | update_jacobian_grads |
+                  update_boundary_forms | update_normal_vectors)) != 0u)
         out |= update_contravariant_transformation;
 
-      if (out &
-          (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
-           update_jacobian_pushed_forward_2nd_derivatives |
-           update_jacobian_pushed_forward_3rd_derivatives))
+      if ((out &
+           (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+            update_jacobian_pushed_forward_2nd_derivatives |
+            update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
         out |= update_covariant_transformation;
 
       // The contravariant transformation used in the Piola
@@ -245,10 +245,10 @@ MappingManifold<dim, spacedim>::requires_update_flags(
       // knowing here whether the finite elements wants to use the
       // contravariant of the Piola transforms, we add the JxW values
       // to the list of flags to be updated for each cell.
-      if (out & update_contravariant_transformation)
+      if ((out & update_contravariant_transformation) != 0u)
         out |= update_JxW_values;
 
-      if (out & update_normal_vectors)
+      if ((out & update_normal_vectors) != 0u)
         out |= update_JxW_values;
     }
 
@@ -497,7 +497,7 @@ MappingManifold<dim, spacedim>::fill_fe_values(
   // Multiply quadrature weights by absolute value of Jacobian determinants or
   // the area element g=sqrt(DX^t DX) in case of codim > 0
 
-  if (update_flags & (update_normal_vectors | update_JxW_values))
+  if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
     {
       AssertDimension(output_data.JxW_values.size(), n_q_points);
 
@@ -543,7 +543,7 @@ MappingManifold<dim, spacedim>::fill_fe_values(
               output_data.JxW_values[point] =
                 std::sqrt(determinant(G)) * weights[point];
 
-              if (update_flags & update_normal_vectors)
+              if ((update_flags & update_normal_vectors) != 0u)
                 {
                   Assert(spacedim == dim + 1,
                          ExcMessage(
@@ -575,7 +575,7 @@ MappingManifold<dim, spacedim>::fill_fe_values(
 
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_jacobians)
+  if ((update_flags & update_jacobians) != 0u)
     {
       AssertDimension(output_data.jacobians.size(), n_q_points);
       for (unsigned int point = 0; point < n_q_points; ++point)
@@ -583,7 +583,7 @@ MappingManifold<dim, spacedim>::fill_fe_values(
     }
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_inverse_jacobians)
+  if ((update_flags & update_inverse_jacobians) != 0u)
     {
       AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
       for (unsigned int point = 0; point < n_q_points; ++point)
index ed4bfe9d0e030ad7fad71737b4197bff7d03ff7c..a1f6379e6846629a8fe134967c71a3dd60bad51c 100644 (file)
@@ -851,18 +851,18 @@ MappingQ<dim, spacedim>::requires_update_flags(const UpdateFlags in) const
       // update_boundary_forms is simply
       // ignored for the interior of a
       // cell.
-      if (out & (update_JxW_values | update_normal_vectors))
+      if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
         out |= update_boundary_forms;
 
-      if (out & (update_covariant_transformation | update_JxW_values |
-                 update_jacobians | update_jacobian_grads |
-                 update_boundary_forms | update_normal_vectors))
+      if ((out & (update_covariant_transformation | update_JxW_values |
+                  update_jacobians | update_jacobian_grads |
+                  update_boundary_forms | update_normal_vectors)) != 0u)
         out |= update_contravariant_transformation;
 
-      if (out &
-          (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
-           update_jacobian_pushed_forward_2nd_derivatives |
-           update_jacobian_pushed_forward_3rd_derivatives))
+      if ((out &
+           (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+            update_jacobian_pushed_forward_2nd_derivatives |
+            update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
         out |= update_covariant_transformation;
 
       // The contravariant transformation is used in the Piola
@@ -871,12 +871,12 @@ MappingQ<dim, spacedim>::requires_update_flags(const UpdateFlags in) const
       // knowing here whether the finite element wants to use the
       // contravariant or the Piola transforms, we add the JxW values
       // to the list of flags to be updated for each cell.
-      if (out & update_contravariant_transformation)
+      if ((out & update_contravariant_transformation) != 0u)
         out |= update_volume_elements;
 
       // the same is true when computing normal vectors: they require
       // the determinant of the Jacobian
-      if (out & update_normal_vectors)
+      if ((out & update_normal_vectors) != 0u)
         out |= update_volume_elements;
     }
 
@@ -1047,7 +1047,7 @@ MappingQ<dim, spacedim>::fill_fe_values(
   // Multiply quadrature weights by absolute value of Jacobian determinants or
   // the area element g=sqrt(DX^t DX) in case of codim > 0
 
-  if (update_flags & (update_normal_vectors | update_JxW_values))
+  if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
     {
       AssertDimension(output_data.JxW_values.size(), n_q_points);
 
@@ -1099,12 +1099,12 @@ MappingQ<dim, spacedim>::fill_fe_values(
                     CellSimilarity::inverted_translation)
                   {
                     // we only need to flip the normal
-                    if (update_flags & update_normal_vectors)
+                    if ((update_flags & update_normal_vectors) != 0u)
                       output_data.normal_vectors[point] *= -1.;
                   }
                 else
                   {
-                    if (update_flags & update_normal_vectors)
+                    if ((update_flags & update_normal_vectors) != 0u)
                       {
                         Assert(spacedim == dim + 1,
                                ExcMessage(
@@ -1137,7 +1137,7 @@ MappingQ<dim, spacedim>::fill_fe_values(
 
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_jacobians)
+  if ((update_flags & update_jacobians) != 0u)
     {
       AssertDimension(output_data.jacobians.size(), n_q_points);
       if (computed_cell_similarity != CellSimilarity::translation)
@@ -1146,7 +1146,7 @@ MappingQ<dim, spacedim>::fill_fe_values(
     }
 
   // copy values from InternalData to vector given by reference
-  if (update_flags & update_inverse_jacobians)
+  if ((update_flags & update_inverse_jacobians) != 0u)
     {
       AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
       if (computed_cell_similarity != CellSimilarity::translation)
@@ -1438,18 +1438,18 @@ MappingQ<dim, spacedim>::fill_mapping_data_for_generic_points(
             polynomial_degree == 1,
             renumber_lexicographic_to_hierarchic);
 
-        if (update_flags & update_quadrature_points)
+        if ((update_flags & update_quadrature_points) != 0u)
           for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
             for (unsigned int d = 0; d < spacedim; ++d)
               output_data.quadrature_points[i + j][d] = result.first[d][j];
 
-        if (update_flags & update_jacobians)
+        if ((update_flags & update_jacobians) != 0u)
           for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
             for (unsigned int d = 0; d < spacedim; ++d)
               for (unsigned int e = 0; e < dim; ++e)
                 output_data.jacobians[i + j][d][e] = result.second[e][d][j];
 
-        if (update_flags & update_inverse_jacobians)
+        if ((update_flags & update_inverse_jacobians) != 0u)
           {
             DerivativeForm<1, spacedim, dim, VectorizedArray<double>> jac(
               result.second);
@@ -1471,16 +1471,16 @@ MappingQ<dim, spacedim>::fill_mapping_data_for_generic_points(
             polynomial_degree == 1,
             renumber_lexicographic_to_hierarchic);
 
-        if (update_flags & update_quadrature_points)
+        if ((update_flags & update_quadrature_points) != 0u)
           output_data.quadrature_points[i] = result.first;
 
-        if (update_flags & update_jacobians)
+        if ((update_flags & update_jacobians) != 0u)
           {
             DerivativeForm<1, spacedim, dim> jac = result.second;
             output_data.jacobians[i]             = jac.transpose();
           }
 
-        if (update_flags & update_inverse_jacobians)
+        if ((update_flags & update_inverse_jacobians) != 0u)
           {
             DerivativeForm<1, spacedim, dim> jac(result.second);
             DerivativeForm<1, spacedim, dim> inv_jac = jac.covariant_form();
index 2bb3ebbc2d07715833a8b98bd62162a3f15e4205..6b4808384d2f1459e39874e8120b04cc827e3f9b 100644 (file)
@@ -5222,8 +5222,9 @@ namespace GridGenerator
       {1, 8, 3, 9, 5, 10, 7, 11}}; // shifted cube
 
     // binary to case number
-    const unsigned int this_case =
-      4 * face_orientation + 2 * face_flip + face_rotation;
+    const unsigned int this_case = 4 * static_cast<int>(face_orientation) +
+                                   2 * static_cast<int>(face_flip) +
+                                   static_cast<int>(face_rotation);
 
     if (manipulate_left_cube)
       {
index 67601396eeb4786983cf58bf4d0599d51e11516f..93cd7365c231715cf8aca28480c7c3bbb1507285 100644 (file)
@@ -4369,7 +4369,7 @@ namespace
     std::string tmp;
     for (const char c : s)
       {
-        if (isdigit(c))
+        if (isdigit(c) != 0)
           {
             tmp += c;
           }
index fc75c16a9caf5c8b55065fe396f26e7cab224d6d..1d1c84b7bf2587705c90950aea979ee53ff27d59 100644 (file)
@@ -2066,7 +2066,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const
       additional_width = static_cast<unsigned int>(
         .5 + height * .4); // additional width for legend
     }
-  else if (svg_flags.draw_colorbar && svg_flags.coloring)
+  else if (svg_flags.draw_colorbar && (svg_flags.coloring != 0u))
     {
       additional_width = static_cast<unsigned int>(
         .5 + height * .175); // additional width for colorbar
@@ -2123,7 +2123,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const
       << '\n';
 
   // polygon styles with respect to the chosen cell coloring
-  if (svg_flags.coloring)
+  if (svg_flags.coloring != 0u)
     {
       unsigned int labeling_index      = 0;
       auto         materials_it        = materials.begin();
@@ -2267,7 +2267,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const
           // draw the current cell
           out << "  <path";
 
-          if (svg_flags.coloring)
+          if (svg_flags.coloring != 0u)
             {
               out << " class=\"p";
 
@@ -2538,7 +2538,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const
 
           // if the current cell lies at the boundary of the triangulation, draw
           // the additional boundary line
-          if (svg_flags.boundary_line_thickness)
+          if (svg_flags.boundary_line_thickness != 0u)
             {
               for (auto faceIndex : cell->face_indices())
                 {
@@ -2863,7 +2863,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const
 
 
   // draw the colorbar
-  if (svg_flags.draw_colorbar && svg_flags.coloring)
+  if (svg_flags.draw_colorbar && (svg_flags.coloring != 0u))
     {
       out << '\n' << " <!-- colorbar -->" << '\n';
 
index 470a8271ac5830cb08d56b2c98eeb7b3b8b416df..704333737061c68439e688ba76cfe453a069920d 100644 (file)
@@ -60,7 +60,7 @@ namespace GridTools
     std::set<typename Triangulation<dim, spacedim>::active_cell_iterator>> &
   Cache<dim, spacedim>::get_vertex_to_cell_map() const
   {
-    if (update_flags & update_vertex_to_cell_map)
+    if ((update_flags & update_vertex_to_cell_map) != 0)
       {
         vertex_to_cells = GridTools::vertex_to_cell_map(*tria);
         update_flags    = update_flags & ~update_vertex_to_cell_map;
@@ -74,7 +74,7 @@ namespace GridTools
   const std::vector<std::vector<Tensor<1, spacedim>>> &
   Cache<dim, spacedim>::get_vertex_to_cell_centers_directions() const
   {
-    if (update_flags & update_vertex_to_cell_centers_directions)
+    if ((update_flags & update_vertex_to_cell_centers_directions) != 0)
       {
         vertex_to_cell_centers = GridTools::vertex_to_cell_centers_directions(
           *tria, get_vertex_to_cell_map());
@@ -89,7 +89,7 @@ namespace GridTools
   const std::map<unsigned int, Point<spacedim>> &
   Cache<dim, spacedim>::get_used_vertices() const
   {
-    if (update_flags & update_used_vertices)
+    if ((update_flags & update_used_vertices) != 0)
       {
         used_vertices = GridTools::extract_used_vertices(*tria, *mapping);
         update_flags  = update_flags & ~update_used_vertices;
@@ -103,7 +103,7 @@ namespace GridTools
   const RTree<std::pair<Point<spacedim>, unsigned int>> &
   Cache<dim, spacedim>::get_used_vertices_rtree() const
   {
-    if (update_flags & update_used_vertices_rtree)
+    if ((update_flags & update_used_vertices_rtree) != 0)
       {
         const auto &used_vertices = get_used_vertices();
         std::vector<std::pair<Point<spacedim>, unsigned int>> vertices(
@@ -125,7 +125,7 @@ namespace GridTools
               typename Triangulation<dim, spacedim>::active_cell_iterator>> &
   Cache<dim, spacedim>::get_cell_bounding_boxes_rtree() const
   {
-    if (update_flags & update_cell_bounding_boxes_rtree)
+    if ((update_flags & update_cell_bounding_boxes_rtree) != 0)
       {
         std::vector<std::pair<
           BoundingBox<spacedim>,
@@ -149,7 +149,7 @@ namespace GridTools
               typename Triangulation<dim, spacedim>::active_cell_iterator>> &
   Cache<dim, spacedim>::get_locally_owned_cell_bounding_boxes_rtree() const
   {
-    if (update_flags & update_locally_owned_cell_bounding_boxes_rtree)
+    if ((update_flags & update_locally_owned_cell_bounding_boxes_rtree) != 0)
       {
         std::vector<std::pair<
           BoundingBox<spacedim>,
@@ -203,7 +203,7 @@ namespace GridTools
   const std::vector<std::set<unsigned int>> &
   Cache<dim, spacedim>::get_vertex_to_neighbor_subdomain() const
   {
-    if (update_flags & update_vertex_to_neighbor_subdomain)
+    if ((update_flags & update_vertex_to_neighbor_subdomain) != 0)
       {
         vertex_to_neighbor_subdomain.clear();
         vertex_to_neighbor_subdomain.resize(tria->n_vertices());
index 2c2aa84840023cb352451e020d78414fbb6a4aca..203a31d9d17ad2f88ae09d6eb9e7b6d8f268419a 100644 (file)
@@ -1177,7 +1177,7 @@ namespace internal
             tria_faces.quads_line_orientations.end(),
             new_size * GeometryInfo<2>::lines_per_cell -
               tria_faces.quads_line_orientations.size(),
-            true);
+            1u);
 
           tria_faces.quad_reference_cell.reserve(new_size);
           tria_faces.quad_reference_cell.insert(
@@ -1290,7 +1290,7 @@ namespace internal
                 tria_level.face_orientations.end(),
                 total_cells * max_faces_per_cell -
                   tria_level.face_orientations.size(),
-                true);
+                1u);
 
               tria_level.reference_cell.reserve(total_cells);
               tria_level.reference_cell.insert(
@@ -2678,7 +2678,7 @@ namespace internal
         level.subdomain_ids.assign(size, 0);
         level.level_subdomain_ids.assign(size, 0);
 
-        level.refine_flags.assign(size, false);
+        level.refine_flags.assign(size, 0u);
         level.coarsen_flags.assign(size, false);
 
         level.parents.assign((size + 1) / 2, -1);
@@ -16144,14 +16144,14 @@ Triangulation<dim, spacedim>::prepare_coarsening_and_refinement()
                                         nb->face_flip(nb_indices.first),
                                         nb->face_rotation(nb_indices.first));
                                     if ((nb_frc & RefinementCase<dim>::cut_x) &&
-                                        !(refined_along_x ||
-                                          to_be_refined_along_x))
+                                        !((refined_along_x != 0u) ||
+                                          (to_be_refined_along_x != 0u)))
                                       changed |= cell->flag_for_face_refinement(
                                         i,
                                         RefinementCase<dim - 1>::cut_axis(0));
                                     if ((nb_frc & RefinementCase<dim>::cut_y) &&
-                                        !(refined_along_y ||
-                                          to_be_refined_along_y))
+                                        !((refined_along_y != 0u) ||
+                                          (to_be_refined_along_y != 0u)))
                                       changed |= cell->flag_for_face_refinement(
                                         i,
                                         RefinementCase<dim - 1>::cut_axis(1));
@@ -16335,7 +16335,7 @@ Triangulation<dim, spacedim>::read_bool_vector(const unsigned int magic_number1,
     }
 
   for (unsigned int position = 0; position != N; ++position)
-    v[position] = (flags[position / 8] & (1 << (position % 8)));
+    v[position] = ((flags[position / 8] & (1 << (position % 8))) != 0);
 
   in >> magic_number;
   AssertThrow(magic_number == magic_number2, ExcGridReadError());
index 823105c8e9306a96fedd5205f99e5e75ce3b6ff5..0afb2f58823483bf21c53230393d02a03dd64278 100644 (file)
@@ -72,7 +72,7 @@ namespace
     // which is 0 or 1 in an anisotropic case
     // (case_x, case_y, casex2y or casey2x) or
     // 0...3 in an isotropic case (case_xy)
-    return subface_no + first_child_has_children;
+    return subface_no + static_cast<unsigned int>(first_child_has_children);
   }
 
 
index 4a3a9e420287387b084c2b3f5c17f3a8392bec5a..d8112b99c51a13cb405ac8f03c55ef4b55717cee 100644 (file)
@@ -662,7 +662,7 @@ DynamicSparsityPattern::column_index(
   Assert(rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
 
   const DynamicSparsityPattern::size_type local_row =
-    rowset.size() ? rowset.index_within_set(row) : row;
+    rowset.size() != 0u ? rowset.index_within_set(row) : row;
 
   // now we need to do a binary search. Note that col indices are assumed to
   // be sorted.
index 19f2a6982e58780b0280c31c397f599ca7c23c56..dd37eebb13f3a027058b65f0b89c48bbed322645 100644 (file)
@@ -2310,13 +2310,13 @@ LAPACKFullMatrix<number>::print_formatted(std::ostream &     out,
   if (scientific)
     {
       out.setf(std::ios::scientific, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 7;
     }
   else
     {
       out.setf(std::ios::fixed, std::ios::floatfield);
-      if (!width)
+      if (width == 0u)
         width = precision + 2;
     }
 
index 3bc1ecd5380c19200235b0dd2e236cc809de82e4..58ea43f2ff36f04c34210abe573065babf116f45 100644 (file)
@@ -1055,7 +1055,7 @@ namespace SparsityTools
         const auto rlen = dsp.row_length(row);
 
         // skip empty lines
-        if (!rlen)
+        if (rlen == 0)
           continue;
 
         // save entries
@@ -1137,7 +1137,7 @@ namespace SparsityTools
         BlockDynamicSparsityPattern::size_type rlen = dsp.row_length(row);
 
         // skip empty lines
-        if (!rlen)
+        if (rlen == 0)
           continue;
 
         // save entries
@@ -1238,7 +1238,7 @@ namespace SparsityTools
     }
 
     // complete all sends, so that we can safely destroy the buffers.
-    if (requests.size())
+    if (requests.size() > 0)
       {
         const int ierr =
           MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
index 9020a44208c0d0ef8d6ec5d53d0328b4ad4a5cb0..3ffadb16af9ea51cdf5065e47cb30746388a3e16 100644 (file)
@@ -169,7 +169,7 @@ namespace TrilinosWrappers
                     TrilinosWrappers::global_index(domain_map, row) :
                     row;
                 distributed_constant_modes[d][row] =
-                  constant_modes[d][mode_index];
+                  static_cast<double>(constant_modes[d][mode_index]);
               }
           }
         (void)expected_mode_size;
index b24f8a395953a30cb5e14ac1147ab6ff1894e2b6..eba0c5c82a7e10378193407702246f2f33dd231e 100644 (file)
@@ -161,8 +161,8 @@ namespace TrilinosWrappers
                 constant_modes_are_global ?
                   TrilinosWrappers::global_index(domain_map, row) :
                   row;
-              distributed_constant_modes[d][row] =
-                additional_data.constant_modes[d][global_row_id];
+              distributed_constant_modes[d][row] = static_cast<double>(
+                additional_data.constant_modes[d][global_row_id]);
             }
 
         parameter_list.set("null space: type", "pre-computed");
index bc0ccbc0a6ace4b8fd7e7137403622042c6408a2..16e72164d1993f4cf06f49ca35f8d7731ebc9ec5 100644 (file)
@@ -807,7 +807,7 @@ namespace internal
       // power of two, which allows it to replace integer divisions by shifts
       unsigned int vectorization_length_bits = 0;
       unsigned int my_length                 = vectorization_length;
-      while (my_length >>= 1)
+      while ((my_length >>= 1) != 0u)
         ++vectorization_length_bits;
       const unsigned int n_lanes = 1 << vectorization_length_bits;
 
@@ -852,9 +852,9 @@ namespace internal
         for (unsigned int j = n_categories - 1; j > 0; --j)
           {
             unsigned int lower_index = j - 1;
-            while (renumbering_category[j].size() % n_lanes)
+            while ((renumbering_category[j].size() % n_lanes) != 0u)
               {
-                while (renumbering_category[j].size() % n_lanes &&
+                while (((renumbering_category[j].size() % n_lanes) != 0u) &&
                        !renumbering_category[lower_index].empty())
                   {
                     renumbering_category[j].push_back(
@@ -1044,7 +1044,7 @@ namespace internal
                             cell_vectorization_categories[n_active_cells]);
           renumbering[cell] = cell;
         }
-      if (n_ghost_cells % n_lanes)
+      if ((n_ghost_cells % n_lanes) != 0u)
         incompletely_filled_vectorization.back() = n_ghost_cells % n_lanes;
       cell_partition_data.push_back(n_cell_batches + n_ghost_batches);
       partition_row_index.back() = cell_partition_data.size() - 1;
index 43f4c3c3cf7243dfb4ab6addd7e5ddb6ff99cd2e..a6cad27e8f1dfc67728fb057ff463f494c22d953 100644 (file)
@@ -204,21 +204,21 @@ DataOut<dim, spacedim>::build_one_patch(
                   // we do not need to worry about getting any imaginary
                   // components to the postprocessor, and we can safely
                   // call the function that evaluates a scalar field
-                  if (update_flags & update_values)
+                  if ((update_flags & update_values) != 0u)
                     dataset->get_function_values(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       scratch_data.patch_values_scalar.solution_values);
 
-                  if (update_flags & update_gradients)
+                  if ((update_flags & update_gradients) != 0u)
                     dataset->get_function_gradients(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       scratch_data.patch_values_scalar.solution_gradients);
 
-                  if (update_flags & update_hessians)
+                  if ((update_flags & update_hessians) != 0u)
                     dataset->get_function_hessians(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
@@ -227,7 +227,7 @@ DataOut<dim, spacedim>::build_one_patch(
 
                   // Also fill some of the other fields postprocessors may
                   // want to access.
-                  if (update_flags & update_quadrature_points)
+                  if ((update_flags & update_quadrature_points) != 0u)
                     scratch_data.patch_values_scalar.evaluation_points =
                       this_fe_patch_values.get_quadrature_points();
 
@@ -260,21 +260,21 @@ DataOut<dim, spacedim>::build_one_patch(
                     {
                       scratch_data.resize_system_vectors(n_components);
 
-                      if (update_flags & update_values)
+                      if ((update_flags & update_values) != 0u)
                         dataset->get_function_values(
                           this_fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           scratch_data.patch_values_system.solution_values);
 
-                      if (update_flags & update_gradients)
+                      if ((update_flags & update_gradients) != 0u)
                         dataset->get_function_gradients(
                           this_fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           scratch_data.patch_values_system.solution_gradients);
 
-                      if (update_flags & update_hessians)
+                      if ((update_flags & update_hessians) != 0u)
                         dataset->get_function_hessians(
                           this_fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
@@ -294,7 +294,7 @@ DataOut<dim, spacedim>::build_one_patch(
                           // First get the real component of the scalar solution
                           // and copy the data into the
                           // scratch_data.patch_values_system output fields
-                          if (update_flags & update_values)
+                          if ((update_flags & update_values) != 0u)
                             {
                               dataset->get_function_values(
                                 this_fe_patch_values,
@@ -320,7 +320,7 @@ DataOut<dim, spacedim>::build_one_patch(
                                 }
                             }
 
-                          if (update_flags & update_gradients)
+                          if ((update_flags & update_gradients) != 0u)
                             {
                               dataset->get_function_gradients(
                                 this_fe_patch_values,
@@ -346,7 +346,7 @@ DataOut<dim, spacedim>::build_one_patch(
                                 }
                             }
 
-                          if (update_flags & update_hessians)
+                          if ((update_flags & update_hessians) != 0u)
                             {
                               dataset->get_function_hessians(
                                 this_fe_patch_values,
@@ -377,7 +377,7 @@ DataOut<dim, spacedim>::build_one_patch(
                           // and copy the data into the
                           // scratch_data.patch_values_system output fields
                           // that follow the real one
-                          if (update_flags & update_values)
+                          if ((update_flags & update_values) != 0u)
                             {
                               dataset->get_function_values(
                                 this_fe_patch_values,
@@ -403,7 +403,7 @@ DataOut<dim, spacedim>::build_one_patch(
                                 }
                             }
 
-                          if (update_flags & update_gradients)
+                          if ((update_flags & update_gradients) != 0u)
                             {
                               dataset->get_function_gradients(
                                 this_fe_patch_values,
@@ -429,7 +429,7 @@ DataOut<dim, spacedim>::build_one_patch(
                                 }
                             }
 
-                          if (update_flags & update_hessians)
+                          if ((update_flags & update_hessians) != 0u)
                             {
                               dataset->get_function_hessians(
                                 this_fe_patch_values,
@@ -484,7 +484,7 @@ DataOut<dim, spacedim>::build_one_patch(
                           // values, then the real and imaginary parts of the
                           // gradients, etc. This allows us to scope the
                           // temporary objects better
-                          if (update_flags & update_values)
+                          if ((update_flags & update_values) != 0u)
                             {
                               std::vector<Vector<double>> tmp(
                                 scratch_data.patch_values_system.solution_values
@@ -539,7 +539,7 @@ DataOut<dim, spacedim>::build_one_patch(
                             }
 
                           // Now do the exact same thing for the gradients
-                          if (update_flags & update_gradients)
+                          if ((update_flags & update_gradients) != 0u)
                             {
                               std::vector<std::vector<Tensor<1, spacedim>>> tmp(
                                 scratch_data.patch_values_system
@@ -590,7 +590,7 @@ DataOut<dim, spacedim>::build_one_patch(
                             }
 
                           // And finally the Hessians. Same scheme as above.
-                          if (update_flags & update_hessians)
+                          if ((update_flags & update_hessians) != 0u)
                             {
                               std::vector<std::vector<Tensor<2, spacedim>>> tmp(
                                 scratch_data.patch_values_system
@@ -643,7 +643,7 @@ DataOut<dim, spacedim>::build_one_patch(
                     }
 
                   // Now set other fields we may need
-                  if (update_flags & update_quadrature_points)
+                  if ((update_flags & update_quadrature_points) != 0u)
                     scratch_data.patch_values_system.evaluation_points =
                       this_fe_patch_values.get_quadrature_points();
 
index 7166cc8fcacb31c48e9ebc82be14ebd1e7339cc2..d8c4777945f9596f72c297d22949a48eb7746fa3 100644 (file)
@@ -172,30 +172,30 @@ DataOutFaces<dim, spacedim>::build_one_patch(
                 {
                   // at each point there is only one component of value,
                   // gradient etc.
-                  if (update_flags & update_values)
+                  if ((update_flags & update_values) != 0u)
                     this->dof_data[dataset]->get_function_values(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       data.patch_values_scalar.solution_values);
-                  if (update_flags & update_gradients)
+                  if ((update_flags & update_gradients) != 0u)
                     this->dof_data[dataset]->get_function_gradients(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       data.patch_values_scalar.solution_gradients);
-                  if (update_flags & update_hessians)
+                  if ((update_flags & update_hessians) != 0u)
                     this->dof_data[dataset]->get_function_hessians(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       data.patch_values_scalar.solution_hessians);
 
-                  if (update_flags & update_quadrature_points)
+                  if ((update_flags & update_quadrature_points) != 0u)
                     data.patch_values_scalar.evaluation_points =
                       this_fe_patch_values.get_quadrature_points();
 
-                  if (update_flags & update_normal_vectors)
+                  if ((update_flags & update_normal_vectors) != 0u)
                     data.patch_values_scalar.normals =
                       this_fe_patch_values.get_normal_vectors();
 
@@ -216,30 +216,30 @@ DataOutFaces<dim, spacedim>::build_one_patch(
                   // at each point there is a vector valued function and its
                   // derivative...
                   data.resize_system_vectors(n_components);
-                  if (update_flags & update_values)
+                  if ((update_flags & update_values) != 0u)
                     this->dof_data[dataset]->get_function_values(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       data.patch_values_system.solution_values);
-                  if (update_flags & update_gradients)
+                  if ((update_flags & update_gradients) != 0u)
                     this->dof_data[dataset]->get_function_gradients(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       data.patch_values_system.solution_gradients);
-                  if (update_flags & update_hessians)
+                  if ((update_flags & update_hessians) != 0u)
                     this->dof_data[dataset]->get_function_hessians(
                       this_fe_patch_values,
                       internal::DataOutImplementation::ComponentExtractor::
                         real_part,
                       data.patch_values_system.solution_hessians);
 
-                  if (update_flags & update_quadrature_points)
+                  if ((update_flags & update_quadrature_points) != 0u)
                     data.patch_values_system.evaluation_points =
                       this_fe_patch_values.get_quadrature_points();
 
-                  if (update_flags & update_normal_vectors)
+                  if ((update_flags & update_normal_vectors) != 0u)
                     data.patch_values_system.normals =
                       this_fe_patch_values.get_normal_vectors();
 
index 4b12a279caeb3851aa76174f475b5e908dd60a15..ef952619b877cbdf1b341fc412d0c3fdfc7c3d43 100644 (file)
@@ -220,26 +220,26 @@ DataOutRotation<dim, spacedim>::build_one_patch(
                       // at each point there is
                       // only one component of
                       // value, gradient etc.
-                      if (update_flags & update_values)
+                      if ((update_flags & update_values) != 0u)
                         this->dof_data[dataset]->get_function_values(
                           fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           data.patch_values_scalar.solution_values);
-                      if (update_flags & update_gradients)
+                      if ((update_flags & update_gradients) != 0u)
                         this->dof_data[dataset]->get_function_gradients(
                           fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           data.patch_values_scalar.solution_gradients);
-                      if (update_flags & update_hessians)
+                      if ((update_flags & update_hessians) != 0u)
                         this->dof_data[dataset]->get_function_hessians(
                           fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           data.patch_values_scalar.solution_hessians);
 
-                      if (update_flags & update_quadrature_points)
+                      if ((update_flags & update_quadrature_points) != 0u)
                         data.patch_values_scalar.evaluation_points =
                           fe_patch_values.get_quadrature_points();
 
@@ -261,26 +261,26 @@ DataOutRotation<dim, spacedim>::build_one_patch(
 
                       // at each point there is a vector valued function and
                       // its derivative...
-                      if (update_flags & update_values)
+                      if ((update_flags & update_values) != 0u)
                         this->dof_data[dataset]->get_function_values(
                           fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           data.patch_values_system.solution_values);
-                      if (update_flags & update_gradients)
+                      if ((update_flags & update_gradients) != 0u)
                         this->dof_data[dataset]->get_function_gradients(
                           fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           data.patch_values_system.solution_gradients);
-                      if (update_flags & update_hessians)
+                      if ((update_flags & update_hessians) != 0u)
                         this->dof_data[dataset]->get_function_hessians(
                           fe_patch_values,
                           internal::DataOutImplementation::ComponentExtractor::
                             real_part,
                           data.patch_values_system.solution_hessians);
 
-                      if (update_flags & update_quadrature_points)
+                      if ((update_flags & update_quadrature_points) != 0u)
                         data.patch_values_system.evaluation_points =
                           fe_patch_values.get_quadrature_points();
 
index c42f99bf93efb8a6642a6b28c226a8b88a78b49f..a7175306cf5b35aa029f693c6f168faee692121f 100644 (file)
@@ -500,7 +500,7 @@ SolutionTransfer<dim, VectorType, spacedim>::interpolate(
             *const valuesptr = pointerstruct->second.dof_values_ptr;
 
           // cell stayed as it was or was refined
-          if (indexptr)
+          if (indexptr != nullptr)
             {
               Assert(valuesptr == nullptr, ExcInternalError());
 

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.