Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsignorelli committed Apr 2, 2024
1 parent df5e27e commit 6756a5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ See the [`benchmark/track.jl`](https://github.com/bmad-sim/GTPSA.jl/blob/main/be
GTPSA provides several advantages over current Julia AD packages:

1. **Speed**: `GTPSA.jl` is significantly faster than `ForwardDiff.jl` for 2nd-order calculations and above, and has similar performance at 1st-order
2. **Custom Orders in Individual Variables**: Other packages use a single maximum order for all variables. With GTPSA, the
maximum order can be set differently for different variables. For example, computing the Taylor expansion of $f(x_1,x_2)$ to 2nd order in $x_1$ and 6th order in $x_2$ is possible
2. **Custom Orders in Individual Variables**: Other packages use a single maximum order for all variables. With GTPSA, the maximum order can be set differently for different variables. For example, computing the Taylor expansion of $f(x_1,x_2)$ to 2nd order in $x_1$ and 6th order in $x_2$ is possible
3. **Complex Numbers**: GTPSA natively supports complex numbers and allows for mixing of complex and real truncated power series
4. **Distinction Between State Variables and Parameters**: Distinguishing between dependent variables and parameters in the solution of a differential equation expressed as a power series in the dependent variables/parameters can be advantageous in analysis

Expand Down
4 changes: 2 additions & 2 deletions docs/src/man/j_slice.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ h = f[(1=>2, 3=>1, :)] # Colon position is irrelevant in slicing with sparse mo
When indexing by monomial index, a colon simply needs to be included after the variable index, or just a colon if a parameter is specified:

```@repl slice
fx1 = f[1,:]
fk1 = f[:,param=2]
fx3 = f[3,:]
fk1 = f[:,param=1]
```

## `par`
Expand Down
6 changes: 4 additions & 2 deletions src/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,20 @@ for each TPS in the map (depending on output type), to pass to the low-level C c
They are correspondingly referred to as `outx_low`, `m2x_low`, and `m1x_low`. These three temporaries containers
can be optionally passed as a tuple in `work_low`, and must satisfy the following requirements:
```
work_low[1] = outx_low # Length >= length(m) = length(m2)
work_low[2] = m2x_low # Length >= length(m2) = length(m)
work_low[3] = m1x_low # Length >= length(m1)
```
If promotion is occuring, then one of the input vectors must be promoted to `ComplexTPS`. A vector of pre-allocated
`ComplexTPS`s can optionally provided as the first argument in the `work_prom` tuple, and has the requirement:
If `eltype(m.x) != eltype(m1.x)` (then `m1` must be promoted):
work_prom[1] = m1x_prom # Length >= length(m1), Vector{ComplexTPS}
`work_prom[1] = m1x_prom # Length >= length(m1), Vector{ComplexTPS}`
else if `eltype(m.x) != eltype(m2.x)` (then `m2` must be promoted):
work_prom[1] = m2x_prom # Length >= length(m2) = length(m), Vector{ComplexTPS}
`work_prom[1] = m2x_prom # Length >= length(m2) = length(m), Vector{ComplexTPS}`
Note that the `ComplexTPS`s in the vectors must be allocated and have the same `Descriptor`.
"""
Expand Down

0 comments on commit 6756a5d

Please sign in to comment.