Solver Trace Columns

SolverTraces.TraceColumnType
TraceColumn

Base type for all columns that can appear in a SolverTrace. Each subtype is expected to have a property named fmt containing a formatting string, and to be callable with the current step number as argument, returning the necessary values to render the formatting string, alternatively overload Format.format(c::C, i::Integer) where {C<:TraceColumn}.

source

CurrentStep

SolverTraces.CurrentStepType
CurrentStep(num_steps, fmt, lc, header)

Trace column display the current step and total number of iteration, e.g. [ 4/10], with the figures colored according to progress made.

source
SolverTraces.CurrentStepMethod
CurrentStep(num_step[; lc, header])

Create a current step trace column for num_step iterations. The default color scale goes from red to green, and the default header is blank.

source

Performance

SolverTraces.PerformanceType
Performance(load, header, t₀, fmt)

This trace column can be used to indicate the performance of a calculation, i.e. how many units (grid points, particles, &c) can the algorithm handle per second. The number is shifted to the appropriate order of magnitude, changing the SI prefix to e.g. kHz, MHz, &c.

source
SolverTraces.shift_prefixFunction
shift_prefix(u, e)

Shift the SI prefix of the unit u by e orders of magnitude (which needs to be a multiple of 3).

source
SolverTraces.SI_prefix_convertFunction
SI_prefix_convert(q)

Shift the SI prefix of the quantity q such that no zeros appear before the decimal point, and at most three figures do. Note that this conversion is not necessarily numerically accurate, it is mostly intended for display purposes.

Examples

julia> SolverTraces.SI_prefix_convert(1.0u"nm")
1.0 nm

julia> SolverTraces.SI_prefix_convert(0.10u"nm")
100.0 pm

julia> SolverTraces.SI_prefix_convert(100.0u"nm")
100.0 nm

julia> SolverTraces.SI_prefix_convert(999.0u"nm")
999.0 nm
source

ETA

SolverTraces.ETAType
ETA(steps, header, t₀, fmt)

This trace column can be used to indicate the estimated time of completion of a calculation.

source

ScalarColumn

SolverTraces.ScalarColumnType
ScalarColumn(fmt, header, n)

Trace column for any kind of scalar, returned by the callback function n. Alternatively, n can be a scalar set manually by the user.

source
SolverTraces.ScalarColumnMethod
ScalarColumn(n, header, ::Type{R}[, signed=false]) where {R<:Real}

Construct a ScalarColumn for the callback function n, with a format automatically generated depending on R is an integer or not, and whether it can be signed.

source
SolverTraces.ScalarColumnMethod
ScalarColumn(n::R, header[, signed=false]) where {R<:Real}

Construct a ScalarColumn for the scalar value n, with a format automatically generated depending on R is an integer or not, and whether it can be signed.

source

Tolerance

SolverTraces.ToleranceType
Tolerance(target, current, fmt, tol_fmt, lc, header)

Column displaying the progress of the algorithm towards a set target. At each iteration, the current value has to be updated.

source
SolverTraces.base_expFunction
base_exp(v)

Convert the float v into a tuple of base and exponent in base-10.

Examples

julia> SolverTraces.base_exp(-3.5e2)
(-3.5000000000000004, 2)
source

ColumnSeparator