]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
use the same value for PI in all places and add a comment to unify all these places...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Apr 2001 21:31:40 +0000 (21:31 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Apr 2001 21:31:40 +0000 (21:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@4456 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/data_out_base.cc
deal.II/deal.II/source/grid/grid_generator.cc
deal.II/deal.II/source/grid/grid_out.cc
deal.II/deal.II/source/numerics/data_out_rotation.cc
deal.II/deal.II/source/numerics/derivative_approximation.cc

index 4efcdc5cbd94cc50eb65c6a3fd81a5a4c71009c8..a5bfe2405f8cf583cdba1dcd26bbce7cdca195d3 100644 (file)
@@ -1231,7 +1231,8 @@ void DataOutBase::write_eps (const typename std::vector<Patch<dim,spacedim> > &p
                                                   // the height field, I don't know
                                                   // it.
                  EpsCell2d eps_cell;
-                 const double pi = 3.1415926536;
+//TODO:[?] Unify the various places where PI is defined to a central instance  
+                 const double pi = 3.141592653589793238462;
                  const double cx = -cos(pi-flags.azimut_angle * 2*pi / 360.),
                               cz = -cos(flags.turn_angle * 2*pi / 360.),
                               sx = sin(pi-flags.azimut_angle * 2*pi / 360.),
index 73b87fab774543540a1dcefb4da238d7c6d38c31..d7bf33148ad42fa53889cc3701acfd71b2ad29b1 100644 (file)
@@ -311,7 +311,8 @@ void GridGenerator::hyper_shell<> (Triangulation<2>   &tria,
   Assert ((inner_radius > 0) && (inner_radius < outer_radius),
          ExcInvalidRadii ());
   
-  const double pi     = 3.14159265358979323846;
+//TODO:[?] Unify the various places where PI is defined to a central instance  
+  const double pi = 3.141592653589793238462;
   
                                   // determine the number of cells
                                   // for the grid. if not provided by
index 023d020e37b773bb229eb5b343fde96ff7865180..8de92ec918b108d75e2e0961daa34e87e7cc126e 100644 (file)
@@ -679,9 +679,10 @@ void GridOut::write_eps (const Triangulation<dim> &tria,
                                         // is in direction of the viewer, but
                                         // I am too tired at present to fix
                                         // this
+//TODO:[?] Unify the various places where PI is defined to a central instance  
+       const double pi = 3.141592653589793238462;
        const double z_angle    = eps_flags_3.azimut_angle;
        const double turn_angle = eps_flags_3.turn_angle;
-       const double pi = 3.1415926536;
        const Point<dim> view_direction(-sin(z_angle * 2.*pi / 360.) * sin(turn_angle * 2.*pi / 360.),
                                        +sin(z_angle * 2.*pi / 360.) * cos(turn_angle * 2.*pi / 360.),
                                        -cos(z_angle * 2.*pi / 360.));
index 4aa135e855406ce91f68fa889c2e25fd71fec0c0..39081edcbde6e27688959aca5a0be84c7f271f63 100644 (file)
@@ -67,7 +67,8 @@ void DataOutRotation<dim>::build_some_patches (Data data)
                                   // place. for simplicity add the
                                   // initial direction at the end
                                   // again
-  const double pi = 3.14159265358979323846;
+//TODO:[?] Unify the various places where PI is defined to a central instance  
+  const double pi = 3.141592653589793238462;
   std::vector<Point<dim+1> > angle_directions (n_patches_per_circle+1);
   for (unsigned int i=0; i<=n_patches_per_circle; ++i)
     {
index 439c5b09c7d007db116c4c9471d44f4e92c370a3..053ad80c8dc4d15f75bdbf9f818041a1c01a4c51 100644 (file)
@@ -275,7 +275,8 @@ C DEFINE A TEST MATRIX
   
 */
 
-  const double pi = 3.141592653587932384;
+//TODO:[?] Unify the various places where PI is defined to a central instance  
+  const double pi = 3.141592653589793238462;
   const double am = trace(d) / 3.;
 
                                   // s := d - trace(d) 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.