pymgrit.brusselator package¶
Submodules¶
pymgrit.brusselator.brusselator module¶
Vector and application class for the 1D Brusselator system
- class pymgrit.brusselator.brusselator.Brusselator(*args, **kwargs)¶
Bases:
pymgrit.core.application.Application
- Application class for Brusselator system,
x’ = A + x^2y - (B + 1)x, y’ = Bx - x^2y,
- with A = 1, B = 3, and ICs
x(0) = 0, y(0) = 1
- step(u_start: pymgrit.brusselator.brusselator.VectorBrusselator, t_start: float, t_stop: float) pymgrit.brusselator.brusselator.VectorBrusselator ¶
Time integration routine for Brusselator system: RK4
0 |
1 / 2 | 1 / 2 1 / 2 | 0 1 / 2
1 | 0 0 1
- ——+—————————-
- 1 / 6 1 / 3 1 / 3 1 / 6
- 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.brusselator.brusselator.VectorBrusselator¶
Bases:
pymgrit.core.vector.Vector
Vector class for Brusselator system
- 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
- plot_solution()¶
- set_values(value)¶
Set vector data
- unpack(value)¶
Unpacking communication data
- pymgrit.brusselator.brusselator.brusselator(t, y)¶
Right-hand side of Brusselator system :param t: time associated with the input approximate solution y :param y: approximate solution for the input time t :return: ODE right-hand side of Brusselator system