Skip to content

Commit

Permalink
Ggravity does not need to be static. (#2791)
Browse files Browse the repository at this point in the history
Compute it as const -- we always use C::Gconst
  • Loading branch information
zingale authored Mar 19, 2024
1 parent 33bd033 commit bfce27d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Source/gravity/Gravity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Real Gravity::mass_offset = 0.0;

// ************************************************************************************** //

static Real Ggravity = 0.;
const Real Ggravity = 4.0 * M_PI * C::Gconst;

///
/// Multipole gravity data
Expand Down Expand Up @@ -264,13 +264,6 @@ Gravity::read_params ()

}

Ggravity = 4.0 * M_PI * C::Gconst;
if (gravity::verbose > 1 && ParallelDescriptor::IOProcessor())
{
std::cout << "Getting Gconst from constants: " << C::Gconst << std::endl;
std::cout << "Using " << Ggravity << " for 4 pi G in Gravity.cpp " << std::endl;
}

done = true;
}
}
Expand Down

0 comments on commit bfce27d

Please sign in to comment.