Ticket #68 (new feature request)

Opened 5 years ago

Move all constants to phys_constants.h

Reported by: rpwagner Owned by: somebody
Priority: minor Milestone:
Component: enzo Version: devel svn
Keywords: Cc:

Description

M_PI has been in standard math headers for a while (along with other convenient numbers). We should get in the habit of defining the constants in one place (i.e., phys_constants.h), and being consistent.

rpwagner@cable:~/Projects/analysis_merge/src/enzo$ grep '3\.14' *C
Grid_AddExternalAcceleration.C:    float Pi = 3.14159, accel;
Grid_CollapseTestInitializeGrid.C:               pi = 3.14159, mh = 1.67e-24, kboltz = 1.381e-16;
Grid_FlagCellsToBeRefinedByJeansLength.C:  FLOAT JLSquared = (double(3.14159*1.38e-16/6.67e-8)/
Grid_FlagCellsToBeRefinedByJeansLength.C:    JLSquared = double(4.0*3.14159*3.14159)/GravitationalConstant; //AK
Grid_PrepareGreensFunction.C:  float GravConst, pi = 3.14159;
Grid_PreparePeriodicGreensFunction.C:  const float twopi = 2.0*3.14159;
Grid_SetMinimumSupport.C:    const float pi = 3.14159;
Grid_TestGravityCheckResults.C:  float r, fanalytic, fradial, ftang, pi = 3.14159;
Grid_TestGravityInitializeGrid.C:  float phi, r, theta, pi = 3.14159;
Grid_TestGravitySphereInitializeGrid.C:  float phi, r, theta, pi = 3.14159;
Grid_TestOrbitInitializeGrid.C:        VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, pi = 3.1415926;
Grid_ZeldovichPancakeInitializeGrid.C:  const float Pi = 3.14159;
PrepareIsolatedGreensFunction.C:  float GravConst, pi = 3.14159;
RotatingCylinderInitialize.C:  float Pi                      = 3.14159;
SedovBlastInitialize.C:  float Pi                      = 3.14159;
SetDefaultGlobalValues.C:  const float Pi = 3.14159;
SupernovaRestartInitialize.C:                        (4.0/3.0*3.14159*POW(EjectaRadius, 3));
rpwagner@cable:~/Projects/analysis_merge/src/enzo$ 
Note: See TracTickets for help on using tickets.