]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix usage of int_to_string
authorRene Gassmoeller <R.Gassmoeller@mailbox.org>
Thu, 10 Dec 2015 01:21:55 +0000 (19:21 -0600)
committerRene Gassmoeller <R.Gassmoeller@mailbox.org>
Thu, 10 Dec 2015 03:01:46 +0000 (21:01 -0600)
include/deal.II/lac/block_indices.h
include/deal.II/lac/sparse_matrix.templates.h
source/base/index_set.cc
source/dofs/dof_renumbering.cc
source/grid/grid_reordering.cc
tests/base/utilities_11.cc

index 539611ff6b7dabb2aad9e7ee4892646057b0301c..7f4f7156044b88523892b7a305721fb3b293cbdd 100644 (file)
@@ -359,9 +359,9 @@ BlockIndices::to_string () const
     {
       if (i>0)
         result += ',';
-      result += Utilities::int_to_string(block_size(i));
+      result += Utilities::to_string(block_size(i));
     }
-  result += "|" + Utilities::int_to_string(total_size()) + ']';
+  result += "|" + Utilities::to_string(total_size()) + ']';
   return result;
 }
 
index 5a992bac277890bb50267bc355634039befeefe1..4f145c555c72c6fe2bf52f0736e33a37d523785f 100644 (file)
@@ -1341,7 +1341,7 @@ namespace
              ExcMessage("There is a zero on the diagonal of this matrix "
                         "in row "
                         +
-                        Utilities::int_to_string(row)
+                        Utilities::to_string(row)
                         +
                         ". The preconditioner you selected cannot work if that "
                         "is the case because one of its steps requires "
index bad685f15686fa755494e632349cd34ede82ec99..3cc560614b93fc62217b5997064dcc21363f366e 100644 (file)
@@ -499,10 +499,10 @@ IndexSet::make_trilinos_map (const MPI_Comm &communicator,
                           "contain all indices exactly once: the sum of "
                           "the number of entries the various processors "
                           "want to store locally is "
-                          + Utilities::int_to_string (n_global_elements) +
+                          + Utilities::to_string (n_global_elements) +
                           " whereas the total size of the object to be "
                           "allocated is "
-                          + Utilities::int_to_string (size()) +
+                          + Utilities::to_string (size()) +
                           ". In other words, there are "
                           "either indices that are not spoken for "
                           "by any processor, or there are indices that are "
index 8281d2e47858628965c9c3d80465040b8f5a7cae..43e9804d7493c792e2e696f4f1c5af1318cc580d 100644 (file)
@@ -434,7 +434,7 @@ namespace DoFRenumbering
           {
             Assert (locally_owned.is_element (starting_indices[i]),
                     ExcMessage ("You specified global degree of freedom "
-                                + Utilities::int_to_string(starting_indices[i]) +
+                                + Utilities::to_string(starting_indices[i]) +
                                 " as a starting index, but this index is not among the "
                                 "locally owned ones on this processor."));
             local_starting_indices[i] = locally_owned.index_within_set(starting_indices[i]);
index fe4e1dcce21284ae66d97dc58c28171847a45f01..37fd5f17c1d5b61ef627fe0b4370444a8cf8691f 100644 (file)
@@ -767,9 +767,9 @@ GridReordering<2>::invert_all_cells_of_negative_grid(const std::vector<Point<2>
                                      "negative volume. You need to check your mesh which "
                                      "cells these are and how they got there.\n"
                                      "As a hint, of the total ")
-                         + Utilities::int_to_string (cells.size())
+                         + Utilities::to_string (cells.size())
                          + " cells in the mesh, "
-                         + Utilities::int_to_string (n_negative_cells)
+                         + Utilities::to_string (n_negative_cells)
                          + " appear to have a negative volume."));
 }
 
index 47686ea42d6e5d98f945f1a8a49f43da6a84544e..3c3fd942bd00a426c2e8131e44ed6703f5abb23a 100644 (file)
 void test ()
 {
   unsigned long long int i = std::pow(2,33);
-  Assert(Utilities::to_string (i)=="8589934592", ExcInternalError());
-  Assert(Utilities::to_string (i,11)=="08589934592", ExcInternalError());
+  Assert(Utilities::to_string (i) == "8589934592", ExcInternalError());
+  Assert(Utilities::to_string (i,11) == "08589934592", ExcInternalError());
 
   unsigned long long j = std::pow(2,31);
-  Assert(Utilities::to_string(j)=="2147483648", ExcInternalError());
+  Assert(Utilities::to_string(j) == "2147483648", ExcInternalError());
 
   int k = - std::pow(2,30);
-  Assert(Utilities::to_string (k)=="-1073741824", ExcInternalError());
-  Assert(Utilities::to_string (k,12)=="-01073741824", ExcInternalError());
+  Assert(Utilities::to_string (k) == "-1073741824", ExcInternalError());
+  Assert(Utilities::to_string (k,12) == "-01073741824", ExcInternalError());
 
   long long int l = - std::pow(2,35);
-  Assert(Utilities::to_string (l)=="-34359738368", ExcInternalError());
-  Assert(Utilities::to_string (l,13)=="-034359738368", ExcInternalError());
+  Assert(Utilities::to_string (l) == "-34359738368", ExcInternalError());
+  Assert(Utilities::to_string (l,13) == "-034359738368", ExcInternalError());
 
   float f (-3.14159265358979323846264338327950288419716939937510);
-  Assert(Utilities::to_string (f)=="-3.14159274", ExcInternalError());
-  Assert(Utilities::to_string (f,13)=="-003.14159274", ExcInternalError());
+  Assert(Utilities::to_string (f) == "-3.14159274", ExcInternalError());
+  Assert(Utilities::to_string (f,13) == "-003.14159274", ExcInternalError());
 
   double d (-3.14159265358979323846264338327950288419716939937510);
-  Assert(Utilities::to_string (d)=="-3.1415926535897931", ExcInternalError());
-  Assert(Utilities::to_string (d,20)=="-03.1415926535897931", ExcInternalError());
+  Assert(Utilities::to_string (d) == "-3.1415926535897931", ExcInternalError());
+  Assert(Utilities::to_string (d,20) == "-03.1415926535897931", ExcInternalError());
 
   long double ld (-3.14159265358979323846264338327950288419716939937510L);
-  Assert(Utilities::to_string (ld)=="-3.14159265358979323851", ExcInternalError());
-  Assert(Utilities::to_string (ld,24)=="-03.14159265358979323851", ExcInternalError());
+  Assert(Utilities::to_string (ld) == "-3.14159265358979323851", ExcInternalError());
+  Assert(Utilities::to_string (ld,24) == "-03.14159265358979323851", ExcInternalError());
 
   double ed (-3.1415926535e-115);
-  Assert(Utilities::to_string (ed)=="-3.1415926534999999e-115", ExcInternalError());
-  Assert(Utilities::to_string (ed,24)=="-3.1415926534999999e-115", ExcInternalError());
+  Assert(Utilities::to_string (ed) == "-3.1415926534999999e-115", ExcInternalError());
+  Assert(Utilities::to_string (ed,28) == "-00003.1415926534999999e-115", ExcInternalError());
 
   deallog << "Ok." << std::endl;
 }

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.