fipy.steppers package

Submodules

fipy.steppers.pidStepper module

class fipy.steppers.pidStepper.PIDStepper(vardata=(), proportional=0.075, integral=0.175, derivative=0.01)

Bases: fipy.steppers.stepper.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},
}
__init__(vardata=(), proportional=0.075, integral=0.175, derivative=0.01)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'fipy.steppers.pidStepper'

fipy.steppers.pseudoRKQSStepper module

class fipy.steppers.pseudoRKQSStepper.PseudoRKQSStepper(vardata=(), safety=0.9, pgrow=- 0.2, pshrink=- 0.25, errcon=0.000189)

Bases: fipy.steppers.stepper.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.

__init__(vardata=(), safety=0.9, pgrow=- 0.2, pshrink=- 0.25, errcon=0.000189)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'fipy.steppers.pseudoRKQSStepper'

fipy.steppers.stepper module

class fipy.steppers.stepper.Stepper(vardata=())

Bases: object

__dict__ = mappingproxy({'__module__': 'fipy.steppers.stepper', '__init__': <function Stepper.__init__>, 'sweepFn': <staticmethod object>, 'successFn': <staticmethod object>, 'failFn': <staticmethod object>, '_lowerBound': <function Stepper._lowerBound>, '_step': <function Stepper._step>, 'step': <function Stepper.step>, '__dict__': <attribute '__dict__' of 'Stepper' objects>, '__weakref__': <attribute '__weakref__' of 'Stepper' objects>, '__doc__': None, '__annotations__': {}})
__init__(vardata=())

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'fipy.steppers.stepper'
__weakref__

list of weak references to the object (if defined)

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)

Module contents

fipy.steppers.L1error(var, matrix, RHSvector)

\frac{\|\mathtt{var} - \mathtt{var}^\text{old}\|_1}
{\|\mathtt{var}^\text{old}\|_1}

where \|\vec{x}\|_1 is the L^1 norm of \vec{x}.

Parameters
  • var (CellVariable) – The CellVariable in question.

  • matrix(ignored)

  • RHSvector(ignored)

fipy.steppers.L2error(var, matrix, RHSvector)

\frac{\|\mathtt{var} - \mathtt{var}^\text{old}\|_2}
{\|\mathtt{var}^\text{old}\|_2}

where \|\vec{x}\|_2 is the L^2 norm of \vec{x}.

Parameters
  • var (CellVariable) – The CellVariable in question.

  • matrix(ignored)

  • RHSvector(ignored)

fipy.steppers.LINFerror(var, matrix, RHSvector)

\frac{\|\mathtt{var} - \mathtt{var}^\text{old}\|_\infty}
{\|\mathtt{var}^\text{old}\|_\infty}

where \|\vec{x}\|_\infty is the L^\infty norm of \vec{x}.

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 by fn() is no longer decreasing.

Parameters
  • fn (function) – The function to call

  • *args

  • **kwargs

Returns

Return type

float

Last updated on Jan 14, 2021. Created using Sphinx 3.4.3.