From 87280efb223fe75495b80334f14f4347bd4b4fa6 Mon Sep 17 00:00:00 2001 From: romain veltz Date: Mon, 7 Oct 2024 20:51:08 +0200 Subject: [PATCH 01/11] towards BifurcationKit @0.4 --- Project.toml | 2 +- ext/MTKBifurcationKitExt.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 3c21f3db31..73c2fa4c8a 100644 --- a/Project.toml +++ b/Project.toml @@ -72,7 +72,7 @@ MTKLabelledArraysExt = "LabelledArrays" [compat] AbstractTrees = "0.3, 0.4" ArrayInterface = "6, 7" -BifurcationKit = "0.3" +BifurcationKit = "0.3, 0.4" BlockArrays = "1.1" ChainRulesCore = "1" Combinatorics = "1" diff --git a/ext/MTKBifurcationKitExt.jl b/ext/MTKBifurcationKitExt.jl index 6bc536958f..a0bd3bfc02 100644 --- a/ext/MTKBifurcationKitExt.jl +++ b/ext/MTKBifurcationKitExt.jl @@ -113,7 +113,7 @@ function BifurcationKit.BifurcationProblem(nsys::NonlinearSystem, # If the plot var is a normal state. if any(isequal(plot_var, var) for var in unknowns(nsys)) plot_idx = findfirst(isequal(plot_var), unknowns(nsys)) - record_from_solution = (x, p) -> x[plot_idx] + record_from_solution = (x, p; k...) -> x[plot_idx] # If the plot var is an observed state. elseif any(isequal(plot_var, eq.lhs) for eq in observed(nsys)) @@ -132,7 +132,7 @@ function BifurcationKit.BifurcationProblem(nsys::NonlinearSystem, return BifurcationKit.BifurcationProblem(F, u0_bif_vals, p_vals, - (@lens _[bif_idx]), + (BifurcationKit.@optic _[bif_idx]), args...; record_from_solution = record_from_solution, J = J, From b144e15611ee5a354b1d1c43122a6a9f33b614ee Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 12 Oct 2024 11:28:42 -0400 Subject: [PATCH 02/11] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 73c2fa4c8a..381354b493 100644 --- a/Project.toml +++ b/Project.toml @@ -72,7 +72,7 @@ MTKLabelledArraysExt = "LabelledArrays" [compat] AbstractTrees = "0.3, 0.4" ArrayInterface = "6, 7" -BifurcationKit = "0.3, 0.4" +BifurcationKit = "0.4" BlockArrays = "1.1" ChainRulesCore = "1" Combinatorics = "1" From e0d5e15736b079c5e0120fd177422059cd181204 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 12 Oct 2024 14:37:32 -0400 Subject: [PATCH 03/11] Update bifurcationkit.jl --- test/extensions/bifurcationkit.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/extensions/bifurcationkit.jl b/test/extensions/bifurcationkit.jl index 698dd085c8..85ac28765f 100644 --- a/test/extensions/bifurcationkit.jl +++ b/test/extensions/bifurcationkit.jl @@ -1,4 +1,4 @@ -using BifurcationKit, ModelingToolkit, Test +using BifurcationKit, ModelingToolkit, SetField, Test using ModelingToolkit: t_nounits as t, D_nounits as D # Simple pitchfork diagram, compares solution to native BifurcationKit, checks they are identical. # Checks using `jac=false` option. @@ -36,7 +36,7 @@ let bprob_BK = BifurcationProblem(f_BK, [1.0, 1.0], [-1.0, 1.0], - (@lens _[1]); + (SetField.@lens _[1]); record_from_solution = (x, p) -> x[1]) bif_dia_BK = bifurcationdiagram(bprob_BK, PALC(), From 0a479785f7366cff5386111caa0d8b994bbf1d12 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 12 Oct 2024 14:49:26 -0400 Subject: [PATCH 04/11] Update Project.toml --- test/extensions/Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/test/extensions/Project.toml b/test/extensions/Project.toml index 81097d98d2..3e9ad1557e 100644 --- a/test/extensions/Project.toml +++ b/test/extensions/Project.toml @@ -8,5 +8,6 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226" +SetField = "efcf1570-3423-57d1-acb7-fd33fddbac46" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" From d52828ebc89cc66ad4ca8903191f2e346be57036 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 12 Oct 2024 14:58:56 -0400 Subject: [PATCH 05/11] Update test/extensions/Project.toml --- test/extensions/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/extensions/Project.toml b/test/extensions/Project.toml index 3e9ad1557e..0e6ba6bc4a 100644 --- a/test/extensions/Project.toml +++ b/test/extensions/Project.toml @@ -8,6 +8,6 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226" -SetField = "efcf1570-3423-57d1-acb7-fd33fddbac46" +Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" From 0437dd5449e1cc43920eb205b4dffc0164a25da5 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 12 Oct 2024 15:12:18 -0400 Subject: [PATCH 06/11] Update test/extensions/bifurcationkit.jl --- test/extensions/bifurcationkit.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/extensions/bifurcationkit.jl b/test/extensions/bifurcationkit.jl index 85ac28765f..a81a754e0b 100644 --- a/test/extensions/bifurcationkit.jl +++ b/test/extensions/bifurcationkit.jl @@ -36,7 +36,7 @@ let bprob_BK = BifurcationProblem(f_BK, [1.0, 1.0], [-1.0, 1.0], - (SetField.@lens _[1]); + (Setfield.@lens _[1]); record_from_solution = (x, p) -> x[1]) bif_dia_BK = bifurcationdiagram(bprob_BK, PALC(), From fed60d9796c7db9746f61c13c604ebac6366ef01 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 12 Oct 2024 15:12:23 -0400 Subject: [PATCH 07/11] Update test/extensions/bifurcationkit.jl --- test/extensions/bifurcationkit.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/extensions/bifurcationkit.jl b/test/extensions/bifurcationkit.jl index a81a754e0b..724a3ebe64 100644 --- a/test/extensions/bifurcationkit.jl +++ b/test/extensions/bifurcationkit.jl @@ -1,4 +1,4 @@ -using BifurcationKit, ModelingToolkit, SetField, Test +using BifurcationKit, ModelingToolkit, Setfield, Test using ModelingToolkit: t_nounits as t, D_nounits as D # Simple pitchfork diagram, compares solution to native BifurcationKit, checks they are identical. # Checks using `jac=false` option. From e5e8d83f30baeda27187999685d5453cc65c7706 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 21 Oct 2024 05:06:36 -0400 Subject: [PATCH 08/11] Update Project.toml --- test/extensions/Project.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/test/extensions/Project.toml b/test/extensions/Project.toml index 0e6ba6bc4a..81097d98d2 100644 --- a/test/extensions/Project.toml +++ b/test/extensions/Project.toml @@ -8,6 +8,5 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226" -Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" From 82735205d8fadab13baa2dd33c0dd42887109074 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 21 Oct 2024 05:07:08 -0400 Subject: [PATCH 09/11] Update bifurcationkit.jl --- test/extensions/bifurcationkit.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/extensions/bifurcationkit.jl b/test/extensions/bifurcationkit.jl index 724a3ebe64..698dd085c8 100644 --- a/test/extensions/bifurcationkit.jl +++ b/test/extensions/bifurcationkit.jl @@ -1,4 +1,4 @@ -using BifurcationKit, ModelingToolkit, Setfield, Test +using BifurcationKit, ModelingToolkit, Test using ModelingToolkit: t_nounits as t, D_nounits as D # Simple pitchfork diagram, compares solution to native BifurcationKit, checks they are identical. # Checks using `jac=false` option. @@ -36,7 +36,7 @@ let bprob_BK = BifurcationProblem(f_BK, [1.0, 1.0], [-1.0, 1.0], - (Setfield.@lens _[1]); + (@lens _[1]); record_from_solution = (x, p) -> x[1]) bif_dia_BK = bifurcationdiagram(bprob_BK, PALC(), From 1e3618d99cf2daca3e985e0b7e7a822b81332752 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 24 Oct 2024 05:20:03 +0000 Subject: [PATCH 10/11] Update bifurcationkit.jl --- test/extensions/bifurcationkit.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/extensions/bifurcationkit.jl b/test/extensions/bifurcationkit.jl index 698dd085c8..c2dc5685aa 100644 --- a/test/extensions/bifurcationkit.jl +++ b/test/extensions/bifurcationkit.jl @@ -36,7 +36,7 @@ let bprob_BK = BifurcationProblem(f_BK, [1.0, 1.0], [-1.0, 1.0], - (@lens _[1]); + (BifurcationKit.@optic _[1]); record_from_solution = (x, p) -> x[1]) bif_dia_BK = bifurcationdiagram(bprob_BK, PALC(), From 877cf03449738dc68f631c664a37e2b67bc49dca Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 24 Oct 2024 07:34:08 +0000 Subject: [PATCH 11/11] Update test/extensions/bifurcationkit.jl --- test/extensions/bifurcationkit.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/extensions/bifurcationkit.jl b/test/extensions/bifurcationkit.jl index c2dc5685aa..b8c95dca99 100644 --- a/test/extensions/bifurcationkit.jl +++ b/test/extensions/bifurcationkit.jl @@ -37,7 +37,7 @@ let [1.0, 1.0], [-1.0, 1.0], (BifurcationKit.@optic _[1]); - record_from_solution = (x, p) -> x[1]) + record_from_solution = (x, p; k...) -> x[1]) bif_dia_BK = bifurcationdiagram(bprob_BK, PALC(), 2,