TrixiBase.jl API
TrixiBase.disable_debug_timings
— Methoddisable_debug_timings()
Disable all @trixi_timeit
timings. The timings should be optimized away, allowing for truly zero-overhead. Enable timings again with enable_debug_timings
.
See also enable_debug_timings
, @trixi_timeit
.
TrixiBase.enable_debug_timings
— Methodenable_debug_timings()
Enable all @trixi_timeit
timings (default behavior).
See also disable_debug_timings
, @trixi_timeit
.
TrixiBase.timer
— Methodtimer()
Main timer for global timing, e.g., to be used with @trixi_timeit
.
TrixiBase.trixi_include
— Methodtrixi_include([mod::Module=Main,] elixir::AbstractString; kwargs...)
include
the file elixir
and evaluate its content in the global scope of module mod
. You can override specific assignments in elixir
by supplying keyword arguments. Its basic purpose is to make it easier to modify some parameters while running simulations from the REPL. Additionally, this is used in tests to reduce the computational burden for CI while still providing examples with sensible default values for users.
Before replacing assignments in elixir
, the keyword argument maxiters
is inserted into calls to solve
with it's default value used in the SciML ecosystem for ODEs, see the "Miscellaneous" section of the documentation.
Examples
julia> using TrixiBase, Trixi
julia> redirect_stdout(devnull) do
trixi_include(@__MODULE__, joinpath(examples_dir(), "tree_1d_dgsem", "elixir_advection_extended.jl"),
tspan=(0.0, 0.1))
sol.t[end]
end
[ Info: You just called `trixi_include`. Julia may now compile the code, please be patient.
0.1
TrixiBase.@trixi_timeit
— Macro@trixi_timeit timer() "some label" expression
Basically the same as a special case of @timeit_debug
from TimerOutputs.jl, but without try ... finally ... end
block. Thus, it's not exception-safe, but it also avoids some related performance problems. Since we do not use exception handling in Trixi.jl, that's not really an issue.
All @trixi_timeit
timings can be disabled with disable_debug_timings
. The timings should then be optimized away, allowing for truly zero-overhead.
See also disable_debug_timings
, enable_debug_timings
.