Skip to content

Commit

Permalink
Merge pull request #620 from slayoo/freezing
Browse files Browse the repository at this point in the history
let's turn coalescence adaptivity on by default. Closes #400
  • Loading branch information
slayoo authored Sep 16, 2021
2 parents 70e8d4f + b08738b commit f7a0e60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PySDM/dynamics/coalescence.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self,
croupier=None,
optimized_random=False,
substeps: int = 1,
adaptive: bool = False,
adaptive: bool = True,
dt_coal_range=default_dt_coal_range
):
assert substeps == 1 or adaptive is False
Expand Down
2 changes: 1 addition & 1 deletion PySDM_tests/smoke_tests/Berry_1967/test_coalescence.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_coalescence_2_sd(backend):
builder.set_environment(Box(dt=s.dt, dv=s.dv))
attributes = {}
attributes['volume'], attributes['n'] = ConstantMultiplicity(s.spectrum).sample(s.n_sd)
builder.add_dynamic(Coalescence(s.kernel))
builder.add_dynamic(Coalescence(s.kernel, adaptive=False))
core = builder.build(attributes)

volumes = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def insert_zeros(array):
def get_dummy_core_and_sdm(backend, n_length, optimized_random=False, environment=None, substeps=1):
core = DummyCore(backend, n_sd=n_length)
core.environment = environment or Box(dv=1, dt=default_dt_coal_range[1])
sdm = Coalescence(StubKernel(core.backend), optimized_random=optimized_random, substeps=substeps)
sdm = Coalescence(StubKernel(core.backend), optimized_random=optimized_random, substeps=substeps,
adaptive=False)
sdm.register(core)
return core, sdm

Expand Down

0 comments on commit f7a0e60

Please sign in to comment.