fipy.steppers package¶
- fipy.steppers.L1error(var, matrix, RHSvector)¶
where
is the
norm of
.
- Parameters:
var (CellVariable) – The CellVariable in question.
matrix – (ignored)
RHSvector – (ignored)
- fipy.steppers.L2error(var, matrix, RHSvector)¶
where
is the
norm of
.
- Parameters:
var (CellVariable) – The CellVariable in question.
matrix – (ignored)
RHSvector – (ignored)
- fipy.steppers.LINFerror(var, matrix, RHSvector)¶
where
is the
norm of
.
- Parameters:
var (CellVariable) – The CellVariable in question.
matrix – (ignored)
RHSvector – (ignored)
- fipy.steppers.sweepMonotonic(fn, *args, **kwargs)¶
Repeatedly calls
fn(*args, **kwargs)()
until the residual returned byfn()
is no longer decreasing.- Parameters:
fn (function) – The function to call
*args –
**kwargs –
- Return type:
Submodules¶
fipy.steppers.pidStepper module¶
- class fipy.steppers.pidStepper.PIDStepper(vardata=(), proportional=0.075, integral=0.175, derivative=0.01)¶
Bases:
Stepper
Adaptive stepper using a PID controller, based on:
@article{PIDpaper, author = {A. M. P. Valli and G. F. Carey and A. L. G. A. Coutinho}, title = {Control strategies for timestep selection in finite element simulation of incompressible flows and coupled reaction-convection-diffusion processes}, journal = {Int. J. Numer. Meth. Fluids}, volume = 47, year = 2005, pages = {201-231}, }
- static failFn(vardata, dt, *args, **kwargs)¶
- step(dt, dtTry=None, dtMin=None, dtPrev=None, sweepFn=None, successFn=None, failFn=None, *args, **kwargs)¶
- static successFn(vardata, dt, dtPrev, elapsed, *args, **kwargs)¶
- static sweepFn(vardata, dt, *args, **kwargs)¶
fipy.steppers.pseudoRKQSStepper module¶
- class fipy.steppers.pseudoRKQSStepper.PseudoRKQSStepper(vardata=(), safety=0.9, pgrow=-0.2, pshrink=-0.25, errcon=0.000189)¶
Bases:
Stepper
Adaptive stepper based on the
rkqs
(Runge-Kutta “quality-controlled” stepper) algorithm of Numerical Recipes in C: 2nd Edition, Section 16.2.Not really appropriate, since we’re not doing Runge-Kutta steps in the first place, but works OK.
- static failFn(vardata, dt, *args, **kwargs)¶
- step(dt, dtTry=None, dtMin=None, dtPrev=None, sweepFn=None, successFn=None, failFn=None, *args, **kwargs)¶
- static successFn(vardata, dt, dtPrev, elapsed, *args, **kwargs)¶
- static sweepFn(vardata, dt, *args, **kwargs)¶
fipy.steppers.stepper module¶
- class fipy.steppers.stepper.Stepper(vardata=())¶
Bases:
object
- static failFn(vardata, dt, *args, **kwargs)¶
- step(dt, dtTry=None, dtMin=None, dtPrev=None, sweepFn=None, successFn=None, failFn=None, *args, **kwargs)¶
- static successFn(vardata, dt, dtPrev, elapsed, *args, **kwargs)¶
- static sweepFn(vardata, dt, *args, **kwargs)¶