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

Warn if only micro-scale data is used in the similarity computation of adaptivity. #75

Merged
merged 4 commits into from
Jan 30, 2024
Merged
Changes from all 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
7 changes: 7 additions & 0 deletions micro_manager/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import json
import os
from warnings import warn


class Config:
Expand Down Expand Up @@ -123,6 +124,12 @@ def read_json(self, config_filename):
for dname in data["simulation_params"]["adaptivity"]["data"]:
self._data_for_adaptivity[dname] = exchange_data[dname]

if self._data_for_adaptivity.keys() == self._write_data_names.keys():
warn(
"Only micro simulation data is used for similarity computation in adaptivity. This would lead to the"
" same set of active and inactive simulations for the entire simulation time. If this is not intended,"
" please include macro simulation data as well.")

self._adaptivity_history_param = data["simulation_params"]["adaptivity"]["history_param"]
self._adaptivity_coarsening_constant = data["simulation_params"]["adaptivity"]["coarsening_constant"]
self._adaptivity_refining_constant = data["simulation_params"]["adaptivity"]["refining_constant"]
Expand Down
Loading