From b32bfd916197de6903ce05fc488ab628b8c0d385 Mon Sep 17 00:00:00 2001 From: Herman Sletmoen Date: Thu, 18 Jul 2024 19:13:55 +0200 Subject: [PATCH] Add two TODOs --- src/systems/abstractsystem.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/systems/abstractsystem.jl b/src/systems/abstractsystem.jl index 38b2c30e1f..d8f026021b 100644 --- a/src/systems/abstractsystem.jl +++ b/src/systems/abstractsystem.jl @@ -741,7 +741,9 @@ WARNING: intended for internal use; does not perform any sanity checks. """ # TODO: optionally re-call constructor to sanity check? # TODO: use SciMLBase's generic remake()? doesn't work out of the box, though -function remake(sys::AbstractSystem; skip_nonexisting = false, kwargs...) +# TODO: should register new tag? move Threads.atomic_add!(SYSTEM_COUNT, ...) to a separate function? +# TODO: recreate the struct once with all new fields, instead of once for every field +function remake(sys::AbstractSystem; kwargs...) for (field, value) in kwargs # like `Setfield.@set! sys.field = value`, but with `field` replaced by an arbitrarily named symbol # (e.g. https://discourse.julialang.org/t/accessing-struct-via-symbol/58809/4)