SciML / SciML/DiffEqCallbacks.jl
GeneralDomain documentation is unclear
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 100
- Forks
- 54
- Avg merge
- 3h 29m
- Merged PRs (30d)
- 8
Description
The documentation for GeneralDomain shows the docstring
GeneralDomain(g, u=nothing; nlsolve=NLSOLVEJL_SETUP(), save=true,
abstol=nothing, scalefactor=nothing, autonomous=numargs(g)==2,
nlopts=Dict(:ftol => 10*eps()))
which should now be
GeneralDomain(g, u = nothing; nlsolve = NLSOLVEJL_SETUP(), save = true,
abstol = nothing, scalefactor = nothing,
autonomous = maximum(SciMLBase.numargs(g)) == 3,
nlopts = Dict(:ftol => 10 * eps()))
Moreover, it initially says that g should be of the form g(u, resid) or g(t, u, resid), and then later says it should be g(resid, u, p) or g(resid, u, p, t). What should it be? It's not exactly clear to me what the "residuals" are either: a vector that tests each component of the solution? A single value testing all components? I thought it would be the former, but the documentation says
- `g`: ... which is zero when the value is in the domain.
which suggests the latter. I guess judging from
it should be that g is g(resid, u, p) or g(resid, u, p, t), and (doesn't seem like resid could actually be any mutable value, not necessarily with length(resid) == length(u)resid can be defined manually directly actually, and typeof(resid) must == typeof(u)).
I'm also guessing that p is just integrator.p, or is there a way to add on extra parameters here without a closure?
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 comparing the GeneralDomain documentation with the referenced src/domain.jl lines 192-210 and the current GeneralDomain signature. Resolve the documented argument order, explain what residuals represent, and clarify how p is supplied. Done means the documentation is internally consistent and answers these questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100