Skip to content

Commit

Permalink
docs: fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
oameye committed Dec 28, 2024
1 parent 42a0bfb commit 8635398
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 28 deletions.
9 changes: 7 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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/",
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/gMAM_Maierstein.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\\
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
4 changes: 4 additions & 0 deletions docs/src/man/sampling.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Sampling transitions

```@docs
TransitionEnsemble
```

## ... by direct simulation
These functions generate noise-induced transitions between an initial and final state.

Expand Down
9 changes: 1 addition & 8 deletions docs/src/man/simulation.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 7 additions & 1 deletion docs/src/man/systemanalysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
```
14 changes: 9 additions & 5 deletions docs/src/man/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
14 changes: 6 additions & 8 deletions src/CriticalTransitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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__()
Expand Down

0 comments on commit 8635398

Please sign in to comment.