fipy.steppers

(Obsolete) utilities for iterating time steps

Use steppyngstounes instead.

Functions

L1error(var, matrix, RHSvector)

L2error(var, matrix, RHSvector)

LINFerror(var, matrix, RHSvector)

error(var, matrix, RHSvector[, norm])

residual(var, matrix, RHSvector)

Determines the residual for the current solution matrix and variable.

sweepMonotonic(fn, *args, **kwargs)

Repeatedly calls fn(*args, **kwargs)() until the residual returned by fn() is no longer decreasing.

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.error(var, matrix, RHSvector, norm=<function L1norm>)
\[\frac{\|\mathtt{var} - \mathtt{var}^\text{old}\|_?} {\|\mathtt{var}^\text{old}\|_?}\]

where \(\|\vec{x}\|_?\) is the normalization of \(\vec{x}\) provided by norm.

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

  • matrix(ignored)

  • RHSvector(ignored)

  • norm (function) – A function that will normalize its array argument and return a single number (default: L1norm()).

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

Determines the residual for the current solution matrix and variable.

\[\|\mathsf{L}\vec{x} - \vec{b}\|_\infty\]

where \(\|\vec{\xi}\|_\infty\) is the \(L^\infty\) norm of \(\vec{\xi}\).

Parameters:
  • var (CellVariable) – The CellVariable in question, prior to solution.

  • matrix (_SparseMatrix) – The coefficient matrix at this step/sweep

  • RHSvector (ndarray) – The right hand side vector

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

Return type:

float

Modules

fipy.steppers.pidStepper

fipy.steppers.pseudoRKQSStepper

fipy.steppers.stepper

Last updated on Jun 26, 2024. Created using Sphinx 7.1.2.