Skip to content

Commit

Permalink
Add some comments on TODOs for SPARK integrator.
Browse files Browse the repository at this point in the history
  • Loading branch information
michakraus committed Jan 25, 2024
1 parent 83d73b6 commit bcaebb5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/spark/integrators_spark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function initial_guess!(
cache.x[2*(ndims(problem)*(i-1)+k-1)+2] = (cache.Pi[i][k] - solstep.p̄[k]) / timestep(problem)
end

# Quick fix for dirty implementation of F function
# Quick fix for sloppy implementation of F function
cache.Vi[i] .= 0
cache.Fi[i] .= 0
end
Expand Down Expand Up @@ -137,6 +137,7 @@ function components!(
local R = pstages(method)
local D = ndims(problem)

local tqᵢ::TT
local tpᵢ::TT
local tλᵢ::TT

Expand All @@ -156,8 +157,10 @@ function components!(
# The function f depends von v but Vi has never been initialized !
# For degenerate Lagrangians this might be just right, as the corresponding
# term in F that multiplies v should not be there in the first place
# (cf. SPARK paper)
# (cf. SPARK paper) but in general this will cause problems
# tqᵢ = solstep.t̄ + timestep(problem) * tableau(method).q.c[i]
tpᵢ = solstep.+ timestep(problem) * tableau(method).p.c[i]
# functions(problem).v̄(cache.Vi[i], tqᵢ, cache.Qi[i], cache.Pi[i], parameters(solstep))
functions(problem).ϑ(cache.Φi[i], tpᵢ, cache.Qi[i], cache.Vi[i], parameters(solstep))
functions(problem).f(cache.Fi[i], tpᵢ, cache.Qi[i], cache.Vi[i], parameters(solstep))
cache.Φi[i] .-= cache.Pi[i]
Expand Down

0 comments on commit bcaebb5

Please sign in to comment.