From 8635398dd88e8b22033562ee7244a84b1f52304d Mon Sep 17 00:00:00 2001 From: Orjan Ameye Date: Sat, 28 Dec 2024 18:00:47 +0100 Subject: [PATCH] docs: fix links --- docs/make.jl | 9 +++++++-- docs/pages.jl | 2 +- docs/src/examples/gMAM_Maierstein.md | 4 ++-- docs/src/examples/tutorial.md | 2 +- docs/src/man/sampling.md | 4 ++++ docs/src/man/simulation.md | 9 +-------- docs/src/man/systemanalysis.md | 8 +++++++- docs/src/man/utils.md | 14 +++++++++----- src/CriticalTransitions.jl | 14 ++++++-------- 9 files changed, 38 insertions(+), 28 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 5a01d03c..07e68645 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,6 +5,10 @@ using Pkg using CriticalTransitions, ChaosTools, Attractors using DynamicalSystemsBase +StochasticSystemsBase = Base.get_extension(DynamicalSystemsBase, :StochasticSystemsBase) +ChaosToolsExt = Base.get_extension(CriticalTransitions, :ChaosToolsExt) +CoupledSDEsBasin = Base.get_extension(CriticalTransitions, :CoupledSDEsBasin) + project_toml = Pkg.TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml")) package_version = project_toml["version"] @@ -13,6 +17,7 @@ authors = join(project_toml["authors"], ", ") * " and contributors" github = "https://github.com/juliadynamics/CriticalTransitions.jl" links = InterLinks( + "DynamicalSystemsBase" => "https://juliadynamics.github.io/DynamicalSystemsBase.jl/dev/", # "DiffEqNoiseProcess" => "https://docs.sciml.ai/DiffEqNoiseProcess/stable/", # "DifferentialEquations" => "https://docs.sciml.ai/DiffEqDocs/stable/", # "StochasticDiffEq" => "https://docs.sciml.ai/DiffEqDocs/stable/", @@ -41,12 +46,12 @@ makedocs(; repo=Documenter.Remotes.GitHub("JuliaDynamics", "CriticalTransitions.jl"), modules=[ CriticalTransitions, - CriticalTransitions.DiffEqNoiseProcess, Base.get_extension(CriticalTransitions, :ChaosToolsExt), Base.get_extension(CriticalTransitions, :CoupledSDEsBasin), - DynamicalSystemsBase, Base.get_extension(DynamicalSystemsBase, :StochasticSystemsBase), + # DynamicalSystemsBase ], + checkdocs_ignored_modules=[DynamicalSystemsBase, CriticalTransitions.CTLibrary], pages=pages, linkcheck=true, pagesonly=true, diff --git a/docs/pages.jl b/docs/pages.jl index 8245691d..742b2cc4 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -9,7 +9,7 @@ pages = [ ], "Manual" => Any[ "Define a CoupledSDEs system" => "man/CoupledSDEs.md", - #"Stability analysis" => "man/systemanalysis.md", + "Stability analysis" => "man/systemanalysis.md", "Simulating the system" => "man/simulation.md", "Sampling transitions" => "man/sampling.md", "Large deviation theory" => "man/largedeviations.md", diff --git a/docs/src/examples/gMAM_Maierstein.md b/docs/src/examples/gMAM_Maierstein.md index ae12b488..07fa2838 100644 --- a/docs/src/examples/gMAM_Maierstein.md +++ b/docs/src/examples/gMAM_Maierstein.md @@ -16,7 +16,7 @@ Let us explore the features of [CriticalTransitions.jl](https://github.com/Julia ## Maier-stein model -The [Maier-Stein model](https://link.springer.com/article/10.1007/BF02183736) (J. Stat. Phys 83, 3–4 (1996)) is commonly used in the field of nonlinear dynamics for benchmarking Large Deviation Theory (LDT) techniques, e.g., stoachastic transitions between different stable states. It is a simple model that describes the dynamics of a system with two degrees of freedom ``u`` and ``v``, and is given by the following set of ordinary differential equations: +The [Maier-Stein model](https://doi.org/10.1007/BF02183736) (J. Stat. Phys 83, 3–4 (1996)) is commonly used in the field of nonlinear dynamics for benchmarking Large Deviation Theory (LDT) techniques, e.g., stoachastic transitions between different stable states. It is a simple model that describes the dynamics of a system with two degrees of freedom ``u`` and ``v``, and is given by the following set of ordinary differential equations: ```math \begin{aligned} \dot{u} &= u-u^3 - \beta*u*v^2\\ @@ -229,7 +229,7 @@ yy = 0.3 .* (-xx .^ 2 .+ 1) init = Matrix([xx yy]') ``` -`geometric_min_action_method` computes the minimizer of the Freidlin-Wentzell action using the geometric minimum action method (gMAM), to find the minimum action path (instanton) between an initial state x_i and final state x_f. The Minimum Action Method (MAM) is a more traditional approach, while the Geometric Minimum Action Method (gMAM) is a blend of the original MAM and the [string method](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.66.052301). +`geometric_min_action_method` computes the minimizer of the Freidlin-Wentzell action using the geometric minimum action method (gMAM), to find the minimum action path (instanton) between an initial state x_i and final state x_f. The Minimum Action Method (MAM) is a more traditional approach, while the Geometric Minimum Action Method (gMAM) is a blend of the original MAM and the [string method](https://doi.org/10.1103/PhysRevB.66.052301). ```@example GMAM gm = geometric_min_action_method(sys, init, maxiter=500; show_progress=false) diff --git a/docs/src/examples/tutorial.md b/docs/src/examples/tutorial.md index c92c07d9..5d61078a 100644 --- a/docs/src/examples/tutorial.md +++ b/docs/src/examples/tutorial.md @@ -77,7 +77,7 @@ sim = trajectory(sys, 100, fp1) In the keyword arguments, we have specified at which interval the solution is saved. Further keyword arguments can be used to change the solver (the default is `SOSRA()` for stochastic integration) and other settings. -The simulated trajectory is stored in `sim` in the usual output format of the [`solve`](https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/#CommonSolve.solve-Tuple%7BSciMLBase.AbstractDEProblem,%20Vararg%7BAny%7D%7D) method of DifferentialEquations.jl, including the solution `sim.u` and the vector of time points `sim.t`. The solution can also be accessed as a matrix `sim[i, t]`, where `i` is the `i`-th component of `u` and `t` the time index. +The simulated trajectory is stored in `sim` in the usual output format of the [`solve`](https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/) method of DifferentialEquations.jl, including the solution `sim.u` and the vector of time points `sim.t`. The solution can also be accessed as a matrix `sim[i, t]`, where `i` is the `i`-th component of `u` and `t` the time index. Let's plot the result. Did the trajectory transition to the other attractor? diff --git a/docs/src/man/sampling.md b/docs/src/man/sampling.md index fbf425d1..161ef7ce 100644 --- a/docs/src/man/sampling.md +++ b/docs/src/man/sampling.md @@ -1,5 +1,9 @@ # Sampling transitions +```@docs +TransitionEnsemble +``` + ## ... by direct simulation These functions generate noise-induced transitions between an initial and final state. diff --git a/docs/src/man/simulation.md b/docs/src/man/simulation.md index a1e871c6..0b2dabc6 100644 --- a/docs/src/man/simulation.md +++ b/docs/src/man/simulation.md @@ -1,16 +1,9 @@ # Simulating the system We provide two main functions to simulate a [`CoupledSDEs`](@ref) forward in time: -* [`trajectory`](@ref), which integrates the stochastic `CoupledSDEs` system forward in time +* [`DynamicalSystemsBase.trajectory`](@extref), which integrates the stochastic `CoupledSDEs` system forward in time * [`deterministic_orbit`](@ref), which integrates only the deterministic part of the `CoupledSDEs` system -## Stochastic dynamics - -```@docs -trajectory -``` - -## Deterministic dynamics ```@docs deterministic_orbit diff --git a/docs/src/man/systemanalysis.md b/docs/src/man/systemanalysis.md index 30a3f080..7878775b 100644 --- a/docs/src/man/systemanalysis.md +++ b/docs/src/man/systemanalysis.md @@ -4,7 +4,6 @@ To use the following functionalities, you need to load `ChoasTools.jl` and `Attr ## Fixed points ```@docs -equilib(sys::CoupledSDEs, state; kwargs...) fixedpoints ``` @@ -16,4 +15,11 @@ introduced by [Battelino et al. (1988)](https://doi.org/10.1016/0167-2789(88)900 ```@docs edgetracking bisect_to_edge +``` + +## Baisin of attraction +```@docs +basinboundary +basboundary +basins ``` \ No newline at end of file diff --git a/docs/src/man/utils.md b/docs/src/man/utils.md index 5b272530..cf7e1b1e 100644 --- a/docs/src/man/utils.md +++ b/docs/src/man/utils.md @@ -3,12 +3,16 @@ ## `CoupledSDEs` utility functions ```@docs -covariance_matrix -diffusion_matrix -dynamic_rule +solver +StochasticSystemsBase.covariance_matrix +StochasticSystemsBase.diffusion_matrix noise_process -current_state -set_state! drift div_drift +``` + +## More + +```@docs +intervals_to_box ``` \ No newline at end of file diff --git a/src/CriticalTransitions.jl b/src/CriticalTransitions.jl index 5f44076e..23aac94c 100644 --- a/src/CriticalTransitions.jl +++ b/src/CriticalTransitions.jl @@ -69,21 +69,19 @@ using .CTLibrary # Core types export CoupledSDEs, CoupledODEs, noise_process, covariance_matrix, diffusion_matrix export dynamic_rule, current_state, set_state!, trajectory +export drift, div_drift, solver export sgmam, SgmamSystem +export fw_action, om_action, action, geometric_action +export min_action_method, geometric_min_action_method, string_method +export MinimumActionPath -# Methods -export drift, div_drift, solver export deterministic_orbit export transition, transitions +export TransitionEnsemble + export basins, basinboundary, basboundary export intervals_to_box -export fw_action, om_action, action, geometric_action -export min_action_method, geometric_min_action_method -export MinimumActionPath -export string_method -export covariance_matrix, diffusion_matrix -# export edgetracking, bisect_to_edge, AttractorsViaProximity # Error hint for extensions stubs function __init__()