Skip to content

Commit

Permalink
get rid of the numbered list
Browse files Browse the repository at this point in the history
  • Loading branch information
warisa-r committed Nov 30, 2024
1 parent 71b7f4c commit a9c4541
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/src/time_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ Nevertheless, due to their optimized stability properties and low-storage nature

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.

1. First, you need to load the necessary packages:
First, you need to load the necessary packages:

```@example PERK-example-1
using Convex, ECOS
using OrdinaryDiffEq
using Trixi
```

2. Define the ODE problem and the semidiscretization setup. For this example, we will use a simple advection problem.
Then, define the ODE problem and the semidiscretization setup. For this example, we will use a simple advection problem.

```@example PERK-example-1
# Define the mesh
Expand All @@ -114,7 +114,7 @@ semi = SemidiscretizationHyperbolic(mesh,
solver)
```

3. Define the necessary [callbacks](@ref callbacks-id) for the simulation. Callbacks are used to perform actions at specific points during the integration process.
After that, we will define the necessary [callbacks](@ref callbacks-id) for the simulation. Callbacks are used to perform actions at specific points during the integration process.

```@example PERK-example-1
# Define some standard callbacks
Expand All @@ -131,7 +131,7 @@ callbacks = CallbackSet(summary_callback,
stepsize_callback)
```

4. Define the ODE problem by specifying the time span over which the ODE will be solved.
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.

Expand All @@ -143,7 +143,7 @@ tspan = (0.0, 1.0)
ode = semidiscretize(semi, tspan)
```

5. In this step we will construct the time integrator. In order to do this, you need the following components:
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.
In this example, we use `6` stages.
Expand All @@ -161,7 +161,7 @@ ode = semidiscretize(semi, tspan)
ode_algorithm = Trixi.PairedExplicitRK2(6, tspan, semi)
```

6. With everything now set up, you can now use `Trixi.solve` to solve the ODE problem. The `solve` function takes the ODE problem, the time integrator, and some options such as the time step (`dt`), whether to save every step (`save_everystep`), and the callbacks.
With everything now set up, you can now use `Trixi.solve` to solve the ODE problem. The `solve` function takes the ODE problem, the time integrator, and some options such as the time step (`dt`), whether to save every step (`save_everystep`), and the callbacks.

```@example PERK-example-1
# Solve the ODE problem using PERK2
Expand All @@ -170,7 +170,7 @@ sol = Trixi.solve(ode, ode_algorithm,
save_everystep = false, callback = callbacks)
```

7. Advanced constructors:
##### Advanced constructors:
There are two additional constructors for the `PairedExplicitRK2` method besides the one taking in a semidiscretization `semi`:
- `PairedExplicitRK2(num_stages, base_path_monomial_coeffs::AbstractString)` constructs a `num_stages`-stage method from the given optimal monomial_coeffs $\boldsymbol \alpha$.
These are expected to be present in the provided directory in the form of a `gamma_<S>.txt` file, where `<S>` is the number of stages `num_stages`.
Expand Down

0 comments on commit a9c4541

Please sign in to comment.