From 0b05d67942dfffcca7f57451cf7978cd67bbccdb Mon Sep 17 00:00:00 2001 From: hartmann Date: Sun, 30 Mar 2008 09:07:51 +0000 Subject: [PATCH] vertex_index now returns an unsigned int instead of an int. git-svn-id: https://svn.dealii.org/trunk@15952 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/grid/tria_accessor.h | 8 ++++---- deal.II/deal.II/source/grid/grid_tools.cc | 6 +++--- deal.II/deal.II/source/grid/tria.cc | 8 ++++---- deal.II/deal.II/source/grid/tria_accessor.cc | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/deal.II/deal.II/include/grid/tria_accessor.h b/deal.II/deal.II/include/grid/tria_accessor.h index 62082fdefb..0f59aedefc 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.h +++ b/deal.II/deal.II/include/grid/tria_accessor.h @@ -543,7 +543,7 @@ class TriaObjectAccessor : public TriaAccessor * @p DoFAccessor::vertex_dof_index * functions. */ - int vertex_index (const unsigned int i) const; + unsigned int vertex_index (const unsigned int i) const; /** * Return a reference to the @@ -1284,7 +1284,7 @@ class TriaObjectAccessor<1, dim> : public TriaAccessor<1,dim> * @p DoFAccessor::vertex_dof_index * functions. */ - int vertex_index (const unsigned int i) const; + unsigned int vertex_index (const unsigned int i) const; /** * Return a reference to the @@ -1919,7 +1919,7 @@ class TriaObjectAccessor<2, dim> : public TriaAccessor<2,dim> * DoFAccessor::vertex_dof_index * functions. */ - int vertex_index (const unsigned int i) const; + unsigned int vertex_index (const unsigned int i) const; /** * Return a reference to the @@ -2612,7 +2612,7 @@ class TriaObjectAccessor<3, dim> : public TriaAccessor<3,dim> * @p DoFAccessor::vertex_dof_index * functions. */ - int vertex_index (const unsigned int i) const; + unsigned int vertex_index (const unsigned int i) const; /** * Return a reference to the diff --git a/deal.II/deal.II/source/grid/grid_tools.cc b/deal.II/deal.II/source/grid/grid_tools.cc index ae66929542..487443be79 100644 --- a/deal.II/deal.II/source/grid/grid_tools.cc +++ b/deal.II/deal.II/source/grid/grid_tools.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -609,7 +609,7 @@ GridTools::find_cells_adjacent_to_vertex(const Container &container, // if the vertex is part of that cell for (; cell != endc; ++cell) for (unsigned v = 0; v < GeometryInfo::vertices_per_cell; v++) - if (cell->vertex_index(v) == (int)vertex) + if (cell->vertex_index(v) == vertex) { // OK, we found a cell that contains // the particular vertex. We add it @@ -659,7 +659,7 @@ GridTools::find_cells_adjacent_to_vertex(const Container &container, { bool found = false; for (unsigned v=0; v::vertices_per_cell; v++) - if (nb->vertex_index(v) == (int)vertex) + if (nb->vertex_index(v) == vertex) { found = true; break; diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 5d8a056722..ca121b498a 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -4853,7 +4853,7 @@ unsigned int Triangulation::max_adjacent_cells () const unsigned int max_vertex_index = 0; for (; cell!=endc; ++cell) for (unsigned vertex=0; vertex::vertices_per_cell; ++vertex) - if (cell->vertex_index(vertex) > (signed int)max_vertex_index) + if (cell->vertex_index(vertex) > max_vertex_index) max_vertex_index = cell->vertex_index(vertex); // store the number of times a cell @@ -6817,13 +6817,13 @@ Triangulation<3>::execute_refinement () // first vertex is the same middle // vertex. for (unsigned int i=0; i<24; ++i) - if (lines[i]->vertex_index((i+1)%2)==static_cast(vertex_indices[i/4])) + if (lines[i]->vertex_index((i+1)%2)==vertex_indices[i/4]) line_orientation[i]=true; else { // it must be the other way // round then - Assert(lines[i]->vertex_index(i%2)==static_cast(vertex_indices[i/4]), + Assert(lines[i]->vertex_index(i%2)==vertex_indices[i/4], ExcInternalError()); line_orientation[i]=false; } diff --git a/deal.II/deal.II/source/grid/tria_accessor.cc b/deal.II/deal.II/source/grid/tria_accessor.cc index 0308461896..5b4a937e9d 100644 --- a/deal.II/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/deal.II/source/grid/tria_accessor.cc @@ -47,7 +47,7 @@ TriaObjectAccessor<1, dim>::set (const internal::Triangulation::TriaObject<1> & template -int TriaObjectAccessor<1, dim>::vertex_index (const unsigned int i) const +unsigned int TriaObjectAccessor<1, dim>::vertex_index (const unsigned int i) const { Assert (i<2, ExcIndexRange(i,0,2)); return objects().cells[this->present_index].face (i); @@ -348,7 +348,7 @@ TriaObjectAccessor<2, dim>::set (const internal::Triangulation::TriaObject<2> &q template -int TriaObjectAccessor<2, dim>::vertex_index (const unsigned int corner) const +unsigned int TriaObjectAccessor<2, dim>::vertex_index (const unsigned int corner) const { Assert (corner<4, ExcIndexRange(corner,0,4)); @@ -889,7 +889,7 @@ TriaObjectAccessor<3, 3>::set (const internal::Triangulation::TriaObject<3> &hex template -int TriaObjectAccessor<3, dim>::vertex_index (const unsigned int corner) const +unsigned int TriaObjectAccessor<3, dim>::vertex_index (const unsigned int corner) const { Assert (corner<8, ExcIndexRange(corner,0,8)); -- 2.39.5