Compare commits
No commits in common. "2dfdd7c08ee12e03ea68b237cfdc4acbac0916ba" and "3e6bf9b3a90997a82ecb5707d9fb581ba1b5bc45" have entirely different histories.
2dfdd7c08e
...
3e6bf9b3a9
|
|
@ -1,9 +1,9 @@
|
|||
include("../src/visualization.jl")
|
||||
include("../src/utils/constants.jl")
|
||||
|
||||
using Observables
|
||||
using GLMakie
|
||||
|
||||
using .Visualization.Constants
|
||||
using .Visualization
|
||||
|
||||
# GSParams AND FHNParams
|
||||
|
|
@ -21,7 +21,7 @@ params = (
|
|||
b=Observable(0.8)
|
||||
)
|
||||
|
||||
params_obs = Observable{CombinedPDEParams}(CombinedPDEParams(N, dx, params.Du[], params.Dv[], params.F[], params.k[], params.ϵ[], params.a[], params.b[]))
|
||||
params_obs = Observable{Constants.CombinedPDEParams}(CombinedPDEParams(N, dx, params.Du[], params.Dv[], params.F[], params.k[], params.ϵ[], params.a[], params.b[]))
|
||||
lift(params.N, params.dx, params.Du, params.Dv, params.F, params.k, params.ϵ, params.a, params.b) do N, dx, Du, Dv, F, k, ϵ, a, b
|
||||
params_obs[] = CombinedPDEParams(N, dx, Du, Dv, F, k, ϵ, a, b)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using DifferentialEquations
|
|||
using Random
|
||||
using Observables
|
||||
|
||||
using ..Constants
|
||||
using .Laplacian
|
||||
|
||||
function step_fhn!(U, V, params_obs::Observable; dx=1, dt=0.01)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
module GrayScottSolver
|
||||
|
||||
include("utils/constants.jl")
|
||||
include("utils/laplacian.jl")
|
||||
|
||||
using Observables
|
||||
|
||||
using .Constants
|
||||
using .Laplacian
|
||||
|
||||
function step_gray_scott!(U, V, params_obs::Observable; dx=1)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
module Constants
|
||||
|
||||
abstract type PDEParams end
|
||||
|
||||
|
|
@ -34,3 +34,6 @@ struct CombinedPDEParams <: PDEParams
|
|||
b::Float64
|
||||
end
|
||||
|
||||
export PDEParams, FHNParams, GSParams, CombinedPDEParams
|
||||
|
||||
end # module Constants
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
module Visualization
|
||||
|
||||
include("utils/constants.jl")
|
||||
include("utils/templates.jl")
|
||||
include("gray_scott_solver.jl")
|
||||
include("fhn_solver.jl")
|
||||
|
||||
using Observables, Makie, GLMakie
|
||||
using .Constants
|
||||
using .Templates
|
||||
using .GrayScottSolver: step_gray_scott!
|
||||
using .FHNSolver: step_fhn!
|
||||
|
|
@ -162,6 +164,7 @@ function build_ui(U, V, param_obs_map::NamedTuple, params_obs, heat_obs)
|
|||
|
||||
on(btn_reset.clicks) do _
|
||||
running[] = false
|
||||
hm.colormap[] = :seismic
|
||||
reset!(U, V, heat_obs)
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue