Skip to content

Commit

Permalink
use amrex pi
Browse files Browse the repository at this point in the history
  • Loading branch information
baperry2 committed Dec 1, 2023
1 parent 87fb477 commit c25be75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Constants.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace constants {
AMREX_GPU_HOST_DEVICE constexpr amrex::Real
PI()
{
return 3.14159265358979323846264338327950288;
return amrex::Math::pi<amrex::Real>();
}
AMREX_GPU_HOST_DEVICE constexpr amrex::Real
smallu()
Expand Down
4 changes: 2 additions & 2 deletions Source/Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ RotatedCylinder::build(
amrex::Array<amrex::Real, AMREX_SPACEDIM> 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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit c25be75

Please sign in to comment.