-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit for snapshot commputation * Snapshot: change import of module * Adapt SnapshotComputation further * Adapt Snapshot test * Snapshot: Formatting * Prepare Snapshot class further * First working version of snapshot computation * Add snapshot test, improve snapshot and restructure * Add snapshot test, improve snapshot and restructure part 2 * Improve logging, comments and minor structural improvements * Snapshot: extend setup and github actions * Move Snapshot into Micro Manager and update execution * Add post-processing script option and restructure snapshot example * Add post-processing to snapshot config file * Make snapshot executable and rename snapshot files * Restructure snapshot computation * Restructure config * Update snapshot computation still without chunking * Remove unintentional print statement * Update comments in tests * Read only the necessary input on each process * Clarify text and names * Add HDF5 dependency * Make h5py optional dependency * Fix h5py optional * Initial commit for snapshot commputation * Snapshot: change import of module * Adapt SnapshotComputation further * Snapshot: Formatting * Prepare Snapshot class further * First working version of snapshot computation * Add snapshot test, improve snapshot and restructure * Add snapshot test, improve snapshot and restructure part 2 * Improve logging, comments and minor structural improvements * Move Snapshot into Micro Manager and update execution * Add post-processing script option and restructure snapshot example * Make snapshot executable and rename snapshot files * Restructure snapshot computation * Restructure config * Update snapshot computation still without chunking * Remove unintentional print statement * Update comments in tests * Make h5py optional dependency * Fix h5py optional * Change snapshot case in main * Move dt to simulation parameters in Snapshot and snapshot specific dt * Fix init * Fix issue of using member variable in Config class * Fix tests * Apply suggestions from code review Co-authored-by: Ishaan Desai <[email protected]> * Apply review suggestions * Remove output dir from gitignore * Extend CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Ishaan Desai <[email protected]>
- Loading branch information
1 parent
6fafea2
commit 391969d
Showing
21 changed files
with
1,070 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"micro_file_name": "python-dummy/micro_dummy", | ||
"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"} | ||
}, | ||
"simulation_params": { | ||
"micro_dt": 1.0 | ||
}, | ||
"snapshot_params": { | ||
"post_processing_file_name": "snapshot_postprocessing" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
Post-processing | ||
In this script a post-processing step is defined. | ||
A script like this can be used to post-process the simulation output before writing it to a file, | ||
if this is not done in the micro simulation itself. | ||
""" | ||
|
||
|
||
class Postprocessing: | ||
def postprocessing(sim_output): | ||
"""Post-process the simulation output. | ||
Parameters | ||
---------- | ||
sim_output : dict | ||
Raw simulation output. | ||
Returns | ||
------- | ||
sim_output : dict | ||
Post-processed simulation output. | ||
""" | ||
sim_output["micro-scalar-data"] = sim_output["micro-scalar-data"] + 20 | ||
return sim_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.