Skip to content

Commit 9d01299

Browse files
committed
bugfixing
1 parent 6563578 commit 9d01299

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pySDC/implementations/problem_classes/PenningTrap_3D.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,9 @@ def u_exact(self, t):
191191
Ip = u0[0][1] - Im
192192

193193
# compute position in complex notation
194-
w = np.complex128(Rp, Ip) * np.exp(-np.complex128(0, Op * t)) + np.complex128(Rm, Im) * \
195-
np.exp(-np.complex128(0, Om * t))
194+
w = (Rp + Ip * 1j) * np.exp(-Op * t * 1j) + (Rm + Im * 1j) * np.exp(-Om * t * 1j)
196195
# compute velocity as time derivative of the position
197-
dw = -1j * Op * np.complex128(Rp, Ip) * np.exp(-np.complex128(0, Op * t)) - 1j * Om * np.complex128(Rm, Im) * \
198-
np.exp(-np.complex128(0, Om * t))
196+
dw = -1j * Op * (Rp + Ip * 1j) * np.exp(-Op * t * 1j) - 1j * Om * (Rm + Im * 1j) * np.exp(-Om * t * 1j)
199197

200198
# get the appropriate real and imaginary parts
201199
u.pos[0, 0] = w.real

0 commit comments

Comments
 (0)