]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a bunch of checks of the form
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Apr 2009 12:42:29 +0000 (12:42 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Apr 2009 12:42:29 +0000 (12:42 +0000)
  unsigned_variable >= 0
as we get warnings about these.

git-svn-id: https://svn.dealii.org/trunk@18568 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/constraint_matrix.templates.h

index 63bd4d2a4f16a9baeaba6c7047884e4b43154fcb..cb1618a76a167e5c25d6abf88c3af41695fd7632 100644 (file)
@@ -1286,13 +1286,13 @@ distribute_local_to_global (const FullMatrix<double>        &local_matrix,
                                   // element is zero. 
       if (have_indirect_rows == false)
        {
-         Assert(loc_row >= 0 && loc_row < n_local_dofs,
+         Assert(loc_row < n_local_dofs,
                 ExcInternalError());
 
          for (unsigned int j=0; j < n_actual_dofs; ++j)
            {
              const unsigned int loc_col = my_indices[j].local_row;
-             Assert(loc_col >= 0 && loc_col < n_local_dofs,
+             Assert(loc_col < n_local_dofs,
                     ExcInternalError());
 
              if (local_matrix(loc_row,loc_col) != 0)
@@ -1332,14 +1332,14 @@ distribute_local_to_global (const FullMatrix<double>        &local_matrix,
                                   // local matrix
              if (loc_row != deal_II_numbers::invalid_unsigned_int)
                {
-                 Assert (loc_row >= 0 && loc_row < n_local_dofs,
+                 Assert (loc_row < n_local_dofs,
                          ExcInternalError());
 
                                   // case 1a: col has direct contribution
                                   // in local matrix
                  if (loc_col != deal_II_numbers::invalid_unsigned_int)
                    {
-                     Assert (loc_col >= 0 && loc_col < n_local_dofs,
+                     Assert (loc_col < n_local_dofs,
                              ExcInternalError());
                      col_val = local_matrix(loc_row,loc_col);
                    }
@@ -1371,7 +1371,7 @@ distribute_local_to_global (const FullMatrix<double>        &local_matrix,
                  double add_this;
                  if (loc_col != deal_II_numbers::invalid_unsigned_int)
                    {
-                     Assert (loc_col >= 0 && loc_col < n_local_dofs,
+                     Assert (loc_col < n_local_dofs,
                              ExcInternalError());
                      add_this = local_matrix(my_indices[i].constraints[q].first,
                                              loc_col);
@@ -1411,7 +1411,7 @@ distribute_local_to_global (const FullMatrix<double>        &local_matrix,
            {
              if (loc_row != deal_II_numbers::invalid_unsigned_int)
                {
-                 Assert (loc_row >= 0 && loc_row < n_local_dofs,
+                 Assert (loc_row < n_local_dofs,
                          ExcInternalError());
                  val = local_vector(loc_row);
                  for (unsigned int i=0; i<constraint_lines.size(); ++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.