Skip to content

Commit 35da882

Browse files
abulenokslayoo
andauthored
towards complete breakup implementation for GPU (most methods in TestSDMBreakup work on CUDA now) (#980)
Co-authored-by: Sylwester Arabas <[email protected]>
1 parent 9d628ae commit 35da882

File tree

8 files changed

+422
-89
lines changed

8 files changed

+422
-89
lines changed

PySDM/attributes/physics/multiplicities.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
super-particle multiplicity (aka weighting factor) - the number of real-world particles
33
represented in the simulation with a given super particle
44
"""
5+
import numpy as np
6+
57
from PySDM.attributes.impl.base_attribute import BaseAttribute
68

79

810
class Multiplicities(BaseAttribute):
11+
TYPE = np.int64
12+
MAX_VALUE = np.iinfo(TYPE).max
13+
914
def __init__(self, builder):
10-
super().__init__(builder, name="n", dtype=int)
15+
super().__init__(builder, name="n", dtype=Multiplicities.TYPE)

PySDM/backends/impl_numba/methods/collisions_methods.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ def collision_coalescence_breakup(
543543
is_first_in_pair,
544544
warn_overflows,
545545
volume,
546+
max_multiplicity,
546547
):
547548
# pylint: disable=too-many-locals
548-
max_multiplicity = np.iinfo(multiplicity.data.dtype).max // 2e5
549549
self.__collision_coalescence_breakup_body(
550550
multiplicity=multiplicity.data,
551551
idx=idx.data,

0 commit comments

Comments
 (0)