There are advantages and disadvantages of both symbolic and numeric interfaces. It would be nice if SymBoltz could support both.
Maybe something like
struct CosmologyProblem{IsSymbolic}
bg::ODEProblem
pt::ODEProblem
...
end
struct CosmologySolution{IsSymbolic}
...
end
or
struct SymbolicCosmologyProblem
...
end
struct NumericCosmologySolution
...
end
CosmologyProblem(M::System, ...) = SymbolicCosmologyProblem(...)
CosmologyProblem(fbg::Function, fpt::Function, pars, ...) = NumericCosmologyProblem(...)
Every function (solve, source_grid, spectrum_*, ...) can dispatch on IsSymbolic:
function solve(prob::CosmologyProblem{true}, ...)
...
end
function solve(prob::CosmologyProblem{false}, ...)
...
end
In other words, the symbolic and numeric CosmologyProblems would both fulfill a common interface.
There are advantages and disadvantages of both symbolic and numeric interfaces. It would be nice if SymBoltz could support both.
Maybe something like
or
Every function (
solve,source_grid,spectrum_*, ...) can dispatch onIsSymbolic:In other words, the symbolic and numeric
CosmologyProblems would both fulfill a common interface.