Skip to content

Commit 8d9a0d3

Browse files
committed
add fix
1 parent 4cc4901 commit 8d9a0d3

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## latest
44

5+
- Fixed naming of variables tracking active simulations in the `MicroManager` [#273](https://github.com/precice/micro-manager/pull/273)
56
- Allow `initialize()` to return data that is not used by the adaptivity [#261](https://github.com/precice/micro-manager/pull/261)
67
- Fixed `MicroSimulation` initialization requiring positional parameters [#255](https://github.com/precice/micro-manager/pull/255)
78
- Fixed model adaptivity convergence at resolution boundaries to prevent infinite loops for out-of-range switching requests [#252](https://github.com/precice/micro-manager/pull/252)

micro_manager/micro_manager.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,11 @@ def solve(self) -> None:
212212
# Write a checkpoint if a simulation is just activated.
213213
# This checkpoint will be asynchronous to the checkpoints written at the start of the time window.
214214
if self._is_model_adaptivity_on:
215+
active_sim_lids = (
216+
self._adaptivity_controller.get_active_sim_local_ids()
217+
)
215218
self._model_adaptivity_controller.update_states(
216-
self._micro_sims, active_sim_gids
219+
self._micro_sims, active_sim_lids
217220
)
218221
for i in range(self._local_number_of_sims):
219222
if sim_states_cp[i] is None and self._micro_sims[i]:
@@ -244,13 +247,13 @@ def solve(self) -> None:
244247
# Write a checkpoint
245248
if self._participant.requires_writing_checkpoint() or performed_lb:
246249
if self._is_model_adaptivity_on:
247-
active_sim_gids = None
250+
active_sim_lids = None
248251
if self._is_adaptivity_on:
249-
active_sim_gids = (
252+
active_sim_lids = (
250253
self._adaptivity_controller.get_active_sim_local_ids()
251254
)
252255
self._model_adaptivity_controller.update_states(
253-
self._micro_sims, active_sim_gids
256+
self._micro_sims, active_sim_lids
254257
)
255258
for i in range(self._local_number_of_sims):
256259
sim_states_cp[i] = (
@@ -308,13 +311,13 @@ def solve(self) -> None:
308311
self.state_setter(self._micro_sims[i], sim_states_cp[i])
309312

310313
if self._is_model_adaptivity_on:
311-
active_sim_gids = None
314+
active_sim_lids = None
312315
if self._is_adaptivity_on:
313-
active_sim_gids = (
316+
active_sim_lids = (
314317
self._adaptivity_controller.get_active_sim_local_ids()
315318
)
316319
self._model_adaptivity_controller.write_back_states(
317-
self._micro_sims, active_sim_gids
320+
self._micro_sims, active_sim_lids
318321
)
319322

320323
first_iteration = False

0 commit comments

Comments
 (0)