SciML / SciML/ComplementaritySolve.jl
`init/solve` structure, solver caches, tests, naming
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 3
- Forks
- 2
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 7
Description
Sorry for all the spam (let me know if I should write fewer issues) 😝
Here are some ideas for next steps. (Obviously, you have more experience, I'm happy to get advice). We could
- introduce the classical
init/solvestructure - add more tests, especially for AD
- caches for algorithms
For me, especially tests would be helpful as I don't have a good idea of what kind of inputs/interfaces we can assume.
For example, in the linear case, do we only assume a linear AbstractSciMLOperator? Do solvers need to be compatible with Duals? (or will the differentiation always be handled externally, like currently in adjoint.jl which seems mostly algorithm independent).
A few minor things:
- Naming conventions: For linear problems, it seems that the initial guess is called
u0, which is confusing since in the solution type it is calledz. Would it be an option to rename it toz0? On the other hand, for the mixed and nonlinear caseuis maybe a better variable name. So, one could either always call the unknownu(linear/mixed/nonlinear) or havez(for linear) andu(for mixed/nonlinear). - Tolerance and error estimates: I added
error_estimatefor thePSORtype solvers. In general, it would be nice to have a common way to set the tolerance of an algorithm. Should it bereltol/abstolor just onetolparameter? - The field
residualfeels to be a bit ambiguous. Different algorithms might have different choices for the residuals (depending on the nonlinear functions). Should it returnNaNif an algorithm has no residual for an algorithm (like forPSOR) or should it be an error estimator in that case?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current solver entry points and adjoint.jl, then compare how PSOR and other algorithms handle initialization, tolerances, residuals, and error estimates. The issue does not name specific implementation or test files; define the intended interfaces and scope before changing code, with init/solve structure, cache behavior, naming, and coverage agreed as done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100