[cig-commits] [commit] master: Do not modify pcout for GPlates output. (790ff3b)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Jun 16 10:45:27 PDT 2014


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/40944f3a0c6a71132cbdf1d431046b3c444f459e...cbc3b2ab6317c0e8dd95a2f58111ede8beadf8d7

>---------------------------------------------------------------

commit 790ff3b4f6dea0843ce2f62be4f4f00f616ad029
Author: Rene Gassmoeller <R.Gassmoeller at mailbox.org>
Date:   Mon Jun 16 19:30:07 2014 +0200

    Do not modify pcout for GPlates output.


>---------------------------------------------------------------

790ff3b4f6dea0843ce2f62be4f4f00f616ad029
 source/velocity_boundary_conditions/gplates.cc | 27 +++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/source/velocity_boundary_conditions/gplates.cc b/source/velocity_boundary_conditions/gplates.cc
index a9d5100..e411ff4 100644
--- a/source/velocity_boundary_conditions/gplates.cc
+++ b/source/velocity_boundary_conditions/gplates.cc
@@ -95,23 +95,24 @@ namespace aspect
         const Tensor<1,3> point_one = cartesian_surface_coordinates(convert_tensor<2,3>(surface_point_one));
         const Tensor<1,3> point_two = cartesian_surface_coordinates(convert_tensor<2,3>(surface_point_two));
 
-        pcout << std::setprecision (3) << std::setw(3) << std::fixed << std::endl
-                  << "   Set up GPlates boundary velocity module."  << std::endl
-                  << std::endl;
+        std::ostringstream output;
+
+        output << std::setprecision (3) << std::setw(3) << std::fixed << std::endl
+               << "   Set up GPlates boundary velocity module."  << std::endl
+               << std::endl;
         if (dim == 2)
           {
-            pcout << "   Input point 1 spherical coordinates: " << surface_point_one << std::endl
-                  << "   Input point 1 Cartesian output coordinates: " << rotate(point_one,rotation_axis,-rotation_angle)  << std::endl
-                  << "   Input point 2 spherical coordinates: " << surface_point_two << std::endl
-                  << "   Input point 2 Cartesian output coordinates: " << rotate(point_two,rotation_axis,-rotation_angle)  << std::endl
-                  << std::endl <<  std::setprecision(2)
-                  << "   Model will be rotated by " << -rotation_angle*180/numbers::PI
-                  << " degrees around axis " << rotation_axis << std::endl
-                  << std::endl;
+            output << "   Input point 1 spherical coordinates: " << surface_point_one << std::endl
+                   << "   Input point 1 Cartesian output coordinates: " << rotate(point_one,rotation_axis,-rotation_angle)  << std::endl
+                   << "   Input point 2 spherical coordinates: " << surface_point_two << std::endl
+                   << "   Input point 2 Cartesian output coordinates: " << rotate(point_two,rotation_axis,-rotation_angle)  << std::endl
+                   << std::endl <<  std::setprecision(2)
+                   << "   Model will be rotated by " << -rotation_angle*180/numbers::PI
+                   << " degrees around axis " << rotation_axis << std::endl
+                   << std::endl;
           }
 
-        pcout << std::setprecision(6);
-        pcout.get_stream().unsetf(std::ios_base::floatfield);
+        pcout << output.str();
       }
 
       bool



More information about the CIG-COMMITS mailing list