]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make the 'direction' argument of some GridTools functions 'unsigned'. 12961/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 17 Nov 2021 00:51:34 +0000 (17:51 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 17 Nov 2021 00:51:34 +0000 (17:51 -0700)
include/deal.II/grid/grid_tools.h
source/grid/grid_tools_dof_handlers.cc
source/grid/grid_tools_dof_handlers.inst.in

index e2d62c7977845fa253ac3eb51383d6839fd66307..8b728b5c005f07434797dc64af7f59c151fdc741 100644 (file)
@@ -2762,7 +2762,7 @@ namespace GridTools
     std::bitset<3> &                                              orientation,
     const FaceIterator &                                          face1,
     const FaceIterator &                                          face2,
-    const int                                                     direction,
+    const unsigned int                                            direction,
     const Tensor<1, FaceIterator::AccessorType::space_dimension> &offset =
       Tensor<1, FaceIterator::AccessorType::space_dimension>(),
     const FullMatrix<double> &matrix = FullMatrix<double>());
@@ -2776,7 +2776,7 @@ namespace GridTools
   orthogonal_equality(
     const FaceIterator &                                          face1,
     const FaceIterator &                                          face2,
-    const int                                                     direction,
+    const unsigned int                                            direction,
     const Tensor<1, FaceIterator::AccessorType::space_dimension> &offset =
       Tensor<1, FaceIterator::AccessorType::space_dimension>(),
     const FullMatrix<double> &matrix = FullMatrix<double>());
@@ -2844,7 +2844,7 @@ namespace GridTools
     const MeshType &         mesh,
     const types::boundary_id b_id1,
     const types::boundary_id b_id2,
-    const int                direction,
+    const unsigned int       direction,
     std::vector<PeriodicFacePair<typename MeshType::cell_iterator>>
       &                                         matched_pairs,
     const Tensor<1, MeshType::space_dimension> &offset =
