From c25be75e2f6cfeaa40175a8af372709800a0f404 Mon Sep 17 00:00:00 2001 From: Bruce Perry Date: Fri, 1 Dec 2023 10:57:53 -0700 Subject: [PATCH] use amrex pi --- Source/Constants.H | 2 +- Source/Geometry.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Constants.H b/Source/Constants.H index e2b385baa..eb7341635 100644 --- a/Source/Constants.H +++ b/Source/Constants.H @@ -5,7 +5,7 @@ namespace constants { AMREX_GPU_HOST_DEVICE constexpr amrex::Real PI() { - return 3.14159265358979323846264338327950288; + return amrex::Math::pi(); } AMREX_GPU_HOST_DEVICE constexpr amrex::Real smallu() diff --git a/Source/Geometry.cpp b/Source/Geometry.cpp index 35e34de03..ad5c110b9 100644 --- a/Source/Geometry.cpp +++ b/Source/Geometry.cpp @@ -332,7 +332,7 @@ RotatedCylinder::build( amrex::Array center = { AMREX_D_DECL(centervec[0], centervec[1], centervec[2])}; - rotation = (rotation / 180.) * M_PI; + rotation = (rotation / 180.) * constants::PI(); amrex::EB2::CylinderIF my_cyl(radius, direction, center, inside); @@ -361,7 +361,7 @@ RotatedBox::build(const amrex::Geometry& geom, const int max_coarsening_level) pp.query("box_rotation", rotation); pp.query("box_rotation_axe", rotation_axe); - rotation = (rotation / 180.) * M_PI; + rotation = (rotation / 180.) * constants::PI(); amrex::EB2::BoxIF bf(lo, hi, has_fluid_inside);