Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove restriction of DiffEqBase.jl (used as hotfix) #2264

Merged
merged 42 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bb359cd
remove restriction of DiffEqBase.jl (used as hotfix)
ranocha Feb 7, 2025
7ca0e1f
ODE_DEFAULT_NORM moved
ranocha Feb 7, 2025
74a9443
use ADTypes
ranocha Feb 7, 2025
b6b507d
fix another depwarn
ranocha Feb 7, 2025
a719514
bump DiffEqCallbacks
ranocha Feb 7, 2025
9b4763f
format
ranocha Feb 7, 2025
286e786
allow older version of ADTypes
ranocha Feb 7, 2025
ac03d56
Update test/Project.toml
ranocha Feb 7, 2025
f445dba
Merge branch 'main' into hr/update_DiffEq
JoshuaLampert Feb 7, 2025
a750d7d
restrict to ADTypes v1
ranocha Feb 7, 2025
bbb8cd4
bump ADTypes for NonlinearSolve.jl
ranocha Feb 7, 2025
c4446ac
fix compat bounds for Downgrade action
JoshuaLampert Feb 7, 2025
c4f5279
fix Aqua.jl issue
JoshuaLampert Feb 7, 2025
b454473
add DiffEqBase extension to fix callback issues with custom integrators
ranocha Feb 7, 2025
a76946a
ignore several run folders
ranocha Feb 7, 2025
d79b2d3
sort alphabetically
ranocha Feb 7, 2025
a9a2964
format
ranocha Feb 7, 2025
17f5abe
import fix
ranocha Feb 7, 2025
d74506f
allow v3 of DiffEqCallbacks
ranocha Feb 7, 2025
8805345
require Static.jl v1 for DiffEqBase.jl v6.154 (required for new DiffE…
ranocha Feb 7, 2025
dae8491
require StaticArrayInterface 1.5.1 for Static.jl v1
ranocha Feb 7, 2025
2c11e00
fix Aqua tests
JoshuaLampert Feb 7, 2025
12cd9f6
Merge branch 'hr/update_DiffEq' of https://github.com/trixi-framework…
JoshuaLampert Feb 7, 2025
599e1d4
fix test values
JoshuaLampert Feb 7, 2025
3760a8e
fix restart_file
JoshuaLampert Feb 7, 2025
19e1911
require Octavian.jl v0.3.28 for Static.jl
ranocha Feb 7, 2025
f407ec1
require LoopVectorization.jl v0.12.171 for Static.jl
JoshuaLampert Feb 7, 2025
da96488
require StrideArrays.jl v0.1.29 for Static.jl
JoshuaLampert Feb 7, 2025
d2f1587
require Polyester.jl v0.7.15 for Static.jl
JoshuaLampert Feb 7, 2025
1f08a5c
fix typo
ranocha Feb 7, 2025
7dba3cd
require OrdinaryDiffEq.jl v6.88 for FastBroadcast.jl version required…
ranocha Feb 7, 2025
a9b2c8c
Merge branch 'main' into hr/update_DiffEq
JoshuaLampert Feb 7, 2025
4c75667
require Polyester.jl v0.7.16 for OrdinaryDiffEqPRK.jl
JoshuaLampert Feb 7, 2025
b844ee5
require MuladdMacro v0.2.4 for OrdinaryDiffEqPRK.jl
JoshuaLampert Feb 7, 2025
832dd8d
require Static.jl v1.1.1 for OrdinaryDiffEqHighOrderRK.jl
JoshuaLampert Feb 7, 2025
2fa1327
require ADTypes.jl v1.7.1 for OrdinaryDiffEqNonlinearSolve.jl
JoshuaLampert Feb 7, 2025
eb3d778
fix documentation about PERK methods
JoshuaLampert Feb 7, 2025
b48479d
fix some more test values and tolerances
JoshuaLampert Feb 7, 2025
d0b6f1f
remove extras that are not required anymore since Julia v1.9
ranocha Feb 7, 2025
dd81e82
make DiffEqBase a regular dep instead of a weakdep
ranocha Feb 7, 2025
624c932
format
ranocha Feb 7, 2025
4a682ff
add NLsolve to docs/Project.toml
JoshuaLampert Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: LinearAlgebra,Printf,SparseArrays,UUIDs,DiffEqBase,DelimitedFiles,Test,Downloads,Random
skip: LinearAlgebra,Printf,SparseArrays,UUIDs,DelimitedFiles,Test,Downloads,Random
projects: ., test
- uses: julia-actions/julia-buildpkg@v1
env:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ coverage_report/

.DS_Store

run
run/*
run*/
run*/*

LocalPreferences.toml
34 changes: 14 additions & 20 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,54 +69,48 @@ ConstructionBase = "1.5"
Convex = "0.16"
DataStructures = "0.18.15"
DelimitedFiles = "1"
DiffEqBase = "6 - 6.143"
DiffEqCallbacks = "2.35"
DiffEqBase = "6.154"
DiffEqCallbacks = "2.35, 3, 4"
Downloads = "1.6"
ECOS = "1.1.2"
EllipsisNotation = "1.0"
FillArrays = "1.9"
ForwardDiff = "0.10.24"
ForwardDiff = "0.10.36"
HDF5 = "0.16.10, 0.17"
LinearAlgebra = "1"
LinearMaps = "2.7, 3.0"
LoopVectorization = "0.12.151"
LoopVectorization = "0.12.171"
MPI = "0.20.6"
Makie = "0.21, 0.22"
MuladdMacro = "0.2.2"
MuladdMacro = "0.2.4"
NLsolve = "4.5.1"
Octavian = "0.3.21"
Octavian = "0.3.28"
OffsetArrays = "1.13"
P4est = "0.4.12"
Polyester = "0.7.10"
Polyester = "0.7.16"
PrecompileTools = "1.2"
Preferences = "1.3"
Preferences = "1.4"
Printf = "1"
RecipesBase = "1.3.4"
RecursiveArrayTools = "3.29"
Reexport = "1.0"
Reexport = "1.2"
Requires = "1.1"
SciMLBase = "2.67.0"
SimpleUnPack = "1.1"
SparseArrays = "1"
StableRNGs = "1.0.2"
StartUpDG = "1.1.5"
Static = "0.8.7, 1"
StaticArrayInterface = "1.4"
StaticArrays = "1.7"
StrideArrays = "0.1.26"
Static = "1.1.1"
StaticArrayInterface = "1.5.1"
StaticArrays = "1.9"
StrideArrays = "0.1.29"
StructArrays = "0.6.18"
SummationByPartsOperators = "0.5.52"
T8code = "0.7.4"
TimerOutputs = "0.5.7"
TimerOutputs = "0.5.23"
Triangulate = "2.2"
TriplotBase = "0.1"
TriplotRecipes = "0.1"
TrixiBase = "0.1.3"
UUIDs = "1.6"
julia = "1.10"

[extras]
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ HOHQMesh = "e4f4c7b8-17cb-445a-93c5-f69190ed6c8c"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand All @@ -26,6 +27,7 @@ HOHQMesh = "0.1, 0.2"
LaTeXStrings = "1.2"
Literate = "2.9"
Measurements = "2.5"
NLsolve = "4.5.1"
OrdinaryDiffEq = "6.49.1"
Plots = "1.9"
Test = "1"
Expand Down
42 changes: 21 additions & 21 deletions docs/src/time_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Some common options for `solve` from [OrdinaryDiffEq.jl](https://github.com/SciM
are the following. Further documentation can be found in the
[SciML docs](https://diffeq.sciml.ai/v6.8/basics/common_solver_opts/).
- If you use a fixed time step method like `CarpenterKennedy2N54`, you need to pass
a time step as `dt=...`. If you use a [`StepsizeCallback`](@ref), the value passed
a time step as `dt=...`. If you use a [`StepsizeCallback`](@ref), the value passed
as `dt=...` is irrelevant since it will be overwritten by the [`StepsizeCallback`](@ref).
If you want to use an adaptive time step method such as `SSPRK43` or `RDPK3SpFSAL49`
and still want to use CFL-based step size control via the [`StepsizeCallback`](@ref),
Expand All @@ -25,12 +25,12 @@ are the following. Further documentation can be found in the
- SSP methods and many low-storage methods from OrdinaryDiffEq.jl support
`stage_limiter!`s and `step_limiter!`s, e.g., [`PositivityPreservingLimiterZhangShu`](@ref) and [`EntropyBoundedLimiter`](@ref)
from Trixi.jl.
- If you start Julia with multiple threads and want to use them also in the time
- If you start Julia with multiple threads and want to use them also in the time
integration method from OrdinaryDiffEq.jl, you need to pass the keyword argument
`thread=OrdinaryDiffEq.True()` to the algorithm, e.g.,
`RDPK3SpFSAL49(thread=OrdinaryDiffEq.True())` or
`thread=OrdinaryDiffEq.True()` to the algorithm, e.g.,
`RDPK3SpFSAL49(thread=OrdinaryDiffEq.True())` or
`CarpenterKennedy2N54(thread=OrdinaryDiffEq.True(), williamson_condition=false)`.
For more information on using thread-based parallelism in Trixi.jl, please refer to
For more information on using thread-based parallelism in Trixi.jl, please refer to
[Shared-memory parallelization with threads](@ref).
- If you use error-based step size control (see also the section on
[error-based adaptive step sizes](@ref adaptive_step_sizes)) together with MPI, you need to
Expand All @@ -50,7 +50,7 @@ are the following. Further documentation can be found in the
### Stabilized Explicit Runge-Kutta Methods

Optimized explicit schemes aim to maximize the timestep $\Delta t$ for a given simulation setup.
Formally, this boils down to an optimization problem of the form
Formally, this boils down to an optimization problem of the form
```math
\underset{P_{p;S} \, \in \, \mathcal{P}_{p;S}}{\max} \Delta t \text{ such that } \big \vert P_{p;S}(\Delta t \lambda_m) \big \vert \leq 1, \quad m = 1 , \dots , M \tag{1}
```
Expand Down Expand Up @@ -79,12 +79,12 @@ Nevertheless, due to their optimized stability properties and low-storage nature

#### Tutorial: Using `PairedExplicitRK2`

In this tutorial, we will demonstrate how you can use the second-order PERK time integrator. You need the packages `Convex.jl` and `ECOS.jl`, so be sure they are added to your environment.
In this tutorial, we will demonstrate how you can use the second-order PERK time integrator. You need the packages `Convex.jl`, `ECOS.jl`, and `NLsolve.jl`, so be sure they are added to your environment.

First, you need to load the necessary packages:

```@example PERK-example-1
using Convex, ECOS
using Convex, ECOS, NLsolve
using OrdinaryDiffEq
using Trixi
```
Expand All @@ -96,7 +96,7 @@ Then, define the ODE problem and the semidiscretization setup. For this example,
cells_per_dimension = 100
coordinates_min = 0.0
coordinates_max = 1.0
mesh = StructuredMesh(cells_per_dimension,
mesh = StructuredMesh(cells_per_dimension,
coordinates_min, coordinates_max)

# Define the equation and initial condition
Expand All @@ -109,8 +109,8 @@ initial_condition = initial_condition_convergence_test
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs)

# Define the semidiscretization
semi = SemidiscretizationHyperbolic(mesh,
equations, initial_condition,
semi = SemidiscretizationHyperbolic(mesh,
equations, initial_condition,
solver)
```

Expand All @@ -125,14 +125,14 @@ analysis_callback = AnalysisCallback(semi, interval = 200)
stepsize_callback = StepsizeCallback(cfl = 2.5)

# Create a CallbackSet to collect all callbacks
callbacks = CallbackSet(summary_callback,
alive_callback,
analysis_callback,
callbacks = CallbackSet(summary_callback,
alive_callback,
analysis_callback,
stepsize_callback)
```

Now, we define the ODE problem by specifying the time span over which the ODE will be solved.
The `tspan` parameter is a tuple `(t_start, t_end)` that defines the start and end times for the simulation.
Now, we define the ODE problem by specifying the time span over which the ODE will be solved.
The `tspan` parameter is a tuple `(t_start, t_end)` that defines the start and end times for the simulation.
The `semidiscretize` function is used to create the ODE problem from the simulation setup.

```@example PERK-example-1
Expand All @@ -145,10 +145,10 @@ ode = semidiscretize(semi, tspan)

Next, we will construct the time integrator. In order to do this, you need the following components:

- Number of stages: The number of stages $S$ in the Runge-Kutta method.
- Number of stages: The number of stages $S$ in the Runge-Kutta method.
In this example, we use `6` stages.
- Time span (`tspan`): A tuple `(t_start, t_end)` that defines the time span over which the ODE will be solved.
This defines the bounds for the bisection routine for the optimal timestep $\Delta t$ used in calculating the polynomial coefficients at optimization stage.
- Time span (`tspan`): A tuple `(t_start, t_end)` that defines the time span over which the ODE will be solved.
This defines the bounds for the bisection routine for the optimal timestep $\Delta t$ used in calculating the polynomial coefficients at optimization stage.
This variable is already defined in step 5.
- Semidiscretization (`semi`): The semidiscretization setup that includes the mesh, equations, initial condition, and solver. In this example, this variable is already defined in step 3.
In the background, we compute from `semi` the Jacobian $J$ evaluated at the initial condition using [`jacobian_ad_forward`](https://trixi-framework.github.io/Trixi.jl/stable/reference-trixi/#Trixi.jacobian_ad_forward-Tuple{Trixi.AbstractSemidiscretization}).
Expand Down Expand Up @@ -182,9 +182,9 @@ There are two additional constructors for the `PairedExplicitRK2` method besides

In the previous tutorial the CFL number was set manually to $2.5$.
To avoid the manual trial-and-error process behind this, instantiations of `AbstractPairedExplicitRK` methods can automatically compute the stable CFL number for a given simulation setup using the [`Trixi.calculate_cfl`](@ref) function.
When constructing the time integrator from a semidiscretization `semi`,
When constructing the time integrator from a semidiscretization `semi`,
```@example PERK-example-1
# Construct third-order paired-explicit Runge-Kutta method with 8 stages for given simulation setup.
# Construct third-order paired-explicit Runge-Kutta method with 8 stages for given simulation setup.
ode_algorithm = Trixi.PairedExplicitRK3(8, tspan, semi)
```
the maximum timestep `dt` is stored by the `ode_algorithm`.
Expand Down
5 changes: 3 additions & 2 deletions examples/tree_1d_dgsem/elixir_advection_diffusion.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using OrdinaryDiffEq
using OrdinaryDiffEq, ADTypes
using Trixi

###############################################################################
Expand Down Expand Up @@ -87,7 +87,8 @@ callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, sav
# OrdinaryDiffEq's `solve` method evolves the solution in time and executes the passed callbacks
time_int_tol = 1.0e-10
time_abs_tol = 1.0e-10
sol = solve(ode, KenCarp4(autodiff = false), abstol = time_abs_tol, reltol = time_int_tol,
sol = solve(ode, KenCarp4(autodiff = AutoFiniteDiff()),
abstol = time_abs_tol, reltol = time_int_tol,
save_everystep = false, callback = callbacks)

# Print the timer summary
Expand Down
7 changes: 4 additions & 3 deletions examples/tree_1d_dgsem/elixir_advection_diffusion_restart.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using OrdinaryDiffEq
using OrdinaryDiffEq, ADTypes
using Trixi

###############################################################################
Expand All @@ -10,7 +10,7 @@ trixi_include(@__MODULE__, joinpath(@__DIR__, elixir_file))
###############################################################################
# initialize the ODE

restart_file = "restart_000000018.h5"
restart_file = "restart_000000012.h5"
restart_filename = joinpath("out", restart_file)
tspan = (load_time(restart_filename), 2.0)

Expand All @@ -22,7 +22,8 @@ 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,
sol = solve(ode, KenCarp4(autodiff = AutoFiniteDiff()),
abstol = time_abs_tol, reltol = time_int_tol,
save_everystep = false, callback = callbacks)

# Print the timer summary
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_3d_dgsem/elixir_lbm_taylor_green_vortex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ callbacks = CallbackSet(summary_callback,
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false),
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
save_everystep = false, callback = callbacks,
save_start = false, alias_u0 = true);
save_start = false, alias = ODEAliasSpecifier(alias_u0 = true));
summary_callback() # print the timer summary
1 change: 1 addition & 0 deletions src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ using DelimitedFiles: readdlm
using Downloads: Downloads
using CodeTracking: CodeTracking
using ConstructionBase: ConstructionBase
using DiffEqBase: DiffEqBase, get_tstops, get_tstops_array
using DiffEqCallbacks: PeriodicCallback, PeriodicCallbackAffect
@reexport using EllipsisNotation # ..
using FillArrays: Ones, Zeros
Expand Down
8 changes: 4 additions & 4 deletions src/time_integration/methods_2N.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract type SimpleAlgorithm2N end
The following structures and methods provide a minimal implementation of
the low-storage explicit Runge-Kutta method of

- Carpenter, Kennedy (1994)
- Carpenter, Kennedy (1994)
Fourth-order 2N-storage Runge-Kutta schemes (Solution 3)
URL: https://ntrs.nasa.gov/citations/19940028444
File: https://ntrs.nasa.gov/api/citations/19940028444/downloads/19940028444.pdf
Expand Down Expand Up @@ -53,7 +53,7 @@ end
The following structures and methods provide a minimal implementation of
the low-storage explicit Runge-Kutta method of

- Carpenter, Kennedy (1994)
- Carpenter, Kennedy (1994)
Third-order 2N-storage Runge-Kutta schemes with error control
URL: https://ntrs.nasa.gov/citations/19940028444
File: https://ntrs.nasa.gov/api/citations/19940028444/downloads/19940028444.pdf
Expand Down Expand Up @@ -91,7 +91,7 @@ end
# https://diffeq.sciml.ai/v6.8/basics/integrator/#Handing-Integrators-1
# which are used in Trixi.jl.
mutable struct SimpleIntegrator2N{RealT <: Real, uType, Params, Sol, F, Alg,
SimpleIntegrator2NOptions}
SimpleIntegrator2NOptions} <: AbstractTimeIntegrator
u::uType #
du::uType
u_tmp::uType
Expand Down Expand Up @@ -232,7 +232,7 @@ function set_proposed_dt!(integrator::SimpleIntegrator2N, dt)
integrator.dt = dt
end

# Required e.g. for `glm_speed_callback`
# Required e.g. for `glm_speed_callback`
function get_proposed_dt(integrator::SimpleIntegrator2N)
return integrator.dt
end
Expand Down
5 changes: 3 additions & 2 deletions src/time_integration/methods_3Sstar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ function SimpleIntegrator3SstarOptions(callback, tspan; maxiters = typemax(Int),
end

mutable struct SimpleIntegrator3Sstar{RealT <: Real, uType, Params, Sol, F, Alg,
SimpleIntegrator3SstarOptions}
SimpleIntegrator3SstarOptions} <:
AbstractTimeIntegrator
u::uType #
du::uType
u_tmp1::uType
Expand Down Expand Up @@ -298,7 +299,7 @@ function set_proposed_dt!(integrator::SimpleIntegrator3Sstar, dt)
integrator.dt = dt
end

# Required e.g. for `glm_speed_callback`
# Required e.g. for `glm_speed_callback`
function get_proposed_dt(integrator::SimpleIntegrator3Sstar)
return integrator.dt
end
Expand Down
2 changes: 1 addition & 1 deletion src/time_integration/methods_SSP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ end
# https://diffeq.sciml.ai/v6.8/basics/integrator/#Handing-Integrators-1
# which are used in Trixi.
mutable struct SimpleIntegratorSSP{RealT <: Real, uType, Params, Sol, F, Alg,
SimpleIntegratorSSPOptions}
SimpleIntegratorSSPOptions} <: AbstractTimeIntegrator
u::uType
du::uType
r0::uType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Define all of the functions necessary for polynomial optimizations
include("polynomial_optimizer.jl")

# Abstract base type for both single/standalone and multi-level
# Abstract base type for both single/standalone and multi-level
# PERK (Paired-Explicit Runge-Kutta) time integration schemes
abstract type AbstractPairedExplicitRK end
# Abstract base type for single/standalone PERK time integration schemes
Expand Down Expand Up @@ -36,7 +36,7 @@ function PairedExplicitRKOptions(callback, tspan; maxiters = typemax(Int), kwarg
tstops_internal)
end

abstract type AbstractPairedExplicitRKIntegrator end
abstract type AbstractPairedExplicitRKIntegrator <: AbstractTimeIntegrator end
abstract type AbstractPairedExplicitRKSingleIntegrator <:
AbstractPairedExplicitRKIntegrator end

Expand Down Expand Up @@ -176,7 +176,7 @@ end

"""
modify_dt_for_tstops!(integrator::PairedExplicitRK)

Modify the time-step size to match the time stops specified in integrator.opts.tstops.
To avoid adding OrdinaryDiffEq to Trixi's dependencies, this routine is a copy of
https://github.com/SciML/OrdinaryDiffEq.jl/blob/d76335281c540ee5a6d1bd8bb634713e004f62ee/src/integrators/integrator_utils.jl#L38-L54
Expand Down
14 changes: 14 additions & 0 deletions src/time_integration/time_integration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ struct TimeIntegratorSolution{tType, uType, P}
prob::P
end

# Abstract supertype of Trixi.jl's own time integrators for dispatch
abstract type AbstractTimeIntegrator end

# Interface required by DiffEqCallbacks.jl
function DiffEqBase.get_tstops(integrator::AbstractTimeIntegrator)
return integrator.opts.tstops
end
function DiffEqBase.get_tstops_array(integrator::AbstractTimeIntegrator)
return get_tstops(integrator).valtree
end
function DiffEqBase.get_tstops_max(integrator::AbstractTimeIntegrator)
return maximum(get_tstops_array(integrator))
end

include("methods_2N.jl")
include("methods_3Sstar.jl")
include("methods_SSP.jl")
Expand Down
Loading
Loading