llg3d.post.info¶
Dump simulation results from a .npz file.
To browse the content of the run.npz file, use the llg3d.info command:
$ llg3d.info run.npz
params
element: Cobalt
N: 100
dt: 1e-14
Jx: 300
Jy: 21
Jz: 21
dx: 1e-09
T: 0.0
H_ext: 0.0
init_type: 0
result_file: run.npz
start_averaging: 4000
n_mean: 1
n_profile: 0
solver: numpy
precision: double
blocking: False
seed: 12345
device: auto
profiling: False
verbosity: INFO
np: 1
results/metrics
total_time: 1.1824582910630852
time_per_ite: 0.011824582910630852
CFL: 0.07542857142857141
results/records
xyz_average
shape: (100, 2), dtype: float64
The numpy arrays cans be previewed with more detailed information using the
--verbose option:
$ llg3d.info run.npz --verbose
params
element: Cobalt
N: 100
dt: 1e-14
Jx: 300
Jy: 21
Jz: 21
dx: 1e-09
T: 0.0
H_ext: 0.0
init_type: 0
result_file: run.npz
start_averaging: 4000
n_mean: 1
n_profile: 0
solver: numpy
precision: double
blocking: False
seed: 12345
device: auto
profiling: False
verbosity: INFO
np: 1
results/metrics
total_time: 1.1824582910630852
time_per_ite: 0.011824582910630852
CFL: 0.07542857142857141
results/records
xyz_average
shape: (100, 2)
dtype: float64
min: 1.000000e-14, max: 1.000000e+00
mean: 5.000000e-01, std: 5.000000e-01
memory: 1.56 KB
[[1.000e-14 1.000e+00]
[2.000e-14 1.000e+00]
...
[9.900e-13 1.000e+00]
[1.000e-12 1.000e+00]]
Functions
|
Convert a dictionary to a formatted string. |
|
Return a human-readable string of the array memory size. |
|
Returns the simulation parameters and results from a .npz file. |
|
Parse command line arguments and print simulation info. |
|
Return a summary of the array. |
- get_array_memory(arr)[source]¶
Return a human-readable string of the array memory size.
- Parameters:
arr (ndarray)
- Return type:
str
- summarize_array(arr)[source]¶
Return a summary of the array.
- Parameters:
arr (ndarray)
- Return type:
str
- dict_to_str(d)[source]¶
Convert a dictionary to a formatted string.
Right-aligns the values for better readability. Skips empty dicts and empty lists.
- Parameters:
d (dict) – The dictionary to convert.
- Returns:
A formatted string representation of the dictionary.
- Return type:
str
- _format_array(arr, verbose)[source]¶
Format an array depending on verbosity.
- Parameters:
arr (ndarray)
verbose (bool)
- Return type:
str
- _format_records(records, verbose, indent=0)[source]¶
Recursively format records section (nested dicts/arrays).
- Parameters:
records (Records | dict)
verbose (bool)
indent (int)
- Return type:
list[str]
- _format_metrics(metrics)[source]¶
Format metrics data, handling profiling_stats specially.
- Parameters:
metrics (Metrics) – Dictionary containing metrics data
- Returns:
List of formatted lines to append
- Return type:
list[str]
- get_info(filename, verbose=False)[source]¶
Returns the simulation parameters and results from a .npz file.
- Parameters:
filename (Path) – Path to the .npz result file
verbose (bool) – If True, includes detailed array information
- Returns:
A formatted string with simulation information
- Return type:
str