dedalus.tools.post
¶
Post-processing helpers.
Module Contents¶
-
logger
¶
-
visit_writes
(set_paths, function, comm=MPI.COMM_WORLD, **kw)¶ Apply function to writes from a list of analysis sets.
Parameters: - set_paths (list of str or pathlib.Path) – List of set paths
- function (function(set_path, start, count, **kw)) – A function on an HDF5 file, start index, and count.
- comm (mpi4py.MPI.Intracomm, optional) – MPI communicator (default: COMM_WORLD)
- Other keyword arguments are passed on to `function`
Notes
This function is parallelized over writes, and so can be effectively parallelized up to the number of writes from all specified sets.
-
get_assigned_writes
(set_paths, comm=MPI.COMM_WORLD)¶ Divide writes from a list of analysis sets between MPI processes.
Parameters: - set_paths (list of str or pathlib.Path) – List of set paths
- comm (mpi4py.MPI.Intracomm, optional) – MPI communicator (default: COMM_WORLD)
-
get_all_writes
(set_paths)¶ Get write numbers from a list of analysis sets.
Parameters: set_paths (list of str or pathlib.Path) – List of set paths
-
get_assigned_sets
(base_path, distributed=False, comm=MPI.COMM_WORLD)¶ Divide analysis sets from a FileHandler between MPI processes.
Parameters: - base_path (str or pathlib.Path) – Base path of FileHandler output
- distributed (bool, optional) – Divide distributed sets instead of merged sets (default: False)
- comm (mpi4py.MPI.Intracomm, optional) – MPI communicator (default: COMM_WORLD)
-
merge_process_files
(base_path, cleanup=False, comm=MPI.COMM_WORLD)¶ Merge process files from all distributed analysis sets in a folder.
Parameters: - base_path (str or pathlib.Path) – Base path of FileHandler output
- cleanup (bool, optional) – Delete distributed files after merging (default: False)
- comm (mpi4py.MPI.Intracomm, optional) – MPI communicator (default: COMM_WORLD)
Notes
This function is parallelized over sets, and so can be effectively parallelized up to the number of distributed sets.
-
merge_process_files_single_set
(set_path, cleanup=False)¶ Merge process files from a single distributed analysis set.
Parameters: - set_path (str of pathlib.Path) – Path to distributed analysis set folder
- cleanup (bool, optional) – Delete distributed files after merging (default: False)
-
merge_setup
(joint_file, proc_path)¶ Merge HDF5 setup from part of a distributed analysis set into a joint file.
Parameters: - joint_file (HDF5 file) – Joint file
- proc_path (str or pathlib.Path) – Path to part of a distributed analysis set
-
merge_data
(joint_file, proc_path)¶ Merge data from part of a distributed analysis set into a joint file.
Parameters: - joint_file (HDF5 file) – Joint file
- proc_path (str or pathlib.Path) – Path to part of a distributed analysis set
-
merge_sets
(joint_path, set_paths, cleanup=False, comm=MPI.COMM_WORLD)¶ Merge analysis sets.
Parameters: - joint_path (string or pathlib.Path) – Path for merged file.
- set_paths (list of strings or pathlib.Path objects) – Paths of all sets to be merged
- cleanup (bool, optional) – Delete set files after merging (default: False)
- comm (mpi4py.MPI.Intracomm, optional) – MPI communicator (default: COMM_WORLD)
-
merge_analysis
¶