Skip to content

Commit

Permalink
Move initialize after requires_initial_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Aug 10, 2023
1 parent 70918f6 commit 6dcbf68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions micro_manager/micro_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 6dcbf68

Please sign in to comment.