-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
The semi itself is constructed with two arguments, RealT and uEltype, that determine the type of internal caches, etc. By default, they will be Float64, but there should be some clear interaction between all these types.
For example, how would you see the interaction with AD like in
Trixi.jl/src/semidiscretization/semidiscretization.jl
Lines 268 to 278 in 36dab43
| function _jacobian_ad_forward(semi, t0, u0_ode, du_ode, config) | |
| new_semi = remake(semi, uEltype = eltype(config)) | |
| # Create anonymous function passed as first argument to `ForwardDiff.jacobian` to match | |
| # `ForwardDiff.jacobian(f!, y::AbstractArray, x::AbstractArray, | |
| # cfg::JacobianConfig = JacobianConfig(f!, y, x), check=Val{true}())` | |
| J = ForwardDiff.jacobian(du_ode, u0_ode, config) do du_ode, u_ode | |
| Trixi.rhs!(du_ode, u_ode, new_semi, t0) | |
| end | |
| return J | |
| end |
Originally posted by @ranocha in #2212 (comment)
Metadata
Metadata
Assignees
Labels
No labels