Time schemes¶
Time integration is expressed as a compiled pops.time.Program.
pops.time contains the language. pops.lib.time contains ready schemes.
from pops.time import Program
from pops.lib.time import ssprk3
time = Program("advance")
ssprk3(time, "plasma")
case = case.time(time)
Manual schemes use temporal handles:
from pops.numerics.terms import Flux
T = Program("forward_euler")
U = T.state("U", block="plasma")
fields = T.solve_fields(U.n)
R = T.rhs(state=U.n, fields=fields, terms=[Flux()])
T.define(U.next, U.n + T.dt * R)
T.commit("plasma", U.next)
Provided scheme families¶
Function |
Package |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These functions build IR nodes. They are not alternate runtime steppers.
CFL¶
The CFL value is a runtime policy passed to sim.run.
sim.run(t_final=1.0, cfl=0.4)
The time program should not reject a run only because the CFL is not a compile time default.