Worked instance: two steps of the explicit integrator
Library · Source module
Worked instance: two steps of the explicit integrator
The certified program NLAlib.Ops.Examples.Integrator.myProgram, which runs the routine of one step \mathbf{x} \leftarrow \mathbf{x} + h \mathbf{A} \mathbf{x} inside a loop, with exact operations (the allowances \delta and e of its model are zero), on \mathbf{A} = \begin{pmatri\mathbf{x}} 0 & 1 \\ -1 & 0 \end{pmatri\mathbf{x}}, \qquad h = \tfrac12, \qquad \mathbf{x}_0 = (4, 8), \qquad N = 2. It exercises a routine run by another, an allocation inside a loop, and the peak scratch.
Expected, from scripts/worked_instances.py (Integrator): the output [11, 2], 2 products with \mathbf{A} and 2 updates, and one scratch vector of 2 cells. The work of 91 (products weigh 2 n^2, updates 2 n, structural instructions one) is a regression value in its structural part, 28 N + 11 = 67.
Main results
* NLAlib.Ops.Examples.WorkedInstances.Integrator.run_exact: with exact operations the integrator leaves exactly (I + h \mathbf{A})^N \mathbf{x}_0, at every size. * NLAlib.Ops.Examples.WorkedInstances.Integrator.instance_run: the run on the instance.
Declarations
- NLAlib.Ops.Examples.WorkedInstances.Integrator.instance_run
- NLAlib.Ops.Examples.WorkedInstances.Integrator.peak_instance
- NLAlib.Ops.Examples.WorkedInstances.Integrator.program_straight
- NLAlib.Ops.Examples.WorkedInstances.Integrator.run_exact
- NLAlib.Ops.Examples.WorkedInstances.Integrator.skew
- NLAlib.Ops.Examples.WorkedInstances.Integrator.skew_two