Output Configuration
UltraDark.Output
— ModuleThe Output
module defines struct
s and function
s used for writing output. The most important of these are exported.
Exports
UltraDark.Output.OutputConfig
— Typestruct OutputConfig
struct containing information about what to output.
There are two possible output formats:
- .npy files that use numpy's format. They can be read with
NPZ
. - HDF5 files that can be read with
HDF5
.
Each member of summary_statistics
should be another struct whose constructor generates summary statistics from t
, a
, Δt
and a grids
object. If it is to be used with a PencilGrids
object, each field must be concrete and have a binary representation that MPI can handle.
By default, summary_statistics
will write only the wall time and simulation time.
Fields
directory::String
: where to write outputoutput_times::Array{Float64}
: times at which to outputbox::Bool
: whether to output boxesslice::Bool
: whether to output slicespsi::Bool
: whether to output ψrho::Bool
: whether to output ρnpy::Bool
: write .npy filesh5::Bool
: write HDF5 filessummary_statistics::Tuple
: Type of summary statistics to collect
UltraDark.Output.OutputConfig
— MethodOutputConfig(
directory,
output_times;
box,
slice,
psi,
rho,
npy,
h5,
summary_statistics
) -> OutputConfig
Construct an OutputConfig
object
UltraDark.Output.output_external_state
— Methodoutput_external_state(
external_state,
output_config::OutputConfig,
step,
index
)
Output states other than the ψ field.
By default this does nothing. It is most useful if overloaded to dispatch on the type of external_state
.
Arguments
external_state
output_config::OutputConfig
step
index
index of state in external states
UltraDark.Output.output_external_state_header
— Methodoutput_external_state_header(state, output_config, index)
Output the CSV header for a single external state
UltraDark.Output.output_external_states_headers
— Methodoutput_external_states_headers(external_states, output_config)
Output the CSV header for the summary of external states
UltraDark.Output.output_grids
— Methodoutput_grids(grids, output_config, step)
Write output from grids
as specified in output_config
UltraDark.Output.output_output_times
— Methodoutput_output_times(output_times, output_config)
Output the times corresponding to slices
UltraDark.Output.output_state
— Methodoutput_state(grids, external_states, output_config, step)
Write out the grids and possible external states
UltraDark.Output.output_xyz
— Methodoutput_xyz(grids, output_config)
Output the spatial coordinates defining the grid