Skip to content

Commit

Permalink
manual canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
oameye committed Nov 29, 2024
1 parent c174fb9 commit 37501f3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 12 deletions.
14 changes: 12 additions & 2 deletions docs/src/manual/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ DifferentialEquation
HarmonicVariable
HarmonicEquation
```
```@docs; canonical=false

```@docs
rearrange_standard
rearrange_standard!
first_order_transform!
is_rearranged_standard
get_equations
```

```@docs
get_harmonic_equations
get_krylov_equations
add_harmonic!
```

```@docs
get_independent_variables
get_variables
Expand All @@ -39,19 +42,22 @@ get_steady_states
```

### Methods

```@docs
WarmUp
TotalDegree
Polyhedral
```

### Access solutions

```@docs
get_single_solution
transform_solutions
```

### Classify

```@docs
classify_solutions!
get_class
Expand All @@ -66,6 +72,7 @@ plot_spaghetti
```

## Limit cycles

```@docs
get_limit_cycles
get_cycle_variables
Expand All @@ -84,20 +91,23 @@ plot_linear_response
plot_rotframe_jacobian_response
```

## Extentsions
## Extensions

### OrdinaryDiffEq

```@docs
AdiabaticSweep
follow_branch
plot_1D_solutions_branch
```

### SteadyStateSweep

```@docs
steady_state_sweep
```

### ModelingToolkit

```@docs
```
4 changes: 2 additions & 2 deletions docs/src/manual/entering_eom.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The struct `DifferentialEquation` is the primary input method; it holds an ODE or a coupled system of ODEs composed of terms with harmonic time-dependence
The dependent variables are specified during input, any other symbols
are identified as parameters. Information on which variable is to be expanded in which harmonic is specified using `add_harmonic!`.
are identified as parameters. Information on which variable is to be expanded in which harmonic is specified using `add_harmonic!`.

`DifferentialEquation.equations` stores a dictionary assigning variables to equations. This information is necessary because the harmonics belonging to a variable are later used to Fourier-transform its corresponding ODE.

Expand All @@ -11,4 +11,4 @@ DifferentialEquation
add_harmonic!
get_variables(::DifferentialEquation)
get_independent_variables(::DifferentialEquation)
```
```
4 changes: 2 additions & 2 deletions docs/src/manual/extracting_harmonics.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ The equations governing the harmonics are stored using the two following structs
HarmonicVariable
```

When the full set of equations of motion is expanded using the harmonic ansatz, the result is stored as a `HarmonicEquation`. For an initial equation of motion consisting of $M$ variables, each expanded in $N$ harmonics, the resulting `HarmonicEquation` holds $2NM$ equations of $2NM$ variables. Each symbol not corresponding to a variable is identified as a parameter.
When the full set of equations of motion is expanded using the harmonic ansatz, the result is stored as a `HarmonicEquation`. For an initial equation of motion consisting of $M$ variables, each expanded in $N$ harmonics, the resulting `HarmonicEquation` holds $2NM$ equations of $2NM$ variables. Each symbol not corresponding to a variable is identified as a parameter.

A `HarmonicEquation` can be either parsed into a steady-state `Problem` or solved using a dynamical ODE solver.

```@docs; canonical=false
HarmonicEquation
```
```\
4 changes: 2 additions & 2 deletions docs/src/manual/linear_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The simplest way to extract the linear response of a steady state is to evaluate
The advantage of this method is that for a given parameter set, only one matrix diagonalization is needed to fully describe the response spectrum. However, the method is inaccurate for response frequencies far from the frequencies used in the harmonic ansatz (it relies on the response oscillating slowly in the rotating frame).

Behind the scenes, the spectra are stored using the dedicated structs `Lorentzian` and `JacobianSpectrum`.
```@docs
```@docs; canonical=false
HarmonicBalance.LinearResponse.JacobianSpectrum
HarmonicBalance.LinearResponse.Lorentzian
```
Expand All @@ -36,7 +36,7 @@ HarmonicBalance.LinearResponse.Lorentzian

Setting `order > 1` increases the accuracy of the response spectra. However, unlike for the Jacobian, here we must perform a matrix inversion for each response frequency.

```@docs
```@docs; canonical=false
HarmonicBalance.LinearResponse.ResponseMatrix
HarmonicBalance.get_response
HarmonicBalance.LinearResponse.get_response_matrix
Expand Down
3 changes: 3 additions & 0 deletions docs/src/manual/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
We offer several methods for solving the nonlinear algebraic equations that arise from the harmonic balance procedure. Each method has different tradeoffs between speed, robustness, and completeness.

## Total Degree Method

```@docs; canonical=false
TotalDegree
```

## Polyhedral Method

```@docs; canonical=false
Polyhedral
```

## Warm Up Method

```@docs; canonical=false
WarmUp
```
2 changes: 1 addition & 1 deletion docs/src/manual/saving.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All of the types native to `HarmonicBalance.jl` can be saved into a `.jld2` file

The function `export_csv` saves a .csv file which can be plot elsewhere.

```@docs
```@docs; canonical=false
HarmonicBalance.save
HarmonicBalance.load
HarmonicBalance.export_csv
Expand Down
4 changes: 2 additions & 2 deletions docs/src/manual/solving_harmonics.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The solutions in `Result` are accompanied by similarly-sized boolean arrays stor

By default, classes "physical", "stable" and "binary\_labels" are created. User-defined classification is possible with `classify_solutions!`.

```@docs
```@docs; canonical=false
HarmonicBalance.classify_solutions!
```

Expand All @@ -35,6 +35,6 @@ The function `sort_solutions` goes over the the raw output of `get_steady_states

Currently, `sort_solutions` is compatible with 1D and 2D arrays of solution sets.

```@docs
```@docs; canonical=false
HarmonicBalance.sort_solutions
```
2 changes: 1 addition & 1 deletion docs/src/manual/time_dependent.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ HarmonicBalance.plot(::OrdinaryDiffEqTsit5.ODESolution, ::Any, ::HarmonicEquatio
## Miscellaneous
Using a time-dependent simulation can verify solution stability in cases where the Jacobian is too expensive to compute.

```@docs
```@docs; canonical=false
HarmonicBalance.is_stable
```

0 comments on commit 37501f3

Please sign in to comment.