You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the time of this issue, the function gofix looks like
functiongofix(xy::DAMap, order=1)
desc =getdesc(xy)
nv =numvars(desc)
# 1: v = map-identity in harmonic planes, identity in spin
v =zero(xy)
for i=1:nv
@inbounds v.x[i] = xy.x[i] -mono(i,use=desc)
end
v.Q.q[1] =1# 2: map is cut to order 2 or abovecut!(v,v,order+1)
# 3: map is inverted at least to order 1:inv!(v,v)
# 4: a map x is created with dimension nv# x is zero except for the parameters and delta if coasting
x =zero(v) # default identity in parameters
x.Q.q[1] =1# identity in spincompose!(v,v,x)
# 5: add back in identityfor i=1:nv
@inbounds v.x[i] +=mono(i,use=desc)
endreturn v
end
This is pretty fast (could be made faster by proper use of work temporaries accessible by user of inv and compose) , however this is not the easiest to read. gofix could instead be written as
functiongofix(xy::DAMap, order=1)
m =cut(xy, order+1)
return (m-I)^-1∘zero(m)+I
end
This is much easier to understand and read, however much slower. For the best of both worlds, a macro must be implemented to convert the above easy-to-read function to its faster less-easy-to-read function. The approach could be the same as that taken for @FastGTPSA in GTPSA.jl
The text was updated successfully, but these errors were encountered:
At the time of this issue, the function
gofix
looks likeThis is pretty fast (could be made faster by proper use of
work
temporaries accessible by user ofinv
andcompose
) , however this is not the easiest to read.gofix
could instead be written asThis is much easier to understand and read, however much slower. For the best of both worlds, a macro must be implemented to convert the above easy-to-read function to its faster less-easy-to-read function. The approach could be the same as that taken for
@FastGTPSA
in GTPSA.jlThe text was updated successfully, but these errors were encountered: