feat(sciml): build the planned SciMLOperators jac_prototype adapter (DESIGN §7)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- julia
- Área
- backend-api-design
Línea de trabajo
Read README.md:158 and DESIGN.md §7, then inspect prepare and LinearizedOp and the planned ext/…SciMLExt.jl location. Implement only the jac_prototype adapter so ODEFunction(f; jac_prototype = sciml(prepare(L))) works and KrylovJL_GMRES reaches the existing zero-allocation flat mul! path; full SciMLOperators semantics are out of scope.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Status
Already scoped, not built. README.md:164-166 and DESIGN.md §7 describe a thin FunctionOperator-style adapter as the jac_prototype hook for implicit OrdinaryDiffEq, in a future ext/…SciMLExt.jl. This issue is to give it a real downstream forcing function rather than to propose it fresh.
The trait prerequisite has landed: #89 made PreparedOperator/PreparedForest declare islinear/isconstant/isselfadjoint/isdiagonal explicitly (src/linalg.jl:75-82) and gave PreparedComposed/PreparedAdjoint their trait methods (src/linalg.jl:308-309, :337-338), so the wrapper can forward traits from the prepared operator without falling through to a default it did not earn.
Why now
The microvascular transport model marches its coupled system with KenCarp47 + KrylovJL_GMRES. To hand OrdinaryDiffEq a matrix-free Jacobian it needs a SciMLOperators-shaped object, and MFO's LinearizedOp / EnzymeLinearizedOp is exactly that object wearing the wrong interface. Without the adapter, the downstream package is pushed into one of two bad options, and has taken both:
AutoFiniteDiffeverywhere, because its preallocatedFloat64work buffers rejectForwardDiff.Duals — so it gets finite-difference Jacobians even though MFO can supply exact ones via Enzyme.- Assemble a sparse
W = I − γJand ILU(0) it, with a hand-built Jacobian sparsity pattern and a Curtis–Powell–Reid colouring, purely to get a preconditioner intoLinearSolve. That is a full sparse-matrix detour bolted onto a matrix-free stack, and it exists only because the matrix-free path couldn't reach the integrator.
Both disappear if prepare/LinearizedOp can be presented as a SciML operator.
Minimum useful shape
jac_prototype only, as §7 already scopes it — enough that ODEFunction(f; jac_prototype = sciml(prepare(L))) works and KrylovJL_GMRES calls straight into the zero-alloc flat mul!. Lazy algebra and adjoints through the SciML interface can wait; the integrator hook is what unblocks.
Two pieces of the SciML contract are on that path, though, and are in scope here (moved from #73, which keeps the SplitODEFunction + solver-search layer above this one):
-
linearize!exposed asupdate_coefficients!. An implicit integrator refreshes the Jacobian at the current state throughupdate_coefficients!(J, u, p, t). The package already has exactly those semantics inlinearize!(J, u)(src/operators/linearize.jl:110-113forLinearizedOp,ext/MatrixFreeOperatorsEnzymeExt.jl:66-69forEnzymeLinearizedOp): it overwritesJ.u0.datain place and keeps the existingpreparevalid — refresh without re-prepare. The adapter'supdate_coefficients!should forward to it rather than reinvent it. -
ldiv!onMultigridPreconditioner. It exposes onlysize/eltype/mul!(src/multigrid.jl:378-395), which is Krylov.jl's preconditioner convention; LinearSolve'sPl/Pr(and therefore theprecsargument) wantldiv!. Without it the multigrid V-cycle cannot stand in for the downstream ILU.
Pairs naturally with #62 — a Robin-aware operator_diagonal is what makes MultigridPreconditioner usable as the precs argument, and between the two the downstream ILU path can be retired rather than ported.
—
🤖 Claude gave this issue two more chores from #73.
claude-opus-5-5[1m] (high) · claude-code 2.1.285 · unreviewed
- Lenguaje dominante
- Julia
- Estrellas
- 3
- Forks
- 1
- Merge medio
- 1 d 28 min
- PR fusionados (30 d)
- 6
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RallypointOne/MatrixFreeOperators.jl
-
Roadmap: open-issue priorityAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
performance
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
-
perf(forest): thread the reference BlockForest path — leaf sweeps and exchange descriptor loopsAbiertoperformance
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de RallypointOne/MatrixFreeOperators.jl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
JuliaGPU/GPUArrays.jl#837 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bmad-sim/BeamTracking.jl#382 ·
Los mantenedores suelen responder en 1 día