From bfce27d63c286bea808f78969bc1f74b7480e4c2 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 19 Mar 2024 11:20:23 -0400 Subject: [PATCH] Ggravity does not need to be static. (#2791) Compute it as const -- we always use C::Gconst --- Source/gravity/Gravity.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Source/gravity/Gravity.cpp b/Source/gravity/Gravity.cpp index b2f0f90d4e..606562c843 100644 --- a/Source/gravity/Gravity.cpp +++ b/Source/gravity/Gravity.cpp @@ -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 @@ -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; } }