astronomix.data_classes.simulation_snapshot_data module#

Snapshot return container for the time integration.

Holds the per-snapshot diagnostics (states, energies, spectra, …) plus run-level metadata (runtime, iteration count, compiled-step memory usage) returned by astronomix.time_stepping.time_integration.time_integration() when config.return_snapshots is set.

class astronomix.data_classes.simulation_snapshot_data.SnapshotData(time_points: Array = None, states: Array = None, final_state: Array = None, total_mass: Array = None, total_energy: Array = None, internal_energy: Array = None, kinetic_energy: Array = None, gravitational_energy: Array = None, radial_momentum: Array = None, magnetic_divergence: Array = None, kinetic_energy_spectrum: Array = None, magnetic_energy_spectrum: Array = None, helicity_spectrum: Array = None, k_spectra: Array = None, temperature_pdf: Array = None, runtime: float = 0.0, num_iterations: int = 0, temporary_memory_bytes: int = 0, argument_memory_bytes: int = 0, total_memory_bytes: int = 0, current_checkpoint: int = 0)[source]#

Bases: NamedTuple

Return format for the time integration, when snapshots are requested.

argument_memory_bytes: int#

Compiled-step argument memory per device, in bytes (populated when config.memory_analysis is True).

current_checkpoint: int#

The current checkpoint, used internally.

final_state: Array#

The final state of the simulation. This is especially useful when no snapshots are returned but only the statistics.

gravitational_energy: Array#

gravitational energy

helicity_spectrum: Array#

The helicity spectrum at the times the snapshots were taken.

internal_energy: Array#

internal energy

k_spectra: Array#

The k-vector corresponding to the spectra (same for each time snapshot and each spectrum).

kinetic_energy: Array#

kinetic energy

kinetic_energy_spectrum: Array#

The kinetic energy spectrum at the times the snapshots were taken.

magnetic_divergence: Array#

Mean absolute magnetic field divergence

magnetic_energy_spectrum: Array#

The magnetic energy spectrum at the times the snapshots were taken.

num_iterations: int#

Number of timesteps taken.

radial_momentum: Array#

Radial momentum

runtime: float#

The runtime of the simulation loop.

states: Array#

The primitive states at the times the snapshots were taken.

temperature_pdf: Array#

The temperature PDF (dV/dlogT) at the times the snapshots were taken.

temporary_memory_bytes: int#

Compiled-step temporary memory per device, in bytes (populated when config.memory_analysis is True).

time_points: Array#

The times at which the snapshots were taken.

total_energy: Array#

The total energy at the times the snapshots were taken.

total_mass: Array#

The total mass at the times the snapshots were taken.

total_memory_bytes: int#

Compiled-step total memory per device, in bytes (temp + argument + output - alias; populated when config.memory_analysis is True).