Skip to content

Commit

Permalink
Merge pull request #143 from bmad-sim/newTPS
Browse files Browse the repository at this point in the history
New tps
  • Loading branch information
mattsignorelli authored Jan 22, 2025
2 parents 378a697 + d66575d commit 6b0eca1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
1 change: 0 additions & 1 deletion docs/src/man/i_methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ getord!
integ
integ!
inv!
GTPSA.inv
normTPS
numcoefs
numtype
Expand Down
2 changes: 2 additions & 0 deletions src/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ Inverts the `TPS` map `m1` and sets `m` equal to the result. The scalar part of
`m1` is ignored, so the user is responsible for ensuring the coordinate system
is correct by either translating `m` or translating the coordinate system.
Also see `GTPSA.inv`, which only acts on `AbstractArray{TPS{T,D}}` types.
# Arguments
- `m::Union{AbstractArray{TPS{T,D}},TPS{T,D}}`
- `m1::Union{AbstractArray{TPS{T,D1}},TPS{T,D1}}`
Expand Down
30 changes: 15 additions & 15 deletions test/test_static.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3575,7 +3575,7 @@ end
@test normTPS(tt2-t2) < tol
@test norm(tz-z) < tol

y = TPS.(y)
y = TPS{d}.(y)
z = rand(3)
w = rand(3)
@FastGTPSA begin
Expand Down Expand Up @@ -4876,21 +4876,21 @@ end
t[1][0] = 1
ct[1][0] = 1
# Now do operators
t1 = TPS.(t)
t1 = TPS{d}.(t)
t1[1][0] = 1
t2 = TPS.(t)
t2 = TPS{d}.(t)
t2[1][0] = 2
t3 = TPS.(t)
t3 = TPS{d}.(t)
t3[1][0] = 3

ct1 = ComplexTPS64.(ct)
ct1 = ComplexTPS64{d}.(ct)
ct1[1][0] = 1 + 1im
ct2 = ComplexTPS64.(ct)
ct2 = ComplexTPS64{d}.(ct)
ct2[1][0] = 2 + 2im
ct3 = ComplexTPS64.(ct)
ct3 = ComplexTPS64{d}.(ct)
ct3[1][0] = 3 + 3im

t = ComplexTPS64.(t)
t = ComplexTPS64{d}.(t)
t[1][0] = 0.5+0.5im; t[1][[1]] = 2+2im; t[1][[2]] = 3+3im; t[1][[3]] = 4+4im; t[1][[4]] = 5+5im; t[1][[5]] = 6+6im
v = [0.5+0.5im]
tol = 1e-10
Expand Down Expand Up @@ -5927,21 +5927,21 @@ if VERSION >= v"1.10"
t[1][0] = 1
ct[1][0] = 1
# Now do operators
t1 = TPS.(t)
t1 = TPS{d}.(t)
t1[1][0] = 1
t2 = TPS.(t)
t2 = TPS{d}.(t)
t2[1][0] = 2
t3 = TPS.(t)
t3 = TPS{d}.(t)
t3[1][0] = 3

ct1 = ComplexTPS64.(ct)
ct1 = ComplexTPS64{d}.(ct)
ct1[1][0] = 1 + 1im
ct2 = ComplexTPS64.(ct)
ct2 = ComplexTPS64{d}.(ct)
ct2[1][0] = 2 + 2im
ct3 = ComplexTPS64.(ct)
ct3 = ComplexTPS64{d}.(ct)
ct3[1][0] = 3 + 3im

t = ComplexTPS64.(t)
t = ComplexTPS64{d}.(t)
t[1][0] = 0.5+0.5im; t[1][[1]] = 2+2im; t[1][[2]] = 3+3im; t[1][[3]] = 4+4im; t[1][[4]] = 5+5im; t[1][[5]] = 6+6im
v = [0.5+0.5im]
tol = 1e-10
Expand Down

0 comments on commit 6b0eca1

Please sign in to comment.