Skip to content

Commit

Permalink
Rosenbrock
Browse files Browse the repository at this point in the history
  • Loading branch information
OsKnoth committed Oct 26, 2023
1 parent 5e05f7a commit 10480bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions src/IntegrationMethods/RosenbrockMethod.jl
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
mutable struct RosenbrockStruct{FT<:AbstractFloat}
nStage::Int
a::AT2
c::AT2
a::Array{FT, 2}
c::Array{FT, 2}
gamma::FT
m::AT1
m::Array{FT, 1}
end

function RosenbrockStruct{FT}(backend) where FT<:AbstractFloat
nStage = 0
a = KernelAbstractions.zeros(backend,FT,0,0)
c = KernelAbstractions.zeros(backend,FT,0,0)
a = zeros(FT,0,0)
c = zeros(FT,0,0)
gamma = FT(0)
m = KernelAbstractions.zeros(backend,FT,0)
return RosenbrockStruct{FT,
typeof(m),
typeof(a)}(
m = zeros(FT,0)
return RosenbrockStruct{FT}(
nStage,
a,
c,
Expand Down
2 changes: 1 addition & 1 deletion src/IntegrationMethods/TimeStepper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function TimeStepper!(U,Fcn!,FcnPrepare!,Jac!,Trans,CG,Metric,Phys,Exchange,Glob
Table = TimeStepper.Table

if IntMethod == "Rosenbrock" || IntMethod == "RosenbrockSSP"
TimeStepper.ROS=RosenbrockStruct{FT}(backend,Table)
TimeStepper.ROS=RosenbrockStruct{FT}(Table)
elseif IntMethod == "RungeKutta"
TimeStepper.RK=RungeKuttaMethod(Table)
elseif IntMethod == "IMEX"
Expand Down

0 comments on commit 10480bd

Please sign in to comment.