Output.jl

Luna.Output.HDF5OutputMethod

Calling the output handler writes data to the file Arguments: y: current function value t: current propagation point dt: current stepsize yfun: callable which returns interpolated function value at different t Note that from RK45.jl, this will be called with yn and tn as arguments.

source
Luna.Output.MemoryOutputMethod

Calling the output handler saves data in the arrays Arguments: y: current function value t: current propagation point dt: current stepsize yfun: callable which returns interpolated function value at different t Note that from RK45.jl, this will be called with yn and tn as arguments.

source
Base.getindexMethod

getindex works interchangeably so when switching from one Output to another, subsequent code can stay the same

source
Luna.Output.ScanHDF5OutputMethod
ScanHDF5Output(scan, scanidx, args...; fname=nothing, fdir=nothing, kwargs...)

Create an HDF5Output for the given scan at the current scanidx and automatically save the scan arrays and current values of the scan variables in the file. If given, fdir is used as a directory in which to store the scan output. fname can be used to manually name files. The running scan index will be appended to fname for each file.

source
Luna.Output.check_cacheMethod
check_cache(o::HDF5Output, y, t, dt)

Check for an existing cached propagation in the output o and return this cache if present.

source
Luna.Output.init_dimsMethod

Making initial array dimensions. For a GridCondition, we know in advance how many points there will be.

source
Luna.Output.scansaveMethod
scansave(scan, scanidx; grid, stats, fpath, script, kwargs...)

While running the given scan, save the variables given as keyword arguments into the scan grid as determined from the variables of the scan. Special keyword arguments are:

  • grid::AbstractGrid: Save the simulation grid in a dictionary (but only once)
  • stats: The statistics dictionary from a simulation is saved in scan grid and NaN-padded to account for variable lengths in the output arrays
  • fpath: Path to the file. Defaults to the scan name plus "_collected"
  • script: Path to the Julia scrpt file running the scan. Can be grabbed automatically using the macro @scansave.

Another keyword argument lock_stale_age sets the time in seconds after which the function ignores the lock on the file and writes to it anyway. Defaults to 300 s (5 min). (Note that if the PID of the locking process appears valid, this is automatically increased 25x.)

source
Luna.Output.scansave_stats_arrayMethod
scansave_stats_array(stats_dict)

Convert the statistics dictionary created by scansave into a dictionary containing arrays of arrays. This removes unused elements in the arrays and the need to use valid_length to avoid including NaNs.

source
Luna.Output.@ScanHDF5OutputMacro
@ScanHDF5Output(scan, scanidx, args...)

Create an HDF5Output for the given scan at the current scanidx and automatically save the running script, scan arrays, and current values of the scan variables in the file. All arguments, including keyword arguments, after scanidx are identical to HDF5Output.

source