|
Tempus Version of the Day
Time Integration
|
This example moves the van der Pol model into a Thyra::ModelEvaluator. The time integration loop still performs a hand-written Forward Euler update, but the right-hand side evaluation and nominal initial conditions are now obtained through the model interface.
The main purpose of this step is to separate the problem physics from the time integration algorithm.
Relative to Example 1: Utilize Thyra:
VanDerPol_ModelEvaluator_02getNominalValues()evalModel()Thyra::ModelEvaluator provides a common Trilinos interface between application models and abstract numerical algorithms. For Tempus, this interface is the standard mechanism for exposing governing equations to steppers and integrators.
This example focuses only on the subset of Thyra::ModelEvaluator behavior needed for explicit first-order ODEs.
A more detailed explanation of the changes from Example 1: Utilize Thyra is given in Transition from Example 1 to Example 2.
The next example introduces Tempus::SolutionState to store the evolving solution together with selected time-integration metadata.