-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restart HyperbolicParabolic with SplitODEProblem
- Loading branch information
1 parent
7f6a860
commit ce7034e
Showing
5 changed files
with
101 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
examples/tree_1d_dgsem/elixir_advection_diffusion_restart.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
using OrdinaryDiffEq | ||
using Trixi | ||
|
||
############################################################################### | ||
# create a restart file | ||
|
||
elixir_file = "elixir_advection_diffusion.jl" | ||
trixi_include(@__MODULE__, joinpath(@__DIR__, elixir_file)) | ||
|
||
############################################################################### | ||
# initialize the ODE | ||
|
||
restart_file = "restart_000000018.h5" | ||
restart_filename = joinpath("out", restart_file) | ||
tspan = (load_time(restart_filename), 2.0) | ||
|
||
ode = semidiscretize(semi, tspan, restart_filename); | ||
|
||
# Do not save restart files here | ||
callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback) | ||
|
||
############################################################################### | ||
# run the simulation | ||
|
||
sol = solve(ode, KenCarp4(autodiff = false), abstol = time_abs_tol, reltol = time_int_tol, | ||
save_everystep = false, callback = callbacks) | ||
|
||
# Print the timer summary | ||
summary_callback() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters