pymgrit.dahlquist package¶
Submodules¶
pymgrit.dahlquist.dahlquist module¶
Scalar ODE example: Vector and application class for Dahlquist’s test problem
- class pymgrit.dahlquist.dahlquist.Dahlquist(*args, **kwargs)¶
Bases:
pymgrit.core.application.Application
- Application class for Dahlquist’s test problem,
u’ = lambda u,
with lambda = -1 and IC u(0) = 1
- step(u_start: pymgrit.dahlquist.dahlquist.VectorDahlquist, t_start: float, t_stop: float) pymgrit.dahlquist.dahlquist.VectorDahlquist ¶
- Time integration routine for Dahlquist’s test problem:
BE: Backward Euler FE: Forward Euler TR: Trapezoidal rule MR: implicit Mid-point Rule
- Parameters
u_start – approximate solution for the input time t_start
t_start – time associated with the input approximate solution u_start
t_stop – time to evolve the input approximate solution to
- Returns
approximate solution for the input time t_stop
- class pymgrit.dahlquist.dahlquist.VectorDahlquist(value)¶
Bases:
pymgrit.core.vector.Vector
Vector class for the Dahlquist test equation
- clone()¶
Initialize vector object with same values
- clone_rand()¶
Initialize vector object with random values
- clone_zero()¶
Initialize vector object with zeros
- get_values()¶
Get vector data
- norm()¶
Norm of a vector object
- pack()¶
Specifying communication data
- set_values(value)¶
Set vector data
- unpack(value)¶
Unpacking communication data