From dda0c67f87df819d1fd835f8b7f47c7575ec0b40 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 5 Aug 2024 09:41:45 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- src/Trixi.jl | 2 +- src/auxiliary/math.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Trixi.jl b/src/Trixi.jl index f4290c9a885..23a8cfe1d0a 100644 --- a/src/Trixi.jl +++ b/src/Trixi.jl @@ -80,7 +80,7 @@ using Preferences: @load_preference, set_preferences! const _PREFERENCE_SQRT = @load_preference("sqrt", "sqrt_Trixi_NaN") const _PREFERENCE_LOG = @load_preference("log", "log_Trixi_NaN") -const _PREFERENCE_POLYESTER = parse(Bool, @load_preference("polyester", "true")) +const _PREFERENCE_POLYESTER = @load_preference("polyester", true) # finite difference SBP operators using SummationByPartsOperators: AbstractDerivativeOperator, diff --git a/src/auxiliary/math.jl b/src/auxiliary/math.jl index a102dc4a71c..0bd5ad438f3 100644 --- a/src/auxiliary/math.jl +++ b/src/auxiliary/math.jl @@ -8,7 +8,7 @@ const TRIXI_UUID = UUID("a7f1ee26-1774-49b1-8366-f1abc58fbfcb") """ - Trixi.set_polyester(toggle::Bool; force = true) + Trixi.set_polyester!(toggle::Bool; force = true) Toggle the usage of [Polyester.jl](https://github.com/JuliaSIMD/Polyester.jl) for multithreading. By default, Polyester.jl is enabled, but it can @@ -17,8 +17,8 @@ be useful for performance comparisons to switch to the Julia core backend. This does not fully disable Polyester.jl, buy only its use as part of Trixi.jl's `@threaded` macro. """ -function set_polyester(toggle::Bool; force = true) - set_preferences!(TRIXI_UUID, "polyester" => string(toggle), force = force) +function set_polyester!(toggle::Bool; force = true) + set_preferences!(TRIXI_UUID, "polyester" => toggle, force = force) @info "Please restart Julia and reload Trixi.jl for the `polyester` change to take effect" end