JuliaLinearAlgebra / AlgebraicMultigrid.jl

Algebraic Multigrid in Julia
Other
117 stars 22 forks source link

Order of arguments / Keyword arguments #30

Closed cortner closed 6 years ago

cortner commented 6 years ago

Hi - thank you for developing this, I'll be very happy to finally retire PyAMG.jl.

One question: the order of arguments currently is

solve(ml, b, maxiter, cycle, tol; verbose = false, log = false)

I think most users would really prefer to call this with

solve(ml, b; maxiter=..., cycle=..., tol=..., verbose = false, log = false)

but if you prefer to keep non-kw-args, then putting tol in front seems the more natural option.

ranjanan commented 6 years ago

Hi @cortner , thank you for your encouragement. Indeed, I need to clean up the API. I think having them all as keyword arguments would be most convenient to the user. I shall clean this up in a PR.

ranjanan commented 6 years ago

I close to make cycle a default argument because I dispatch on it.

cortner commented 6 years ago

You could just use a barrier

ranjanan commented 6 years ago

There is a function barrier internally here: https://github.com/ranjanan/AMG.jl/blob/master/src/multilevel.jl#L105. But unfortunately I still see a performance cost. :-(

cortner commented 6 years ago

that’s strange. If you are in principle happy to get pull-requests, then I can play a bit with the user-interface? (no need to accept them of course)

On 8 Mar 2018, 07:58 +0000, Ranjan Anantharaman notifications@github.com, wrote:

There is a function barrier internally here: https://github.com/ranjanan/AMG.jl/blob/master/src/multilevel.jl#L105. But unfortunately I still see a performance cost. :-(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ranjanan/AMG.jl/issues/30#issuecomment-371409352, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHVRQx-I0H5YsO93WaEdVPbClP9DjrHDks5tcOSJgaJpZM4SgOy_.

ranjanan commented 6 years ago

Yes, I'm very open to PRs. I'd love to see what you have in mind.