]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix some warnings
authorkainan.wang <kainan.wang@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Apr 2013 02:05:54 +0000 (02:05 +0000)
committerkainan.wang <kainan.wang@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Apr 2013 02:05:54 +0000 (02:05 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29272 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/hp/dof_objects.h
deal.II/include/deal.II/lac/block_vector_base.h
deal.II/include/deal.II/lac/compressed_simple_sparsity_pattern.h
deal.II/include/deal.II/lac/parallel_block_vector.h
deal.II/include/deal.II/lac/trilinos_block_vector.h
deal.II/include/deal.II/lac/trilinos_parallel_block_vector.h
deal.II/include/deal.II/lac/vector.h

index da2d2b296b4fa485f99a2861d0530a1404b715c8..8ea18fccf324b9342a5a41ea0f7d8cd86064ec2b 100644 (file)
@@ -566,7 +566,7 @@ namespace internal
               ExcMessage ("No finite element collection is associated with "
                           "this DoFHandler"));
       Assert (obj_index < dof_offsets.size(),
-              ExcIndexRange (obj_index, 0, dof_offsets.size()));
+              ExcIndexRange (obj_index, 0, static_cast<unsigned int>(dof_offsets.size())));
       Assert ((fe_index != dealii::hp::DoFHandler<dimm,spacedim>::default_fe_index),
               ExcMessage ("You need to specify a FE index when working "
                           "with hp DoFHandlers"));
index a5222ad5eac75a4e3576d2e8b65a3b627f748338..81acc9db74827ac06731d7b1a1397eb00830669a 100644 (file)
@@ -1836,7 +1836,7 @@ inline
 void
 BlockVectorBase<VectorType>::compress (::dealii::VectorOperation::values operation)
 {
-  for (size_type i=0; i<n_blocks(); ++i)
+  for (unsigned int i=0; i<n_blocks(); ++i)
     block(i).compress (operation);
 }
 
index c1f7e642a7a04068f44ca7cfe2c4ae019876b22c..9062e6cfa9c85c89a297c006d4b7cb7fc75ac3b7 100644 (file)
@@ -510,8 +510,8 @@ void
 CompressedSimpleSparsityPattern::add (const size_type i,
                                       const size_type j)
 {
-  Assert (i<rows, ExcIndexRange(i, 0, rows));
-  Assert (j<cols, ExcIndexRange(j, 0, cols));
+  Assert (i<rows, ExcIndexRangeType<size_type>(i, 0, rows));
+  Assert (j<cols, ExcIndexRangeType<size_type>(j, 0, cols));
 
   if (rowset.size() > 0 && !rowset.is_element(i))
     return;
@@ -531,7 +531,7 @@ CompressedSimpleSparsityPattern::add_entries (const size_type row,
                                               ForwardIterator end,
                                               const bool      indices_are_sorted)
 {
-  Assert (row < rows, ExcIndexRange (row, 0, rows));
+  Assert (row < rows, ExcIndexRangeType<size_type> (row, 0, rows));
 
   if (rowset.size() > 0 && !rowset.is_element(row))
     return;
@@ -553,7 +553,7 @@ inline
 types::global_dof_index
 CompressedSimpleSparsityPattern::row_length (const size_type row) const
 {
-  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
+  Assert (row < n_rows(), ExcIndexRangeType<size_type> (row, 0, n_rows()));
   if (rowset.size() > 0 && !rowset.is_element(row))
     return 0;
 
@@ -569,12 +569,12 @@ types::global_dof_index
 CompressedSimpleSparsityPattern::column_number (const size_type row,
                                                 const size_type index) const
 {
-  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
+  Assert (row < n_rows(), ExcIndexRangeType<size_type> (row, 0, n_rows()));
   Assert( rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
 
   const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row;
   Assert (index < lines[local_row].entries.size(),
-          ExcIndexRange (index, 0, lines[local_row].entries.size()));
+          ExcIndexRangeType<size_type> (index, 0, lines[local_row].entries.size()));
   return lines[local_row].entries[index];
 }
 
@@ -584,7 +584,7 @@ inline
 CompressedSimpleSparsityPattern::row_iterator
 CompressedSimpleSparsityPattern::row_begin (const size_type row) const
 {
-  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
+  Assert (row < n_rows(), ExcIndexRangeType<size_type> (row, 0, n_rows()));
   const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row;
   return lines[local_row].entries.begin();
 }
@@ -595,7 +595,7 @@ inline
 CompressedSimpleSparsityPattern::row_iterator
 CompressedSimpleSparsityPattern::row_end (const size_type row) const
 {
-  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
+  Assert (row < n_rows(), ExcIndexRangeType<size_type> (row, 0, n_rows()));
   const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row;
   return lines[local_row].entries.end();
 }
index 9a33e935a752cdd22d017f722e7b37b37309f12f..c221a6858a3b6b86e4359ee03ed69c0bb1b92ef6 100644 (file)
@@ -426,7 +426,7 @@ namespace parallel
       if (this->components.size() != this->n_blocks())
         this->components.resize(this->n_blocks());
 
-      for (size_type i=0; i<this->n_blocks(); ++i)
+      for (unsigned int i=0; i<this->n_blocks(); ++i)
         this->block(i).reinit(v.block(i), fast);
     }
 
index e2a955d81f2379c681c5195eb8c7ead20595fa17..53e8da5de4695ea07a4df7de24044e93f0fa630f 100644 (file)
@@ -539,7 +539,7 @@ namespace TrilinosWrappers
     Assert (n_blocks() == v.n_blocks(),
             ExcDimensionMismatch(n_blocks(),v.n_blocks()));
 
-    for (size_type row=0; row<n_blocks(); ++row)
+    for (unsigned int row=0; row<n_blocks(); ++row)
       block(row).swap (v.block(row));
   }
 
index d329051b9bdb24c6f73db1949e654dfef1ccea05..8c5408572d7328e00543654a3c56ef8240334946 100644 (file)
@@ -446,7 +446,7 @@ namespace TrilinosWrappers
     BlockVector::is_compressed () const
     {
       bool compressed = true;
-      for (size_type row=0; row<n_blocks(); ++row)
+      for (unsigned int row=0; row<n_blocks(); ++row)
         if (block(row).is_compressed() == false)
           {
             compressed = false;
@@ -504,7 +504,7 @@ namespace TrilinosWrappers
       Assert (n_blocks() == v.n_blocks(),
               ExcDimensionMismatch(n_blocks(),v.n_blocks()));
 
-      for (size_type row=0; row<n_blocks(); ++row)
+      for (unsigned int row=0; row<n_blocks(); ++row)
         block(row).swap (v.block(row));
     }
 
index d8da052cf7cdf9816b0aae83098feba3a6e4a229..0b530d0662e185ba9d28178589ca943bbecdd3bc 100644 (file)
@@ -1261,7 +1261,7 @@ template <typename Number>
 inline
 Number &Vector<Number>::operator() (const size_type i)
 {
-  Assert (i<vec_size, ExcIndexRange(i,0,vec_size));
+  Assert (i<vec_size, ExcIndexRangeType<size_type>(i,0,vec_size));
   return val[i];
 }
 

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.