PinCFlow

PinCFlow.ensembleFunction
ensemble(simulation::Function, parameters::NamedTuple, keywords::NamedTuple)

Run simulation in an ensemble.

Arguments

  • simulation: Function to be run in the ensemble. For each key in parameters and keywords, simulation must have a matching keyword argument. In addition, it must have the keyword argument base_comm.

  • parameters: Keyword arguments for simulation, which have different values for different ensemble members. Each entry of parameters must be a tuple of ensemble values for the keyword argument represented by the key. One of the keys must be :output_file.

  • keywords: Keyword arguments for simulation, which have the same values for all ensemble members.

  • delay: Delay (in seconds) before the first exception is rethrown.

PinCFlow.plot_outputFunction
plot_output(
    file::AbstractString,
    data::HDF5.File,
    fields::Vararg{
        Tuple{<:AbstractString, <:Integer, <:Integer, <:Integer, <:Integer},
    };
    number::Integer = 10,
    colormap_name::Symbol = :seismic,
    space_unit::AbstractString = "km",
    time_unit::AbstractString = "h",
)

Create contour plots of the dataset variable in data, display it and save it to file.

Arguments

  • file: File to save the plots to.

  • data: PinCFlow.jl output data.

  • fields: Tuples of a variable name and four indices. The first three indices of each tuple define the planes in which the contours are to be plotted, whereas the fourth is the temporal index.

Keywords

  • number: Number of contour levels.

  • colormap_name: Colormap of choice.

  • label: Colorbar label for the plots.

  • space_unit: Unit used for the coordinates. Must be "km" or "m".

  • time_unit: Unit used for the time. Must be "d", "h", "min" or "s".

PinCFlow.reduce_exceptionsFunction
reduce_exceptions(
    operation::Function,
    comm::MPI.Comm;
    info::AbstractString = "",
)

Execute operation, catch exceptions in it, and rethrow the exception in the fastest process.

Arguments

  • operation: Function which takes no arguments and returns nothing.

  • comm: MPI communicator containing all processes participating in operation.

  • delay: Delay (in seconds) before the first exception is rethrown.

  • info: String to print just before the caught exception is rethrown.

PinCFlow.symmetric_contoursFunction
symmetric_contours(
    minimum::AbstractFloat,
    maximum::AbstractFloat;
    number::Integer = 10,
    colormap_name::Symbol = :seismic,
)::Tuple{<:LinRange{<:AbstractFloat, <:Integer}, <:Any}

Compute symmetric contours levels and return them and a correspondingly indexed colormap.

Arguments

  • minimum: Smallest value to be plotted.

  • maximum: Largest value to be plotted.

Keywords

  • number: Number of contour levels.

  • colormap_name: Name under which the chosen colormap is registered.

PinCFlow.@ivyMacro
@ivy(x::Expr)

Return the expression x with @inbounds and @views in front of it.

Arguments

  • x: Input expression.