@@ -2879,7 +2879,7 @@ namespace GridTools
   collect_periodic_faces(
     const MeshType &         mesh,
     const types::boundary_id b_id,
-    const int                direction,
+    const unsigned int       direction,
     std::vector<PeriodicFacePair<typename MeshType::cell_iterator>>
       &                                                 matched_pairs,
     const dealii::Tensor<1, MeshType::space_dimension> &offset =
index 9a8cf26e33bbedb6f00585aac6b4a914b658953e..b6f9cfeb35c39546e84eb1d8e5dc21c711035e34 100644 (file)
@@ -2013,7 +2013,7 @@ namespace GridTools
     std::set<std::pair<CellIterator, unsigned int>> &pairs1,
     std::set<std::pair<typename identity<CellIterator>::type, unsigned int>>
       &                                          pairs2,
-    const int                                    direction,
+    const unsigned int                           direction,
     std::vector<PeriodicFacePair<CellIterator>> &matched_pairs,
     const dealii::Tensor<1, CellIterator::AccessorType::space_dimension>
       &                       offset,
@@ -2106,7 +2106,7 @@ namespace GridTools
   collect_periodic_faces(
     const MeshType &         mesh,
     const types::boundary_id b_id,
-    const int                direction,
+    const unsigned int       direction,
     std::vector<PeriodicFacePair<typename MeshType::cell_iterator>>
       &                                         matched_pairs,
     const Tensor<1, MeshType::space_dimension> &offset,
@@ -2188,7 +2188,7 @@ namespace GridTools
     const MeshType &         mesh,
     const types::boundary_id b_id1,
     const types::boundary_id b_id2,
-    const int                direction,
+    const unsigned int       direction,
     std::vector<PeriodicFacePair<typename MeshType::cell_iterator>>
       &                                         matched_pairs,
     const Tensor<1, MeshType::space_dimension> &offset,
@@ -2275,7 +2275,7 @@ namespace GridTools
   inline bool
   orthogonal_equality(const Point<spacedim> &    point1,
                       const Point<spacedim> &    point2,
-                      const int                  direction,
+                      const unsigned int         direction,
                       const Tensor<1, spacedim> &offset,
                       const FullMatrix<double> & matrix)
   {
@@ -2294,7 +2294,7 @@ namespace GridTools
 
     distance += offset - point2;
 
-    for (int i = 0; i < spacedim; ++i)
+    for (unsigned int i = 0; i < spacedim; ++i)
       {
         // Only compare coordinate-components != direction:
         if (i == direction)
@@ -2414,7 +2414,7 @@ namespace GridTools
     std::bitset<3> &                                              orientation,
     const FaceIterator &                                          face1,
     const FaceIterator &                                          face2,
-    const int                                                     direction,
+    const unsigned int                                            direction,
     const Tensor<1, FaceIterator::AccessorType::space_dimension> &offset,
     const FullMatrix<double> &                                    matrix)
   {
@@ -2466,7 +2466,7 @@ namespace GridTools
   orthogonal_equality(
     const FaceIterator &                                          face1,
     const FaceIterator &                                          face2,
-    const int                                                     direction,
+    const unsigned int                                            direction,
     const Tensor<1, FaceIterator::AccessorType::space_dimension> &offset,
     const FullMatrix<double> &                                    matrix)
   {
index 41bdd43b9e5870fca9cd87278968f061e256a68c..589afde6a9ea92c3e8e1a035b48b72b394176d5c 100644 (file)
@@ -254,7 +254,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLER;
         std::bitset<3> &,
         const X::active_face_iterator &,
         const X::active_face_iterator &,
-        const int,
+        const unsigned int,
         const Tensor<1, deal_II_space_dimension> &,
         const FullMatrix<double> &);
 
@@ -263,7 +263,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLER;
         std::bitset<3> &,
         const X::face_iterator &,
         const X::face_iterator &,
-        const int,
+        const unsigned int,
         const Tensor<1, deal_II_space_dimension> &,
         const FullMatrix<double> &);
 
@@ -271,7 +271,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLER;
       orthogonal_equality<X::active_face_iterator>(
         const X::active_face_iterator &,
         const X::active_face_iterator &,
-        const int,
+        const unsigned int,
         const Tensor<1, deal_II_space_dimension> &,
         const FullMatrix<double> &);
 
@@ -279,7 +279,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLER;
       orthogonal_equality<X::face_iterator>(
         const X::face_iterator &,
         const X::face_iterator &,
-        const int,
+        const unsigned int,
         const Tensor<1, deal_II_space_dimension> &,
         const FullMatrix<double> &);
 
@@ -299,7 +299,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLERS;
         const X &,
         const types::boundary_id,
         const types::boundary_id,
-        const int,
+        const unsigned int,
         std::vector<PeriodicFacePair<X::cell_iterator>> &,
         const Tensor<1, X::space_dimension> &,
         const FullMatrix<double> &);
@@ -308,7 +308,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLERS;
       collect_periodic_faces<X>(
         const X &,
         const types::boundary_id,
-        const int,
+        const unsigned int,
         std::vector<PeriodicFacePair<X::cell_iterator>> &,
         const Tensor<1, X::space_dimension> &,
         const FullMatrix<double> &);
@@ -334,7 +334,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
                                                    deal_II_space_dimension> &,
         const types::boundary_id,
         const types::boundary_id,
-        const int,
+        const unsigned int,
         std::vector<PeriodicFacePair<parallel::distributed::Triangulation<
           deal_II_dimension,
           deal_II_space_dimension>::cell_iterator>> &,
@@ -351,7 +351,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
         const parallel::distributed::Triangulation<deal_II_dimension,
                                                    deal_II_space_dimension> &,
         const types::boundary_id,
-        const int,
+        const unsigned int,
         std::vector<PeriodicFacePair<parallel::distributed::Triangulation<
           deal_II_dimension,
           deal_II_space_dimension>::cell_iterator>> &,
@@ -382,7 +382,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
                                               deal_II_space_dimension> &,
         const types::boundary_id,
         const types::boundary_id,
-        const int,
+        const unsigned int,
         std::vector<PeriodicFacePair<parallel::shared::Triangulation<
           deal_II_dimension,
           deal_II_space_dimension>::cell_iterator>> &,
@@ -399,7 +399,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
         const parallel::shared::Triangulation<deal_II_dimension,
                                               deal_II_space_dimension> &,
         const types::boundary_id,
-        const int,
+        const unsigned int,
         std::vector<PeriodicFacePair<parallel::shared::Triangulation<
           deal_II_dimension,
           deal_II_space_dimension>::cell_iterator>> &,

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.