API documentation

Missing docstring.

Missing docstring for Input1D. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Input2D. Check Documenter's build log for details.

NeuralFieldEq.probNFEFunction
probNFE(neuralFieldEquation)

Pre-process the neural field equation in order to be computed by solveNFE

probNFE receives as input the parameters and functions wrapped in the structures Input1D and Input2D. The arguments of Input1D and Input2D are in the following order:

Input1D/Input2D arguments

  • α :: AbstractFloat
  • v :: AbstractFloat
  • V0 :: fV0: Can be a number or a function
  • L :: Number
  • N :: Integer
  • T :: AbstractFloat
  • n :: Integer
  • I :: fI: External input function
  • K :: fK: Connectivity function
  • S :: fS: Firing rate function

Declaration of I, K and S functions:

  • The function I must have the arguments: in 1D - I(x,t), in 2D - I(x,y,t)
  • The function K must have the arguments: in 1D - K(x), in 2D - K(x,y)
  • The function S must have the arguments: in 1D/2D - S(V)

Examples

julia> # 2D example
julia> I(x,y,t) = 1                      # External input
julia> K(x,y)   = exp(-x^2+y^2)          # Connectivity function
julia> S(V)     = convert(Float64,V>0.0) # Firing rate. Heavyside function H(V)

julia> α  = 1.0  # Constant decay
julia> v  = 20.0 # Finite axonal speed
julia> V0 = 0.0  # Initial condition
julia> L  = 100  # Domain length
julia> N  = 512  # Number of nodes to discretise space
julia> T  = 20.0 # Time span
julia> n  = 200  # Number of nodes to discretise time

julia> nf   = Input2D(α,v,V0,L,N,T,n,I,K,S);
julia> prob = probNFE(nf)
├─ Domain:       Ω × [0,T] = [-50.0,49.8046875]^2 × [0,20.0]
├─ Spatial step: dx   = 0.1953125
├─ Time step:    dt   = 0.1
├─ Velocity:     v    = 20.0
├─ Delay rings:  umax = 36

For 1D domains the procedure is the same but the inputs are wrapped using Input1D.

Missing docstring.

Missing docstring for NeuralFieldEq.ProbOutput1D. Check Documenter's build log for details.

Missing docstring.

Missing docstring for NeuralFieldEq.ProbOutput2D. Check Documenter's build log for details.

NeuralFieldEq.solveNFEFunction
solveNFE(problem,saveat)

Arguments:

  • problem :: ProbOutput1D: Output of probNFE using Input1D structure
  • problem :: ProbOutput2D: Output of probNFE using Input2D structure
  • saveat :: AbstractVector: Vector containing the instants where the solution is saved at

Returns a structure containing the solution to the NFE saved at saveat instants. The structure has x, y and saveat as fields to help plotting the solution.

Examples

julia> # 2D example
julia> saveat = [5.0,20.0]
julia> sol    = solveNFE(prob,saveat) # Deterministic solution saved at t=5 and t=20
julia> sol(20.0) # Solution at t=20
julia> x = sol.x # Spatial vector in x direction 
julia> y = sol.y # Spatial vector in y direction
julia> using Plots
julia> plot(x,y,sol(20.0),st=:surface,title="Solution at t=20") # Surface plot of sol(20.0)

If the neural field is in 1D/2D, the solution is a vector/matrix.


solveNFE(problem,saveat,ϵ,np,ξ=0.1)

Solve stochastic version of an NFE for np trajectories, noise level ϵ and correlation ξ.

Arguments:

  • problem :: ProbOutput1D: Output of probNFE with Input1D
  • problem :: ProbOutput2D: Output of probNFE with Input2D
  • saveat :: AbstractVector: Vector containing the instants where the solution is saved at
  • ϵ :: Number: Level of additive noise
  • np :: Integer: Number of simulations
  • ξ :: AbstractFloat=0.1: Spatial correlation parameter

Returns a structure containing the mean solution and the trajectories of the NFE saved at saveat instants.

Examples

julia> # Stochastic solution saved at t=5,20, with noise level 0.01 simulated 100 times.
julia> sol_sto = solveNFE(prob,saveat,0.01,100)
julia> sol_sto(20.0,4) # 4th path at t=20
julia> sol_sto(5.0)    # Mean solution at t=20
Missing docstring.

Missing docstring for SolveOutDet1D. Check Documenter's build log for details.

Missing docstring.

Missing docstring for SolveOutSto1D. Check Documenter's build log for details.

Missing docstring.

Missing docstring for SolveOutDet2D. Check Documenter's build log for details.

Missing docstring.

Missing docstring for SolveOutSto2D. Check Documenter's build log for details.

Missing docstring.

Missing docstring for NeuralFieldEq.AuxFunctions. Check Documenter's build log for details.

Missing docstring.

Missing docstring for NeuralFieldEq.Domain. Check Documenter's build log for details.