Skip to content

Commit e8c9c7e

Browse files
committed
compatability
1 parent b8d9306 commit e8c9c7e

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

pySDC/implementations/problem_classes/AllenCahn_MPIFFT.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(self, problem_params, dtype_u=mesh, dtype_f=imex_mesh):
5555
# Creating FFT structure
5656
ndim = len(problem_params['nvars'])
5757
axes = tuple(range(ndim))
58-
self.fft = PFFT(problem_params['comm'], list(problem_params['nvars']), axes=axes, dtype=np.float, collapse=True)
58+
self.fft = PFFT(problem_params['comm'], list(problem_params['nvars']), axes=axes, dtype=np.float64, collapse=True)
5959

6060
# get test data to figure out type and dimensions
6161
tmp_u = newDistArray(self.fft, problem_params['spectral'])

pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, problem_params, dtype_u=mesh, dtype_f=imex_mesh):
5454
# creating FFT structure
5555
ndim = len(problem_params['nvars'])
5656
axes = tuple(range(ndim))
57-
self.fft = PFFT(problem_params['comm'], list(problem_params['nvars']), axes=axes, dtype=np.float, collapse=True)
57+
self.fft = PFFT(problem_params['comm'], list(problem_params['nvars']), axes=axes, dtype=np.float64, collapse=True)
5858

5959
# get test data to figure out type and dimensions
6060
tmp_u = newDistArray(self.fft, problem_params['spectral'])

pySDC/implementations/problem_classes/PenningTrap_3D.py

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

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

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

pySDC/tutorial/step_3/B_adding_statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def run_penning_trap_simulation():
5353
problem_params = dict()
5454
problem_params['omega_E'] = 4.9 # E-field frequency
5555
problem_params['omega_B'] = 25.0 # B-field frequency
56-
problem_params['u0'] = np.array([[10, 0, 0], [100, 0, 100], [1], [1]]) # initial center of positions
56+
problem_params['u0'] = np.array([[10, 0, 0], [100, 0, 100], [1], [1]], dtype=object) # initial center of positions
5757
problem_params['nparts'] = 1 # number of particles in the trap
5858
problem_params['sig'] = 0.1 # smoothing parameter for the forces
5959

pySDC/tutorial/step_3/C_study_collocations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def run_simulation():
5757
problem_params = dict()
5858
problem_params['omega_E'] = 4.9
5959
problem_params['omega_B'] = 25.0
60-
problem_params['u0'] = np.array([[10, 0, 0], [100, 0, 100], [1], [1]])
60+
problem_params['u0'] = np.array([[10, 0, 0], [100, 0, 100], [1], [1]], dtype=object)
6161
problem_params['nparts'] = 1
6262
problem_params['sig'] = 0.1
6363

pySDC/tutorial/step_4/D_MLSDC_with_particles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def run_penning_trap_simulation(mlsdc, finter=False):
8383
problem_params = dict()
8484
problem_params['omega_E'] = 4.9 # E-field frequency
8585
problem_params['omega_B'] = 25.0 # B-field frequency
86-
problem_params['u0'] = np.array([[10, 0, 0], [100, 0, 100], [1], [1]]) # initial center of positions
86+
problem_params['u0'] = np.array([[10, 0, 0], [100, 0, 100], [1], [1]], dtype=object) # initial center of positions
8787
problem_params['nparts'] = 50 # number of particles in the trap
8888
problem_params['sig'] = 0.1 # smoothing parameter for the forces
8989

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[pytest]
22
markers =
33
fenics: tests relying on FEniCS
4+
slow: tests taking much longer than bearable

0 commit comments

Comments
 (0)