gaioguys / GAIO.jl

A Julia package for set oriented computations.
MIT License
9 stars 4 forks source link

Transferoperator in Compressed Sparse Column format #73

Closed April-Hannah-Lena closed 9 months ago

April-Hannah-Lena commented 1 year ago

As mentioned in #72 this is the PR for TransferOperator using CSC format. This is also not tested yet, I will continue to update.

April-Hannah-Lena commented 1 year ago

good news:

the Lorenz system

const σ, ρ, β = 10.0, 28.0, 0.4 v((x,y,z)) = (σ(y-x), ρx-y-xz, xy-β*z) f(x) = rk4_flow_map(v, x)

center, radius = (0,0,25), (30,30,30) P = BoxPartition(Box(center, radius), (128,128,128)) F = BoxMap(f, P, no_of_points=200)

x = (sqrt(β(ρ-1)), sqrt(β(ρ-1)), ρ-1) # equilibrium W = unstable_set!(F, P[x])

T = TransferOperator(F, W) (λ, ev) = eigs(T)

μ = ev[1] T * μ ≈ μ



I also realized that the CSC version has the advantage of being factorizable, that is, decompositions like QR are built-in to SparseArrays.jl. Of course, there are some caveats that we should probably discuss though. 
April-Hannah-Lena commented 1 year ago

Ok you can now run the above code, plus the extra lines:

μ = ev[1]
ν = deepcopy(μ)
ν[160228] = 1.0 # add value to some random box outside the set
η = T * ν

The invariant part remains invariant (as expected), but the new box causes the support to grow (also as expected).

gaioguy commented 1 year ago

Ok, the transfer operator works again, but there still seems to be a conflict that must be resolved before we can merge this.

April-Hannah-Lena commented 1 year ago

I'm working on resolving conflicts right now, this PR will be scratched in favor of one which more aligns with the master branch