Skip to content

Commit

Permalink
Warn if only micro-scale data is used in the similarity computation o…
Browse files Browse the repository at this point in the history
…f adaptivity
  • Loading branch information
IshaanDesai committed Jan 30, 2024
1 parent 6c08889 commit f44756d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 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,10 @@ 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.")

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

0 comments on commit f44756d

Please sign in to comment.