JuliaApproximation / SingularIntegralEquations.jl

Julia package for solving singular integral equations
Other
62 stars 11 forks source link

Use new BandedMatrix \ for large bandwidth solves #68

Closed dlfivefifty closed 8 years ago

dlfivefifty commented 8 years ago

I think the following timing suggests that we would perform significantly better using truncation and banded matrix :

#HelmholtzDirichlet.jl example
@time ∂u∂n = ⨍[G]\uiΓ   # 6.882111 seconds (20.04 M allocations: 4.365 GB, 10.21% gc time)
cfs=pad(coefficients(uiΓ,rangespace(⨍[G])),100)
@time ⨍[G][1:100,1:100]\cfs  # 0.786749 seconds (2.67 M allocations: 525.196 MB, 10.94% gc time)

It's based on LU, so there may be inaccuracies introduced, but in this case they match to 8.9e-12

dlfivefifty commented 8 years ago

For k=0.1 the two are tied! (Probably the cost is dominated by constructing the operator)

@time ∂u∂n = ⨍[G]\uiΓ    # 0.001622 seconds (9.53 k allocations: 871.625 KB)
@time u=⨍[G][1:10,1:10]\cfs  # 0.001138 seconds (4.63 k allocations: 306.406 KB)
MikaelSlevinsky commented 8 years ago

It could even use a Cholesky factorization for (formally) positive definite fundamental solutions.

MikaelSlevinsky commented 8 years ago

Cholesky or LDLT could work provided:

dlfivefifty commented 8 years ago

I think the new qrfact mitigates the benefits of doing this automatically.