[cig-commits] commit 2513 by bangerth to /var/svn/dealii/aspect

dealii.demon at gmail.com dealii.demon at gmail.com
Sun Apr 13 13:53:26 PDT 2014


Revision 2513

Avoid a boost::lexical_cast that creates trouble with some GCC versions.

U   trunk/aspect/source/simulator/parameters.cc
U   trunk/aspect/source/termination_criteria/end_time.cc


http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2513&peg=2513

Diff:
Modified: trunk/aspect/source/simulator/parameters.cc
===================================================================
--- trunk/aspect/source/simulator/parameters.cc	2014-04-13 15:03:43 UTC (rev 2512)
+++ trunk/aspect/source/simulator/parameters.cc	2014-04-13 20:53:23 UTC (rev 2513)
@@ -24,7 +24,6 @@
 #include <aspect/global.h>
 
 #include <deal.II/base/parameter_handler.h>
-#include <boost/lexical_cast.hpp>
 
 #include <dirent.h>
 
@@ -114,8 +113,8 @@
                        "one can choose $c>1$) though a CFL number significantly larger than "
                        "one will yield rather diffusive solutions. Units: None.");
     prm.declare_entry ("Maximum time step",
-                       boost::lexical_cast<std::string>(std::numeric_limits<double>::max() /
-                                                        year_in_seconds),
+                       /* boost::lexical_cast<std::string>(std::numeric_limits<double>::max() /
+                                                           year_in_seconds) = */ "5.69e+300",
                        Patterns::Double (0),
                        "Set a maximum time step size for the solver to use. Generally the time step "
                        "based on the CFL number should be sufficient, but for complicated models "

Modified: trunk/aspect/source/termination_criteria/end_time.cc
===================================================================
--- trunk/aspect/source/termination_criteria/end_time.cc	2014-04-13 15:03:43 UTC (rev 2512)
+++ trunk/aspect/source/termination_criteria/end_time.cc	2014-04-13 20:53:23 UTC (rev 2513)
@@ -21,7 +21,6 @@
 
 
 #include <aspect/termination_criteria/end_time.h>
-#include <boost/lexical_cast.hpp>
 
 
 namespace aspect
@@ -51,8 +50,8 @@
     EndTime<dim>::declare_parameters (ParameterHandler &prm)
     {
       prm.declare_entry ("End time",
-                         boost::lexical_cast<std::string>(std::numeric_limits<double>::max() /
-                                                          year_in_seconds),
+                        /* boost::lexical_cast<std::string>(std::numeric_limits<double>::max() /
+                                             year_in_seconds) = */ "5.69e+300",
                          Patterns::Double (),
                          "The end time of the simulation. The default value is a number "
                          "so that when converted from years to seconds it is approximately "


More information about the CIG-COMMITS mailing list