Skip to content

Commit

Permalink
CLN: cleanup redefinition of idfx::randm in planet tests
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Nov 15, 2023
1 parent 6947116 commit 0b73366
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 116 deletions.
20 changes: 0 additions & 20 deletions test/Planet/Planet3Body/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,6 @@ real densityFloorGlob;
real masstaperGlob;
real omegaGlob;

/*********************************************/
/**
Customized random number generator
Allow one to have consistant random numbers
generators on different architectures.
**/
/*********************************************/
real randm(void) {
const int a = 16807;
const int m = 2147483647;
static int in0 = 13763 + 2417*idfx::prank;
int q;

/* find random number */
q= (int) fmod((double) a * in0, m);
in0=q;

return((real) ((double) q/(double)m));
}

void MySoundSpeed(DataBlock &data, const real t, IdefixArray3D<real> &cs) {
real h0 = h0Glob;
real flaringIndex = flaringIndexGlob;
Expand Down
19 changes: 0 additions & 19 deletions test/Planet/PlanetMigration2D/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@ real alphaGlob;
real densityFloorGlob;
real omegaGlob;

/*********************************************/
/**
Customized random number generator
Allow one to have consistant random numbers
generators on different architectures.
**/
/*********************************************/
real randm(void) {
const int a = 16807;
const int m = 2147483647;
static int in0 = 13763 + 2417*idfx::prank;
int q;

/* find random number */
q= (int) fmod((double) a * in0, m);
in0=q;

return((real) ((double) q/(double)m));
}

void MySoundSpeed(DataBlock &data, const real t, IdefixArray3D<real> &cs) {
real h0 = h0Glob;
Expand Down
19 changes: 0 additions & 19 deletions test/Planet/PlanetPlanetRK42D/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@ real alphaGlob;
real densityFloorGlob;
real omegaGlob;

/*********************************************/
/**
Customized random number generator
Allow one to have consistant random numbers
generators on different architectures.
**/
/*********************************************/
real randm(void) {
const int a = 16807;
const int m = 2147483647;
static int in0 = 13763 + 2417*idfx::prank;
int q;

/* find random number */
q= (int) fmod((double) a * in0, m);
in0=q;

return((real) ((double) q/(double)m));
}

void MySoundSpeed(DataBlock &data, const real t, IdefixArray3D<real> &cs) {
real h0 = h0Glob;
Expand Down
20 changes: 0 additions & 20 deletions test/Planet/PlanetSpiral2D/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,6 @@ real densityFloorGlob;
real masstaperGlob;
real omegaGlob;

/*********************************************/
/**
Customized random number generator
Allow one to have consistant random numbers
generators on different architectures.
**/
/*********************************************/
real randm(void) {
const int a = 16807;
const int m = 2147483647;
static int in0 = 13763 + 2417*idfx::prank;
int q;

/* find random number */
q= (int) fmod((double) a * in0, m);
in0=q;

return((real) ((double) q/(double)m));
}


void MySoundSpeed(DataBlock &data, const real t, IdefixArray3D<real> &cs) {
real h0 = h0Glob;
Expand Down
19 changes: 0 additions & 19 deletions test/Planet/PlanetTorque3D/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,6 @@ real densityFloorGlob;
real masstaperGlob;
real omegaGlob;

/*********************************************/
/**
Customized random number generator
Allow one to have consistant random numbers
generators on different architectures.
**/
/*********************************************/
real randm(void) {
const int a = 16807;
const int m = 2147483647;
static int in0 = 13763 + 2417*idfx::prank;
int q;

/* find random number */
q= (int) fmod((double) a * in0, m);
in0=q;

return((real) ((double) q/(double)m));
}

void MySoundSpeed(DataBlock &data, const real t, IdefixArray3D<real> &cs) {
real h0 = h0Glob;
Expand Down
19 changes: 0 additions & 19 deletions test/Planet/PlanetsIsActiveRK52D/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@ real alphaGlob;
real densityFloorGlob;
real omegaGlob;

/*********************************************/
/**
Customized random number generator
Allow one to have consistant random numbers
generators on different architectures.
**/
/*********************************************/
real randm(void) {
const int a = 16807;
const int m = 2147483647;
static int in0 = 13763 + 2417*idfx::prank;
int q;

/* find random number */
q= (int) fmod((double) a * in0, m);
in0=q;

return((real) ((double) q/(double)m));
}

void MySoundSpeed(DataBlock &data, const real t, IdefixArray3D<real> &cs) {
real h0 = h0Glob;
Expand Down

0 comments on commit 0b73366

Please sign in to comment.