Skip to content

Commit f8a1f2f

Browse files
spherical to cartesian missing phi term. benign for analytical fields
1 parent f72e41c commit f8a1f2f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/Particles/PulsarParameters.H

+4-2
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ namespace PulsarParm
169169
amrex::Real const phi, amrex::Real & F_x)
170170
{
171171
F_x = F_r * std::sin(theta) * std::cos(phi)
172-
+ F_theta * std::cos(theta) * std::cos(phi);
172+
+ F_theta * std::cos(theta) * std::cos(phi)
173+
- F_phi * std::sin(phi);
173174
}
174175

175176
AMREX_GPU_HOST_DEVICE AMREX_INLINE
@@ -179,7 +180,8 @@ namespace PulsarParm
179180
amrex::Real const phi, amrex::Real & F_y)
180181
{
181182
F_y = F_r * std::sin(theta) * std::sin(phi)
182-
+ F_theta * std::cos(theta) * std::sin(phi);
183+
+ F_theta * std::cos(theta) * std::sin(phi)
184+
+ F_phi * std::cos(phi);
183185
}
184186

185187
AMREX_GPU_HOST_DEVICE AMREX_INLINE

0 commit comments

Comments
 (0)