From f8a1f2f919200c954330e90c75989bff729797ea Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Fri, 26 Feb 2021 00:10:51 -0800 Subject: [PATCH] spherical to cartesian missing phi term. benign for analytical fields --- Source/Particles/PulsarParameters.H | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Particles/PulsarParameters.H b/Source/Particles/PulsarParameters.H index fc7999308be..bda589dbfff 100644 --- a/Source/Particles/PulsarParameters.H +++ b/Source/Particles/PulsarParameters.H @@ -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 @@ -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