From: Wolfgang Bangerth Date: Wed, 17 Nov 2021 00:51:34 +0000 (-0700) Subject: Make the 'direction' argument of some GridTools functions 'unsigned'. X-Git-Tag: v9.4.0-rc1~830^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12961%2Fhead;p=dealii.git Make the 'direction' argument of some GridTools functions 'unsigned'. --- diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index e2d62c7977..8b728b5c00 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -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 &matrix = FullMatrix()); @@ -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 &matrix = FullMatrix()); @@ -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> & 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> & matched_pairs, const dealii::Tensor<1, MeshType::space_dimension> &offset = diff --git a/source/grid/grid_tools_dof_handlers.cc b/source/grid/grid_tools_dof_handlers.cc index 9a8cf26e33..b6f9cfeb35 100644 --- a/source/grid/grid_tools_dof_handlers.cc +++ b/source/grid/grid_tools_dof_handlers.cc @@ -2013,7 +2013,7 @@ namespace GridTools std::set> &pairs1, std::set::type, unsigned int>> & pairs2, - const int direction, + const unsigned int direction, std::vector> &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> & 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> & matched_pairs, const Tensor<1, MeshType::space_dimension> &offset, @@ -2275,7 +2275,7 @@ namespace GridTools inline bool orthogonal_equality(const Point & point1, const Point & point2, - const int direction, + const unsigned int direction, const Tensor<1, spacedim> &offset, const FullMatrix & 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 & 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 & matrix) { diff --git a/source/grid/grid_tools_dof_handlers.inst.in b/source/grid/grid_tools_dof_handlers.inst.in index 41bdd43b9e..589afde6a9 100644 --- a/source/grid/grid_tools_dof_handlers.inst.in +++ b/source/grid/grid_tools_dof_handlers.inst.in @@ -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 &); @@ -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 &); @@ -271,7 +271,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLER; orthogonal_equality( const X::active_face_iterator &, const X::active_face_iterator &, - const int, + const unsigned int, const Tensor<1, deal_II_space_dimension> &, const FullMatrix &); @@ -279,7 +279,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLER; orthogonal_equality( const X::face_iterator &, const X::face_iterator &, - const int, + const unsigned int, const Tensor<1, deal_II_space_dimension> &, const FullMatrix &); @@ -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> &, const Tensor<1, X::space_dimension> &, const FullMatrix &); @@ -308,7 +308,7 @@ for (X : SEQUENTIAL_TRIANGULATION_AND_DOFHANDLERS; collect_periodic_faces( const X &, const types::boundary_id, - const int, + const unsigned int, std::vector> &, const Tensor<1, X::space_dimension> &, const FullMatrix &); @@ -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::cell_iterator>> &, @@ -351,7 +351,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const parallel::distributed::Triangulation &, const types::boundary_id, - const int, + const unsigned int, std::vector::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::cell_iterator>> &, @@ -399,7 +399,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const parallel::shared::Triangulation &, const types::boundary_id, - const int, + const unsigned int, std::vector::cell_iterator>> &,