From 6dcbf68dcd83d3094d008af5d68d687ea3352de1 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 10 Aug 2023 15:53:53 -0400 Subject: [PATCH] Move initialize after requires_initial_data() --- micro_manager/micro_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/micro_manager/micro_manager.py b/micro_manager/micro_manager.py index 093410fd..cbf60059 100644 --- a/micro_manager/micro_manager.py +++ b/micro_manager/micro_manager.py @@ -144,10 +144,6 @@ def initialize(self) -> None: self._participant.set_mesh_access_region(self._macro_mesh_name, coupling_mesh_bounds) - # initialize preCICE - self._participant.initialize() - self._dt = self._participant.get_max_time_step_size() - self._mesh_vertex_ids, mesh_vertex_coords = self._participant.get_mesh_vertex_ids_and_coordinates( self._macro_mesh_name) self._local_number_of_sims, _ = mesh_vertex_coords.shape @@ -267,6 +263,10 @@ def initialize(self) -> None: if hasattr(micro_problem, 'output') and callable(getattr(micro_problem, 'output')): self._micro_sims_have_output = True + # initialize preCICE + self._participant.initialize() + self._dt = self._participant.get_max_time_step_size() + def solve(self) -> None: """ Solve the problem using preCICE.