Skip to content

Commit e3fd9ba

Browse files
committed
Added gpu_integrator flag
1 parent 3b172e6 commit e3fd9ba

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pyat/at/acceptance/acceptance.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def get_acceptance(
3737
grid_mode: GridMode = GridMode.RADIAL,
3838
use_mp: bool | MPMode = False,
3939
gpu_pool: list[int] | None = None,
40+
gpu_integrator: int | None = None,
4041
verbose: bool = False,
4142
divider: int = 2,
4243
shift_zero: float = 1.0e-6,
@@ -77,6 +78,7 @@ def get_acceptance(
7778
gpu_pool: List of GPU id to use when use_mp is
7879
:py:attr:`at.tracking.MPMode.GPU`. If None specified, if gets
7980
first GPU.
81+
gpu_integrator: Symplectic integrator used for GPU tracking
8082
verbose: Print out some information
8183
divider: Value of the divider used in
8284
:py:attr:`.GridMode.RECURSIVE` boundary search
@@ -137,6 +139,7 @@ def get_acceptance(
137139
print(f"\n{nprocu} GPU cores found")
138140
print("GPU acceptance calculation selected...")
139141
kwargs["gpu_pool"] = gpu_pool if gpu_pool is not None else [0]
142+
kwargs["integrator"] = gpu_integrator if gpu_integrator is not None else 4
140143
else:
141144
nprocu = 1
142145
print("Single process acceptance calculation selected...")
@@ -194,6 +197,7 @@ def get_1d_acceptance(
194197
grid_mode: GridMode | None = GridMode.RADIAL,
195198
use_mp: bool | MPMode = False,
196199
gpu_pool: list[int] | None = None,
200+
gpu_integrator: int | None = None,
197201
verbose: bool | None = False,
198202
divider: int | None = 2,
199203
shift_zero: float | None = 1.0e-6,
@@ -230,6 +234,7 @@ def get_1d_acceptance(
230234
gpu_pool: List of GPU id to use when use_mp is
231235
:py:attr:`at.tracking.MPMode.GPU`. If None specified, if gets
232236
first GPU.
237+
gpu_integrator: Symplectic integrator used for GPU tracking
233238
verbose: Print out some information
234239
divider: Value of the divider used in
235240
:py:attr:`.GridMode.RECURSIVE` boundary search
@@ -284,6 +289,7 @@ def get_1d_acceptance(
284289
grid_mode=grid_mode,
285290
use_mp=use_mp,
286291
gpu_pool=gpu_pool,
292+
gpu_integrator=gpu_integrator,
287293
verbose=verbose,
288294
start_method=start_method,
289295
divider=divider,
@@ -326,6 +332,7 @@ def get_horizontal_acceptance(
326332
gpu_pool: List of GPU id to use when use_mp is
327333
:py:attr:`at.tracking.MPMode.GPU`. If None specified, if gets
328334
first GPU.
335+
gpu_integrator: Symplectic integrator used for GPU tracking
329336
verbose: Print out some information
330337
divider: Value of the divider used in
331338
:py:attr:`.GridMode.RECURSIVE` boundary search
@@ -393,6 +400,7 @@ def get_vertical_acceptance(
393400
gpu_pool: List of GPU id to use when use_mp is
394401
:py:attr:`at.tracking.MPMode.GPU`. If None specified, if gets
395402
first GPU.
403+
gpu_integrator: Symplectic integrator used for GPU tracking
396404
verbose: Print out some information
397405
divider: Value of the divider used in
398406
:py:attr:`.GridMode.RECURSIVE` boundary search
@@ -460,6 +468,7 @@ def get_momentum_acceptance(
460468
gpu_pool: List of GPU id to use when use_mp is
461469
:py:attr:`at.tracking.MPMode.GPU`. If None specified, if gets
462470
first GPU.
471+
gpu_integrator: Symplectic integrator used for GPU tracking
463472
verbose: Print out some information
464473
divider: Value of the divider used in
465474
:py:attr:`.GridMode.RECURSIVE` boundary search

0 commit comments

Comments
 (0)