Skip to content

Commit

Permalink
Move dt to simulation parameters in Snapshot and snapshot specific dt
Browse files Browse the repository at this point in the history
  • Loading branch information
tjwsch committed Jul 11, 2024
1 parent 282d8b5 commit b0466ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
6 changes: 4 additions & 2 deletions examples/snapshot-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"coupling_params": {
"parameter_file_name": "parameter.hdf5",
"read_data_names": {"macro-scalar-data": "scalar", "macro-vector-data": "vector"},
"write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"},
"micro_dt": 0.1
"write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"}
},
"simulation_params": {
"micro_dt": 1.0
},
"snapshot_params": {
"post_processing_file_name": "snapshot_postprocessing"
Expand Down
13 changes: 0 additions & 13 deletions micro_manager/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ def __init__(self, logger, config_filename):

self._output_micro_sim_time = False

self._dt = 0.01

self.read_json(config_filename)

def read_json(self, config_filename):
Expand Down Expand Up @@ -529,14 +527,3 @@ def get_postprocessing_file_name(self):
Name of post-processing script.
"""
return self._postprocessing_file_name

def get_time_step_size(self):
"""
Get user provided time step size for the snapshot computation.
Returns
-------
dt : float
time_step_size.
"""
return self._dt
7 changes: 4 additions & 3 deletions tests/unit/snapshot-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"coupling_params": {
"parameter_file_name": "test_parameter.hdf5",
"read_data_names": {"macro-scalar-data": "scalar", "macro-vector-data": "vector"},
"write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"},
"postprocessing": "True",
"micro_dt": 0.1
"write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"}
},
"simulation_params": {
"micro_dt": 1.0
},
"snapshot_params": {
"post_processing_file_name": "snapshot_post_processing"
Expand Down

0 comments on commit b0466ba

Please sign in to comment.