Skip to content

Commit

Permalink
spherical to cartesian missing phi term. benign for analytical fields
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed Mar 18, 2021
1 parent f72e41c commit f8a1f2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Particles/PulsarParameters.H
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ namespace PulsarParm
amrex::Real const phi, amrex::Real & F_x)
{
F_x = F_r * std::sin(theta) * std::cos(phi)
+ F_theta * std::cos(theta) * std::cos(phi);
+ F_theta * std::cos(theta) * std::cos(phi)
- F_phi * std::sin(phi);
}

AMREX_GPU_HOST_DEVICE AMREX_INLINE
Expand All @@ -179,7 +180,8 @@ namespace PulsarParm
amrex::Real const phi, amrex::Real & F_y)
{
F_y = F_r * std::sin(theta) * std::sin(phi)
+ F_theta * std::cos(theta) * std::sin(phi);
+ F_theta * std::cos(theta) * std::sin(phi)
+ F_phi * std::cos(phi);
}

AMREX_GPU_HOST_DEVICE AMREX_INLINE
Expand Down

0 comments on commit f8a1f2f

Please sign in to comment.