From f4ca3fb5910c6743deabfc5cc7beceb290bbc588 Mon Sep 17 00:00:00 2001 From: Ruben Seitz Date: Sat, 31 May 2025 12:29:23 +0200 Subject: [PATCH 1/6] removed redundant code; added docs; adjused structure --- Manifest.toml | 64 +++++++++++++++++++++++++++++++++++++-- Project.toml | 1 + model_fhn.jl | 14 --------- src/AnimalFurFHN.jl | 2 -- src/constants.jl | 10 ++++-- src/initial_conditions.jl | 8 ----- src/laplacian.jl | 15 +++++++++ src/model_fhn.jl | 14 --------- src/solver.jl | 58 +++++++++++++++++++++-------------- 9 files changed, 121 insertions(+), 65 deletions(-) delete mode 100644 model_fhn.jl delete mode 100644 src/initial_conditions.jl delete mode 100644 src/model_fhn.jl diff --git a/Manifest.toml b/Manifest.toml index 6ffe377..9caa1d9 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.4" +julia_version = "1.11.5" manifest_format = "2.0" -project_hash = "0d147eaf78630b05e95b5317275a880443440272" +project_hash = "ede42d5c0ee6ced5b877b9fea99444d4d8bea863" [[deps.ADTypes]] git-tree-sha1 = "e2478490447631aedba0823d4d7a80b2cc8cdb32" @@ -15,6 +15,11 @@ weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] ADTypesConstructionBaseExt = "ConstructionBase" ADTypesEnzymeCoreExt = "EnzymeCore" +[[deps.ANSIColoredPrinters]] +git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" +uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" +version = "0.0.1" + [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" @@ -300,6 +305,12 @@ git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581" uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" version = "0.1.13" +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.8" + [[deps.ColorBrewer]] deps = ["Colors", "JSON"] git-tree-sha1 = "e771a63cc8b539eca78c85b0cabd9233d6c8f06f" @@ -610,6 +621,12 @@ git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" version = "0.9.4" +[[deps.Documenter]] +deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"] +git-tree-sha1 = "6c182d0bd94142d7cbc3ae8a1e74668f15d0dd65" +uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +version = "1.11.4" + [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" @@ -935,6 +952,18 @@ git-tree-sha1 = "6570366d757b50fabae9f4315ad74d2e40c0560a" uuid = "59f7168a-df46-5410-90c8-f2779963d0ec" version = "5.2.3+0" +[[deps.Git]] +deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" +uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" +version = "1.4.0" + +[[deps.Git_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "2f6d6f7e6d6de361865d4394b802c02fc944fc7c" +uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" +version = "2.49.0+0" + [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] git-tree-sha1 = "b0036b392358c80d2d2124746c2bf3d48d457938" @@ -976,6 +1005,12 @@ git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" version = "0.3.28" +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.5" + [[deps.IfElse]] git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" @@ -1189,6 +1224,11 @@ git-tree-sha1 = "a9eaadb366f5493a5654e843864c13d8b107548c" uuid = "10f19ff3-798f-405d-979b-55457f8fc047" version = "0.1.17" +[[deps.LazilyInitializedFields]] +git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0" +uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" +version = "1.3.0" + [[deps.LazyArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] git-tree-sha1 = "866ce84b15e54d758c11946aacd4e5df0e60b7a3" @@ -1409,6 +1449,12 @@ deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" version = "1.11.0" +[[deps.MarkdownAST]] +deps = ["AbstractTrees", "Markdown"] +git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899" +uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" +version = "0.1.2" + [[deps.MathTeXEngine]] deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "UnicodeFun"] git-tree-sha1 = "f5a6805fb46c0285991009b526ec6fae43c6dec2" @@ -1631,7 +1677,13 @@ version = "3.2.4+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" +version = "0.8.5+0" + +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.1+0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -2109,6 +2161,12 @@ git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" version = "1.2.2" +[[deps.RegistryInstances]] +deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] +git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51" +uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3" +version = "0.1.0" + [[deps.RelocatableFolders]] deps = ["SHA", "Scratch"] git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" diff --git a/Project.toml b/Project.toml index 19c0af6..3d4a294 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,5 @@ [deps] DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" diff --git a/model_fhn.jl b/model_fhn.jl deleted file mode 100644 index 7722318..0000000 --- a/model_fhn.jl +++ /dev/null @@ -1,14 +0,0 @@ -function fhn!(du, u, p::FHNParams, t) - N, dx = p.N, p.dx - - u_mat = reshape(u[1:N^2], N, N) - v_mat = reshape(u[N^2+1:end], N, N) - - Δu = laplacian(u_mat) / dx^2 - Δv = laplacian(v_mat) / dx^2 - - fu = p.Du * Δu .+ u_mat .- u_mat .^ 3 ./ 3 .- v_mat - fv = p.Dv * Δv .+ p.ε * (u_mat .+ p.a .- p.b .* v_mat) - - du .= vcat(vec(fu), vec(fv)) -end diff --git a/src/AnimalFurFHN.jl b/src/AnimalFurFHN.jl index fafd5d6..060abd7 100644 --- a/src/AnimalFurFHN.jl +++ b/src/AnimalFurFHN.jl @@ -2,9 +2,7 @@ module AnimalFurFHN include("constants.jl") -include("initial_conditions.jl") include("laplacian.jl") -include("model_fhn.jl") include("solver.jl") export run_simulation # Make sure this is here! diff --git a/src/constants.jl b/src/constants.jl index d2f2bbd..ff9eded 100644 --- a/src/constants.jl +++ b/src/constants.jl @@ -1,9 +1,15 @@ +module Constants + struct FHNParams N::Int - dx::Float64 + dx::Float64 # grid spacing Du::Float64 Dv::Float64 - ε::Float64 + ϵ::Float64 a::Float64 b::Float64 end + +export FHNParams + +end # module Constants diff --git a/src/initial_conditions.jl b/src/initial_conditions.jl deleted file mode 100644 index e743e1c..0000000 --- a/src/initial_conditions.jl +++ /dev/null @@ -1,8 +0,0 @@ -import Random - -function initial_conditions(N) - Random.seed!(1234) - u = 0.1 .+ 0.01 .* rand(N, N) - v = 0.1 .+ 0.01 .* rand(N, N) - return vec(u), vec(v) -end diff --git a/src/laplacian.jl b/src/laplacian.jl index ccbcba2..5b1cb3c 100644 --- a/src/laplacian.jl +++ b/src/laplacian.jl @@ -1,4 +1,19 @@ +""" + laplacian(U::Matrix{Float64}, N::Int, h::Float64) + +Computes the discrete 2D Laplacian of a matrix `U` using a 5-point stencil +and circular boundary conditions. + +# Arguments +- `U::Matrix{Float64}`: The input 2D matrix representing the field or image. +- `N::Int`: Integer +- `h::Float64`: The spatial step size or grid spacing between points in the discretization. + +# Returns +- `Vector{Float64}`: A flattened (vectorized) representation of the approximated Laplacian values for each element in `U`. The boundary conditions are handled circularly. +""" function laplacian(U::Matrix{Float64}, N::Int, h::Float64) + # shifts matrices and sums them up padded = circshift(U, (-1, 0)) .+ circshift(U, (1, 0)) .+ circshift(U, (0, -1)) .+ circshift(U, (0, 1)) .- 4 .* U return vec(padded) ./ h^2 diff --git a/src/model_fhn.jl b/src/model_fhn.jl deleted file mode 100644 index 7722318..0000000 --- a/src/model_fhn.jl +++ /dev/null @@ -1,14 +0,0 @@ -function fhn!(du, u, p::FHNParams, t) - N, dx = p.N, p.dx - - u_mat = reshape(u[1:N^2], N, N) - v_mat = reshape(u[N^2+1:end], N, N) - - Δu = laplacian(u_mat) / dx^2 - Δv = laplacian(v_mat) / dx^2 - - fu = p.Du * Δu .+ u_mat .- u_mat .^ 3 ./ 3 .- v_mat - fv = p.Dv * Δv .+ p.ε * (u_mat .+ p.a .- p.b .* v_mat) - - du .= vcat(vec(fu), vec(fv)) -end diff --git a/src/solver.jl b/src/solver.jl index 95b8fba..b7b9114 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -1,34 +1,48 @@ using DifferentialEquations +using Random +using .Constants +""" + fhn(du, u, p:FHNParams, t:) + +Implements the spatial dynamics of FitzHugh-Nagumo (fhn). Designed to be +within a larger numerical solver of partial differential equations. + +# Arguments +- `du`: output argument which stores the calculated derivatives +- `u`: input vector containing the current state of the system at time t +- `p`: holds all the fixed parameters of the FHN model +- `t`: current time + +# Returns +- `du`: calculated derivatives put back into the du array +""" +function fhn!(du, u, p::FHNParams, t = 0) + u_mat = reshape(u[1:N^2], N, N) # activation variable + v_mat = reshape(u[N^2+1:end], N, N) # deactivation variable + + Δu = reshape(laplacian(u_mat, N, p.dx), N, N) + Δv = reshape(laplacian(v_mat, N, p.dx), N, N) + + fu = p.Du * Δu .+ u_mat .- u_mat .^ 3 ./ 3 .- v_mat + fv = p.Dv * Δv .+ p.ϵ * (u_mat .+ p.a .- p.b .* v_mat) + + du .= vcat(vec(fu), vec(fv)) +end function run_simulation(N::Int, tspan::Tuple{Float64,Float64}) # Turing-spot parameters - a = 0.1 - b = 0.5 - ϵ = 0.01 - Du = 1e-5 - Dv = 1e-3 - - dx = 1.0 # grid spacing + p = FHNParams(N, 1.0, 1e-5, 1e-3, 0.01, 0.1, 0.5) # Initial conditions (random noise) - u0, v0 = initial_conditions(N) + Random.seed!(1234) + # Create two vectors with length N*N with numbers between 0.1 and 0.11 + u0 = vec(0.1 .+ 0.01 .* rand(N, N)) + v0 = vec(0.1 .+ 0.01 .* rand(N, N)) + y0 = vcat(u0, v0) - function f!(du, u, p, t) - u_mat = reshape(u[1:N^2], N, N) - v_mat = reshape(u[N^2+1:end], N, N) - - Δu = reshape(laplacian(u_mat, N, dx), N, N) - Δv = reshape(laplacian(v_mat, N, dx), N, N) - - fu = Du * Δu .+ u_mat .- u_mat .^ 3 ./ 3 .- v_mat - fv = Dv * Δv .+ ϵ * (u_mat .+ a .- b .* v_mat) - - du .= vcat(vec(fu), vec(fv)) - end - - prob = ODEProblem(f!, y0, tspan) + prob = ODEProblem(fhn!, y0, tspan, p) sol = solve(prob, BS3(), saveat=1.0) # You can try `Rosenbrock23()` too return sol From fd571169f2a8212657771f045f16b47a0faad796 Mon Sep 17 00:00:00 2001 From: Ruben Seitz Date: Sat, 31 May 2025 12:48:09 +0200 Subject: [PATCH 2/6] adjusted project.toml --- Manifest.toml | 268 ++++++++++++++++++-------------------------------- Project.toml | 1 - 2 files changed, 93 insertions(+), 176 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 9caa1d9..23b9f57 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.11.5" manifest_format = "2.0" -project_hash = "ede42d5c0ee6ced5b877b9fea99444d4d8bea863" +project_hash = "0d147eaf78630b05e95b5317275a880443440272" [[deps.ADTypes]] git-tree-sha1 = "e2478490447631aedba0823d4d7a80b2cc8cdb32" @@ -15,11 +15,6 @@ weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] ADTypesConstructionBaseExt = "ConstructionBase" ADTypesEnzymeCoreExt = "EnzymeCore" -[[deps.ANSIColoredPrinters]] -git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" -uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" -version = "0.0.1" - [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" @@ -186,6 +181,11 @@ version = "1.9.4" uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" version = "1.11.0" +[[deps.BaseDirs]] +git-tree-sha1 = "03fea4a4efe25d2069c2d5685155005fc251c0a1" +uuid = "18cc8868-cbac-4acf-b575-c8ff214dc66f" +version = "1.3.0" + [[deps.BitTwiddlingConvenienceFunctions]] deps = ["Static"] git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" @@ -242,12 +242,13 @@ version = "1.7.0" [[deps.BracketingNonlinearSolve]] deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "637ebe439ba587828fd997b7810d8171eed2ea1b" +git-tree-sha1 = "a9014924595b7a2c1dd14aac516e38fa10ada656" uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" -version = "1.2.0" -weakdeps = ["ForwardDiff"] +version = "1.3.0" +weakdeps = ["ChainRulesCore", "ForwardDiff"] [deps.BracketingNonlinearSolve.extensions] + BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" [[deps.Bzip2_jll]] @@ -285,9 +286,9 @@ version = "1.0.1+0" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "2ac646d71d0d24b44f3f8c84da8c9f4d70fb67df" +git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.4+0" +version = "1.18.5+0" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] @@ -305,12 +306,6 @@ git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581" uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" version = "0.1.13" -[[deps.CodecZlib]] -deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" -uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.8" - [[deps.ColorBrewer]] deps = ["Colors", "JSON"] git-tree-sha1 = "e771a63cc8b539eca78c85b0cabd9233d6c8f06f" @@ -345,9 +340,9 @@ weakdeps = ["SpecialFunctions"] [[deps.Colors]] deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "64e15186f0aa277e174aa81798f7eb8598e0157e" +git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.13.0" +version = "0.13.1" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -462,9 +457,9 @@ version = "5.53.1" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] -git-tree-sha1 = "1bcd3a5c585c477e5d0595937ea7b5adcda6c621" +git-tree-sha1 = "a0e5b5669df9465bc3dd32ea4a8ddeefbc0f7b5c" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.174.0" +version = "6.175.0" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" @@ -477,6 +472,7 @@ version = "6.174.0" DiffEqBaseMPIExt = "MPI" DiffEqBaseMeasurementsExt = "Measurements" DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseMooncakeExt = "Mooncake" DiffEqBaseReverseDiffExt = "ReverseDiff" DiffEqBaseSparseArraysExt = "SparseArrays" DiffEqBaseTrackerExt = "Tracker" @@ -493,6 +489,7 @@ version = "6.174.0" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -621,12 +618,6 @@ git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" version = "0.9.4" -[[deps.Documenter]] -deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"] -git-tree-sha1 = "6c182d0bd94142d7cbc3ae8a1e74668f15d0dd65" -uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "1.11.4" - [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" @@ -644,9 +635,9 @@ uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.5" [[deps.EnzymeCore]] -git-tree-sha1 = "0cdb7af5c39e92d78a0ee8d0a447d32f7593137e" +git-tree-sha1 = "1eb59f40a772d0fbd4cb75e00b3fa7f5f79c975a" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.8.8" +version = "0.8.9" weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] @@ -839,9 +830,9 @@ version = "1.3.7" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "a2df1b776752e3f344e5116c06d75a10436ab853" +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.38" +version = "1.0.1" weakdeps = ["StaticArrays"] [deps.ForwardDiff.extensions] @@ -860,10 +851,10 @@ uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" version = "2.13.4+0" [[deps.FreeTypeAbstraction]] -deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics"] -git-tree-sha1 = "d52e255138ac21be31fa633200b65e4e71d26802" +deps = ["BaseDirs", "ColorVectorSpace", "Colors", "FreeType", "GeometryBasics", "Mmap"] +git-tree-sha1 = "eaca92bac73aa42f68c57d1b8df1b746eeb2bdaa" uuid = "663a7486-cb36-511b-a19d-713bb74d65c9" -version = "0.10.6" +version = "0.10.7" [[deps.FriBidi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -907,9 +898,9 @@ version = "3.4.0+2" [[deps.GLMakie]] deps = ["ColorTypes", "Colors", "FileIO", "FixedPointNumbers", "FreeTypeAbstraction", "GLFW", "GeometryBasics", "LinearAlgebra", "Makie", "Markdown", "MeshIO", "ModernGL", "Observables", "PrecompileTools", "Printf", "ShaderAbstractions", "StaticArrays"] -git-tree-sha1 = "42b458880923d8d2e526ad937ac59bed87e96fc6" +git-tree-sha1 = "0650df73822ce8808dc473e3e1c7581bdb367083" uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -version = "0.11.7" +version = "0.11.8" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -952,23 +943,11 @@ git-tree-sha1 = "6570366d757b50fabae9f4315ad74d2e40c0560a" uuid = "59f7168a-df46-5410-90c8-f2779963d0ec" version = "5.2.3+0" -[[deps.Git]] -deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] -git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" -uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.4.0" - -[[deps.Git_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "2f6d6f7e6d6de361865d4394b802c02fc944fc7c" -uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.49.0+0" - [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "b0036b392358c80d2d2124746c2bf3d48d457938" +git-tree-sha1 = "fee60557e4f19d0fe5cd169211fdda80e494f4e8" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.82.4+0" +version = "2.84.0+0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -995,9 +974,9 @@ version = "1.0.2" [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "55c53be97790242c29031e5cd45e8ac296dadda3" +git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "8.5.0+0" +version = "8.5.1+0" [[deps.HypergeometricFunctions]] deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -1005,12 +984,6 @@ git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" version = "0.3.28" -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - [[deps.IfElse]] git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" @@ -1171,10 +1144,10 @@ uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" version = "3.1.1+0" [[deps.JumpProcesses]] -deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] -git-tree-sha1 = "f2bdec5b4580414aee3178c8caa6e46c344c0bbc" +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] +git-tree-sha1 = "216c196df09c8b80a40a2befcb95760eb979bcfd" uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -version = "9.14.3" +version = "9.15.0" weakdeps = ["FastBroadcast"] [[deps.KernelDensity]] @@ -1224,11 +1197,6 @@ git-tree-sha1 = "a9eaadb366f5493a5654e843864c13d8b107548c" uuid = "10f19ff3-798f-405d-979b-55457f8fc047" version = "0.1.17" -[[deps.LazilyInitializedFields]] -git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0" -uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" -version = "1.3.0" - [[deps.LazyArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] git-tree-sha1 = "866ce84b15e54d758c11946aacd4e5df0e60b7a3" @@ -1293,10 +1261,10 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" version = "1.11.0" [[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "27ecae93dd25ee0909666e6835051dd684cc035e" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.2.2+2" +version = "3.4.7+0" [[deps.Libglvnd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] @@ -1351,9 +1319,9 @@ version = "1.11.0" [[deps.LinearSolve]] deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "c2685cb9d01923f0e63155149c390504e72a8fcc" +git-tree-sha1 = "c618a6a774d5712c6bf02dbcceb51b6dc6b9bb89" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "3.14.0" +version = "3.16.0" [deps.LinearSolve.extensions] LinearSolveBandedMatricesExt = "BandedMatrices" @@ -1424,9 +1392,9 @@ version = "0.5.16" [[deps.Makie]] deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Dates", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageBase", "ImageIO", "InteractiveUtils", "Interpolations", "IntervalSets", "InverseFunctions", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "PNGFiles", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun", "Unitful"] -git-tree-sha1 = "f79e47c8341376c283d3ff3b6eaeee2f73ce69a1" +git-tree-sha1 = "968f03dc65c8144a728f988051a88c78fe625e26" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -version = "0.22.6" +version = "0.22.7" [[deps.MakieCore]] deps = ["ColorTypes", "GeometryBasics", "IntervalSets", "Observables"] @@ -1449,17 +1417,11 @@ deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" version = "1.11.0" -[[deps.MarkdownAST]] -deps = ["AbstractTrees", "Markdown"] -git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899" -uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" -version = "0.1.2" - [[deps.MathTeXEngine]] deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "UnicodeFun"] -git-tree-sha1 = "f5a6805fb46c0285991009b526ec6fae43c6dec2" +git-tree-sha1 = "31a99cb7537f812e1d6be893a71804c35979f1be" uuid = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53" -version = "0.6.3" +version = "0.6.4" [[deps.MatrixFactorizations]] deps = ["ArrayLayouts", "LinearAlgebra", "Printf", "Random"] @@ -1559,9 +1521,9 @@ version = "1.2.0" [[deps.NonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseMatrixColorings", "StaticArraysCore", "SymbolicIndexingInterface"] -git-tree-sha1 = "7fd96e0e6585063a7193007349799155ba5a069f" +git-tree-sha1 = "aeb6fb02e63b4d4f90337ed90ce54ceb4c0efe77" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "4.8.0" +version = "4.9.0" [deps.NonlinearSolve.extensions] NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" @@ -1591,9 +1553,9 @@ version = "4.8.0" [[deps.NonlinearSolveBase]] deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLOperators", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] -git-tree-sha1 = "df412bac2b517411eabb42c78ff234b01eb3e95b" +git-tree-sha1 = "404d71dd057759f4d590191a643113485c4a482a" uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" -version = "1.9.0" +version = "1.12.0" weakdeps = ["BandedMatrices", "DiffEqBase", "ForwardDiff", "LineSearch", "LinearSolve", "SparseArrays", "SparseMatrixColorings"] [deps.NonlinearSolveBase.extensions] @@ -1613,9 +1575,9 @@ version = "1.5.0" [[deps.NonlinearSolveQuasiNewton]] deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] -git-tree-sha1 = "b69a68ef3a7bba7ab1d5ef6321ed6d9a613142b0" +git-tree-sha1 = "e3888bdbab6e0bfadbc3164ef4595e40e7b7e954" uuid = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" -version = "1.5.0" +version = "1.6.0" weakdeps = ["ForwardDiff"] [deps.NonlinearSolveQuasiNewton.extensions] @@ -1679,12 +1641,6 @@ deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" version = "0.8.5+0" -[[deps.OpenSSH_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] -git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" -uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" -version = "10.0.1+0" - [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "9216a80ff3682833ac4b733caa8c00390620ba5d" @@ -1716,15 +1672,15 @@ uuid = "91d4177d-7536-5919-b921-800302f37372" version = "1.3.3+0" [[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" +version = "1.8.1" [[deps.OrdinaryDiffEq]] deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "56d5500e9970f0112a4e1ab6474d6fedde61ef64" +git-tree-sha1 = "1c2b2df870944e0dc01454fd87479847c55fa26c" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.97.0" +version = "6.98.0" [[deps.OrdinaryDiffEqAdamsBashforthMoulton]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] @@ -1734,9 +1690,9 @@ version = "1.2.0" [[deps.OrdinaryDiffEqBDF]] deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqSDIRK", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "a72bf554d5fd1f33a8d2aead3562eddd28ba4c76" +git-tree-sha1 = "42755bd13fe56e9d9ce1bc005f8b206a6b56b731" uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" -version = "1.5.0" +version = "1.5.1" [[deps.OrdinaryDiffEqCore]] deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] @@ -1756,9 +1712,9 @@ version = "1.4.0" [[deps.OrdinaryDiffEqDifferentiation]] deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseMatrixColorings", "StaticArrayInterface", "StaticArrays"] -git-tree-sha1 = "315d25dd06614e199973cc13d22e533073bd7458" +git-tree-sha1 = "c78060115fa4ea9d70ac47fa49496acbc630aefa" uuid = "4302a76b-040a-498a-8c04-15b101fed76b" -version = "1.9.0" +version = "1.9.1" [[deps.OrdinaryDiffEqExplicitRK]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "TruncatedStacktraces"] @@ -1828,9 +1784,9 @@ version = "1.3.0" [[deps.OrdinaryDiffEqNonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "FastClosures", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "PreallocationTools", "RecursiveArrayTools", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "StaticArrays"] -git-tree-sha1 = "2f956f14c97ff507e855703ac760d513f7c3e372" +git-tree-sha1 = "ffdb0f5207b0e30f8b1edf99b3b9546d9c48ccaf" uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" -version = "1.9.0" +version = "1.10.0" [[deps.OrdinaryDiffEqNordsieck]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqTsit5", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] @@ -1840,9 +1796,9 @@ version = "1.1.0" [[deps.OrdinaryDiffEqPDIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "Reexport", "StaticArrays"] -git-tree-sha1 = "f74b27b8b811a83d77a9cad6293e793ab0804cdc" +git-tree-sha1 = "ab9897e4bc8e3cf8e15f1cf61dbdd15d6a2341d7" uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" -version = "1.3.0" +version = "1.3.1" [[deps.OrdinaryDiffEqPRK]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "Reexport"] @@ -1864,9 +1820,9 @@ version = "1.1.0" [[deps.OrdinaryDiffEqRosenbrock]] deps = ["ADTypes", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static"] -git-tree-sha1 = "a9b9aff8e740bfc09a2ea669f7fc02e867f95ab7" +git-tree-sha1 = "063e5ff1447b3869856ed264b6dcbb21e6e8bdb0" uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" -version = "1.10.0" +version = "1.10.1" [[deps.OrdinaryDiffEqSDIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "SciMLBase", "TruncatedStacktraces"] @@ -1927,12 +1883,6 @@ git-tree-sha1 = "cf181f0b1e6a18dfeb0ee8acc4a9d1672499626c" uuid = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883" version = "0.4.4" -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - [[deps.Packing]] deps = ["GeometryBasics"] git-tree-sha1 = "bc5bf2ea3d5351edf285a06b0016788a121ce92c" @@ -1947,9 +1897,9 @@ version = "0.5.12" [[deps.Pango_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3b31172c032a1def20c98dae3f2cdc9d10e3b561" +git-tree-sha1 = "275a9a6d85dc86c24d03d1837a0010226a96f540" uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.56.1+0" +version = "1.56.3+0" [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] @@ -1998,9 +1948,9 @@ version = "0.4.4" [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "2082cc4be5e765bd982ed04ea06c068f4f702410" +git-tree-sha1 = "6f7cd22a802094d239824c57d94c8e2d0f7cfc7d" uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.17" +version = "0.7.18" [[deps.PolyesterWeave]] deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] @@ -2161,12 +2111,6 @@ git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" version = "1.2.2" -[[deps.RegistryInstances]] -deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] -git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51" -uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3" -version = "0.1.0" - [[deps.RelocatableFolders]] deps = ["SHA", "Scratch"] git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" @@ -2204,9 +2148,9 @@ version = "0.2.1" [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "7cb9d10026d630ce2dd2a1fc6006a3d5041b34c0" +git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.14" +version = "0.5.15" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -2224,10 +2168,10 @@ uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" [[deps.SciMLBase]] -deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "846e89af4ec4ba471d3050a70405978cbdf70681" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "ce947672206f6a3a2bee1017c690cfd5fd82d897" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.91.1" +version = "2.96.0" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2252,15 +2196,15 @@ version = "2.91.1" [[deps.SciMLJacobianOperators]] deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] -git-tree-sha1 = "d563758f3ce5153810adebc534d88e24d34eeb95" +git-tree-sha1 = "7da1216346ad79499d08d7e2a3dbf297dc80c829" uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" -version = "0.1.5" +version = "0.1.6" [[deps.SciMLOperators]] deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] -git-tree-sha1 = "d82853c515a8d9d42c1ab493a2687a37f1e26c91" +git-tree-sha1 = "85608e4aaf758547ffc4030c908318b432114ec9" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.4.0" +version = "1.3.0" weakdeps = ["SparseArrays", "StaticArraysCore"] [deps.SciMLOperators.extensions] @@ -2382,31 +2326,11 @@ version = "0.6.18" NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" -[[deps.SparseDiffTools]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "ccbf06a08573200853b1bd06203d8ccce8449578" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.26.0" - - [deps.SparseDiffTools.extensions] - SparseDiffToolsEnzymeExt = "Enzyme" - SparseDiffToolsPolyesterExt = "Polyester" - SparseDiffToolsPolyesterForwardDiffExt = "PolyesterForwardDiff" - SparseDiffToolsSymbolicsExt = "Symbolics" - SparseDiffToolsZygoteExt = "Zygote" - - [deps.SparseDiffTools.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" - PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - [[deps.SparseMatrixColorings]] -deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "76e9564f0de0d1d7a46095e758ae13ceba680cfb" +deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"] +git-tree-sha1 = "ab958b4fec46d1f1d057bb8e2a99bfdb90744646" uuid = "0a514795-09f3-496d-8182-132a7b665d35" -version = "0.4.19" +version = "0.4.20" [deps.SparseMatrixColorings.extensions] SparseMatrixColoringsCliqueTreesExt = "CliqueTrees" @@ -2434,9 +2358,9 @@ version = "1.0.3" [[deps.StackViews]] deps = ["OffsetArrays"] -git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c" +git-tree-sha1 = "be1cf4eb0ac528d96f5115b4ed80c26a8d8ae621" uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" -version = "0.1.1" +version = "0.1.2" [[deps.Static]] deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] @@ -2483,9 +2407,9 @@ weakdeps = ["SparseArrays"] [[deps.StatsAPI]] deps = ["LinearAlgebra"] -git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.0" +version = "1.7.1" [[deps.StatsBase]] deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] @@ -2511,10 +2435,10 @@ uuid = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" version = "2.5.0" [[deps.StochasticDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqNoiseProcess", "DocStringExtensions", "FastPower", "FiniteDiff", "ForwardDiff", "JumpProcesses", "LevyArea", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"] -git-tree-sha1 = "b1e151feffd589382530930da1467474fe8c37e4" +deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqNoiseProcess", "DocStringExtensions", "FastPower", "FiniteDiff", "ForwardDiff", "JumpProcesses", "LevyArea", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SparseArrays", "StaticArrays", "UnPack"] +git-tree-sha1 = "2992af2739fdcf5862b12dcf53a5f6e3e4acd358" uuid = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" -version = "6.79.0" +version = "6.80.0" [[deps.StrideArraysCore]] deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] @@ -2615,9 +2539,9 @@ version = "1.11.0" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] -git-tree-sha1 = "18ad3613e129312fe67789a71720c3747e598a61" +git-tree-sha1 = "2d529b6b22791f3e22e7ec5c60b9016e78f5f6bf" uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.3" +version = "0.5.4" [[deps.TiffImages]] deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "Mmap", "OffsetArrays", "PkgVersion", "ProgressMeter", "SIMD", "UUIDs"] @@ -2627,9 +2551,9 @@ version = "0.11.3" [[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "f57facfd1be61c42321765d3551b3df50f7e09f6" +git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.28" +version = "0.5.29" [deps.TimerOutputs.extensions] FlameGraphsExt = "FlameGraphs" @@ -2684,17 +2608,11 @@ weakdeps = ["ConstructionBase", "InverseFunctions"] ConstructionBaseUnitfulExt = "ConstructionBase" InverseFunctionsUnitfulExt = "InverseFunctions" -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" - [[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "85c7811eddec9e7f22615371c3cc81a504c508ee" +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "XML2_jll"] +git-tree-sha1 = "49be0be57db8f863a902d59c0083d73281ecae8e" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.21.0+2" +version = "1.23.1+0" [[deps.Wayland_protocols_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] diff --git a/Project.toml b/Project.toml index 3d4a294..19c0af6 100644 --- a/Project.toml +++ b/Project.toml @@ -1,5 +1,4 @@ [deps] DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" From 3619fe10be1b13a76b99af3b32305f56a9744083 Mon Sep 17 00:00:00 2001 From: Ruben Seitz Date: Sat, 31 May 2025 13:31:25 +0200 Subject: [PATCH 3/6] added more docs --- scripts/run_simulation.jl | 2 +- src/solver.jl | 14 +++++++++++++- src/visualization.jl | 13 ++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/scripts/run_simulation.jl b/scripts/run_simulation.jl index 842a71a..bc65ee4 100644 --- a/scripts/run_simulation.jl +++ b/scripts/run_simulation.jl @@ -7,7 +7,7 @@ using .Visualization N = 100 tspan = (0.0, 100.0) -sol = run_simulation(N, tspan) +sol = AnimalFurFHN.run_simulation(tspan, N) Visualization.step_through_solution(sol, N) \ No newline at end of file diff --git a/src/solver.jl b/src/solver.jl index b7b9114..95ded8f 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -30,7 +30,19 @@ function fhn!(du, u, p::FHNParams, t = 0) du .= vcat(vec(fu), vec(fv)) end -function run_simulation(N::Int, tspan::Tuple{Float64,Float64}) +""" + run_simulation(tspan::Tuple{Float64,Float64}, N::Int) + +solving the ODE and modelling it after FHN + +# Arguments +- `tspan`: tuple of two Float64's representing start and end times for simulation +- `N`: size of the N×N grid + +# Returns +- `sol`: solved differential equation (ODE) +""" +function run_simulation(tspan::Tuple{Float64,Float64}, N::Int) # Turing-spot parameters p = FHNParams(N, 1.0, 1e-5, 1e-3, 0.01, 0.1, 0.5) diff --git a/src/visualization.jl b/src/visualization.jl index fb19860..6a1cda5 100644 --- a/src/visualization.jl +++ b/src/visualization.jl @@ -1,8 +1,19 @@ module Visualization using GLMakie +""" + step_through_solution(sol::SolutionType, N::Int) -function step_through_solution(sol, N) +Function for visualization for the output of run_simulation + +# Arguments +- `sol`: computed differential equation by run_simulation +- `N`: size of the N×N grid + +# Returns +- ``: Displays created figure +""" +function step_through_solution(sol::SolutionType, N::Int) fig = Figure(resolution=(600, 600)) ax = Axis(fig[1, 1]) slider = Slider(fig[2, 1], range=1:length(sol), startvalue=1) From 3fcfa16570584fab18937fcd5e4e64de9fe8095d Mon Sep 17 00:00:00 2001 From: 2211567 Date: Sat, 31 May 2025 13:47:46 +0200 Subject: [PATCH 4/6] fixed code --- src/solver.jl | 8 ++++---- src/visualization.jl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/solver.jl b/src/solver.jl index 95ded8f..1b2787b 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -18,11 +18,11 @@ within a larger numerical solver of partial differential equations. - `du`: calculated derivatives put back into the du array """ function fhn!(du, u, p::FHNParams, t = 0) - u_mat = reshape(u[1:N^2], N, N) # activation variable - v_mat = reshape(u[N^2+1:end], N, N) # deactivation variable + u_mat = reshape(u[1:p.N^2], p.N, p.N) # activation variable + v_mat = reshape(u[p.N^2+1:end], p.N, p.N) # deactivation variable - Δu = reshape(laplacian(u_mat, N, p.dx), N, N) - Δv = reshape(laplacian(v_mat, N, p.dx), N, N) + Δu = reshape(laplacian(u_mat, p.N, p.dx), p.N, p.N) + Δv = reshape(laplacian(v_mat, p.N, p.dx), p.N, p.N) fu = p.Du * Δu .+ u_mat .- u_mat .^ 3 ./ 3 .- v_mat fv = p.Dv * Δv .+ p.ϵ * (u_mat .+ p.a .- p.b .* v_mat) diff --git a/src/visualization.jl b/src/visualization.jl index 6a1cda5..a62460d 100644 --- a/src/visualization.jl +++ b/src/visualization.jl @@ -13,7 +13,7 @@ Function for visualization for the output of run_simulation # Returns - ``: Displays created figure """ -function step_through_solution(sol::SolutionType, N::Int) +function step_through_solution(sol, N::Int) fig = Figure(resolution=(600, 600)) ax = Axis(fig[1, 1]) slider = Slider(fig[2, 1], range=1:length(sol), startvalue=1) From aec9b33b38774ec38c29641cf9eaf4c4d0510131 Mon Sep 17 00:00:00 2001 From: 2211567 Date: Sat, 31 May 2025 13:51:23 +0200 Subject: [PATCH 5/6] made docs foldable --- scripts/run_simulation.jl | 2 +- src/laplacian.jl | 16 ++++++++-------- src/solver.jl | 30 +++++++++++++++--------------- src/visualization.jl | 12 ++++++------ 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/scripts/run_simulation.jl b/scripts/run_simulation.jl index bc65ee4..3e43bb4 100644 --- a/scripts/run_simulation.jl +++ b/scripts/run_simulation.jl @@ -5,7 +5,7 @@ include("../src/visualization.jl") using .Visualization N = 100 -tspan = (0.0, 100.0) +tspan = (0.0, 1000.0) sol = AnimalFurFHN.run_simulation(tspan, N) diff --git a/src/laplacian.jl b/src/laplacian.jl index 5b1cb3c..f9f4965 100644 --- a/src/laplacian.jl +++ b/src/laplacian.jl @@ -1,16 +1,16 @@ """ laplacian(U::Matrix{Float64}, N::Int, h::Float64) -Computes the discrete 2D Laplacian of a matrix `U` using a 5-point stencil -and circular boundary conditions. + Computes the discrete 2D Laplacian of a matrix `U` using a 5-point stencil + and circular boundary conditions. -# Arguments -- `U::Matrix{Float64}`: The input 2D matrix representing the field or image. -- `N::Int`: Integer -- `h::Float64`: The spatial step size or grid spacing between points in the discretization. + # Arguments + - `U::Matrix{Float64}`: The input 2D matrix representing the field or image. + - `N::Int`: Integer + - `h::Float64`: The spatial step size or grid spacing between points in the discretization. -# Returns -- `Vector{Float64}`: A flattened (vectorized) representation of the approximated Laplacian values for each element in `U`. The boundary conditions are handled circularly. + # Returns + - `Vector{Float64}`: A flattened (vectorized) representation of the approximated Laplacian values for each element in `U`. The boundary conditions are handled circularly. """ function laplacian(U::Matrix{Float64}, N::Int, h::Float64) # shifts matrices and sums them up diff --git a/src/solver.jl b/src/solver.jl index 1b2787b..e40ed47 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -5,17 +5,17 @@ using .Constants """ fhn(du, u, p:FHNParams, t:) -Implements the spatial dynamics of FitzHugh-Nagumo (fhn). Designed to be -within a larger numerical solver of partial differential equations. + Implements the spatial dynamics of FitzHugh-Nagumo (fhn). Designed to be + within a larger numerical solver of partial differential equations. -# Arguments -- `du`: output argument which stores the calculated derivatives -- `u`: input vector containing the current state of the system at time t -- `p`: holds all the fixed parameters of the FHN model -- `t`: current time + # Arguments + - `du`: output argument which stores the calculated derivatives + - `u`: input vector containing the current state of the system at time t + - `p`: holds all the fixed parameters of the FHN model + - `t`: current time -# Returns -- `du`: calculated derivatives put back into the du array + # Returns + - `du`: calculated derivatives put back into the du array """ function fhn!(du, u, p::FHNParams, t = 0) u_mat = reshape(u[1:p.N^2], p.N, p.N) # activation variable @@ -33,14 +33,14 @@ end """ run_simulation(tspan::Tuple{Float64,Float64}, N::Int) -solving the ODE and modelling it after FHN + solving the ODE and modelling it after FHN -# Arguments -- `tspan`: tuple of two Float64's representing start and end times for simulation -- `N`: size of the N×N grid + # Arguments + - `tspan`: tuple of two Float64's representing start and end times for simulation + - `N`: size of the N×N grid -# Returns -- `sol`: solved differential equation (ODE) + # Returns + - `sol`: solved differential equation (ODE) """ function run_simulation(tspan::Tuple{Float64,Float64}, N::Int) # Turing-spot parameters diff --git a/src/visualization.jl b/src/visualization.jl index a62460d..7f1514a 100644 --- a/src/visualization.jl +++ b/src/visualization.jl @@ -4,14 +4,14 @@ using GLMakie """ step_through_solution(sol::SolutionType, N::Int) -Function for visualization for the output of run_simulation + Function for visualization for the output of run_simulation -# Arguments -- `sol`: computed differential equation by run_simulation -- `N`: size of the N×N grid + # Arguments + - `sol`: computed differential equation by run_simulation + - `N`: size of the N×N grid -# Returns -- ``: Displays created figure + # Returns + - ``: Displays created figure """ function step_through_solution(sol, N::Int) fig = Figure(resolution=(600, 600)) From 88dea7eefb4783601bd71e5cc7bb7a96839c4125 Mon Sep 17 00:00:00 2001 From: 2211567 Date: Sat, 31 May 2025 13:59:22 +0200 Subject: [PATCH 6/6] made FHNParams constructor more readable --- src/constants.jl | 5 +++++ src/solver.jl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/constants.jl b/src/constants.jl index ff9eded..d1734e3 100644 --- a/src/constants.jl +++ b/src/constants.jl @@ -8,6 +8,11 @@ struct FHNParams ϵ::Float64 a::Float64 b::Float64 + + # Inner constructor that takes keyword arguments + # The semicolon ';' separates positional arguments from keyword arguments + FHNParams(; N::Int, dx::Float64, Du::Float64, Dv::Float64, ϵ::Float64, a::Float64, b::Float64) = + new(N, dx, Du, Dv, ϵ, a, b) end export FHNParams diff --git a/src/solver.jl b/src/solver.jl index e40ed47..8999319 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -44,7 +44,7 @@ end """ function run_simulation(tspan::Tuple{Float64,Float64}, N::Int) # Turing-spot parameters - p = FHNParams(N, 1.0, 1e-5, 1e-3, 0.01, 0.1, 0.5) + p = FHNParams(N = N, dx = 1.0, Du = 1e-5, Dv = 1e-3, ϵ = 0.01, a = 0.1, b = 0.5) # Initial conditions (random noise) Random.seed!(1234)