BifurcationKit.jl icon indicating copy to clipboard operation
BifurcationKit.jl copied to clipboard

Custom BorderedLinearSolver interface requirements for PALC are missing

Open Azercoco opened this issue 1 year ago • 5 comments

When using a custom AbstractBorderedLinearSolver as the bls field in PALC( ...), the required interface methods as mentioned here are not sufficient. The custom bordered solver is also expected to implements something like this .

It also seems that this implementation is exactly the same for all sub types of AbstractBorderedLinearSolver. Maybe it would be better to just implements this method for the AbstractBorderedLinearSolver type directly instead of having duplicated code.

Azercoco avatar Feb 22 '24 10:02 Azercoco

Also in PALC, the solver is expected to have a field solver, which can be equal to nothing but has to be present nevertheless or the compilation will fail.

Azercoco avatar Feb 22 '24 11:02 Azercoco

Hi

Thank you for reporting this.

Maybe it would be better to just implements this method for the AbstractBorderedLinearSolver type directly instead of having duplicated code.

I agree, thank you for the suggestion.

rveltz avatar Feb 22 '24 15:02 rveltz

At some point, I need to find a better way for specifying the interfaces. As for PALC, I guess you are referring to the update method. I guess I can correct this by adding the requirement that an update method exists for AbstractBorderedLinearSolver.

Is this blocking you or you managed to find a way out?

rveltz avatar Feb 22 '24 15:02 rveltz

Yes, that was the issue, the work around I found was just to add an solver field with a nothing value. No the cleanest but it did work.

Azercoco avatar Feb 22 '24 16:02 Azercoco

You are right for the required field solver.

When using a custom AbstractBorderedLinearSolver as the bls field in PALC( ...), the required interface methods as mentioned here are not sufficient. The custom bordered solver is also expected to implements something like this .

This I am not sure. It is a fallback that will use the custom bordered linear solver, no need to add this.

rveltz avatar Jun 02 '24 20:06 rveltz

solved

rveltz avatar Oct 05 '24 08:10 rveltz