Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Tempus Tutorials

Tempus tutorials demonstrating its capabilities.

Progression Tutorial

The progression tutorials use the van der Pol problem to introduce Tempus capabilities in a stepwise manner. Starting from a simple application with a hand-written Forward Euler loop, the examples progressively introduce core Tempus and Trilinos abstractions. Each example is runnable on its own, and each step adds one major concept while preserving as much of the previous example structure as possible.

Across the progression examples, the same basic problem is retained so the reader can focus on what changes in the software structure rather than on a changing mathematical model. The examples also print the evolving solution in a simple table with columns for the step index, time, $x_0$, and $x_1$, and they conclude with a regression comparison against shared gold values for the final solution.

The tutorial sequence introduces the following concepts:

Example 0: Problem description
Basic Problem - baseline application code for the van der Pol problem using raw C++ arrays and a hand-written Forward Euler loop.
Example 1: Solution data representation
Utilize Thyra - replace raw arrays with Thyra vectors and vector-space abstractions.
Example 2: Model evaluation
Use ModelEvaluator - use Thyra::ModelEvaluator to describe the problem model.
Example 3: Solution data management
Introduce SolutionState - introduce Tempus::SolutionState to store the solution and selected integration metadata.
Example 4: Solution history
Add SolutionHistory - introduce Tempus::SolutionHistory to manage current and working solution states during time integration.
Example 5: Time stepping algorithms
Introduce Stepper - introduce Tempus::Stepper through Tempus::StepperForwardEuler to perform Forward Euler timesteps.
Example 6: Time step control
Introduce TimeStepControl - introduce Tempus::TimeStepControl to control timestep sizes independently of the stepper.
Example 7: Time integrator orchestration
Utilize IntegratorBasic - use Tempus::IntegratorBasic to manage the overall time integration process.

This progression is intended to show how applications can adopt Tempus incrementally rather than all at once.

How to read these examples

A recommended reading order is:

  • read the current example source
  • read the transition page describing what changed from the previous step
  • compare the files directly when line-by-line detail is needed

The early examples show the control flow explicitly in application code. Later examples move more of that responsibility into Tempus objects such as Tempus::SolutionState, Tempus::SolutionHistory, Tempus::Stepper, and Tempus::TimeStepControl. This progression is intentional: the tutorials are designed to make it clear which pieces of logic remain in the application and which pieces are delegated to Tempus as the abstraction level increases.

Begin with Example 0: Basic Problem →