Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if initial data returned from the micro simulation is the data that the adaptivity computation requires #109

Merged
merged 4 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## latest

- Check if initial data returned from the micro simulation is the data that the adaptivity computation requires https://github.com/precice/micro-manager/pull/109
- Use executable `micro-manager-precice` by default, and stop using the script `run_micro_manager.py` https://github.com/precice/micro-manager/pull/105
- Make `initialize()` method of the MicroManager class public https://github.com/precice/micro-manager/pull/105
- Optionally use initial macro data to initialize micro simulations https://github.com/precice/micro-manager/pull/104
Expand Down
9 changes: 8 additions & 1 deletion micro_manager/micro_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,14 @@ def initialize(self) -> None:
if self._is_adaptivity_on:
# Save initial data from first micro simulation as we anyway have it
for name in initial_micro_output.keys():
self._data_for_adaptivity[name][0] = initial_micro_output[name]
if name in self._data_for_adaptivity:
self._data_for_adaptivity[name][0] = initial_micro_output[
name
]
else:
raise Exception(
"The initialize() method needs to return data which is required for the adaptivity calculation."
IshaanDesai marked this conversation as resolved.
Show resolved Hide resolved
)

# Gather initial data from the rest of the micro simulations
if is_initial_data_required:
Expand Down