dedalus.core.arithmetic

Arithmetic operators.

Module Contents

class Add(*args, out=None, **kw)

Addition operator.

property base
name = 'Add'
reinitialize(**kw)
new_operands(arg0, arg1, **kw)
split(*vars)

Split into expressions containing and not containing specified operands/operators.

sym_diff(var)

Symbolically differentiate with respect to specified operand.

expand(*vars)

Expand expression over specified variables.

require_linearity(*args, **kw)

Require expression to be linear in specified variables.

require_first_order(*args, **kw)

Require expression to be maximally first order in specified operators.

matrix_dependence(*vars)
matrix_coupling(*vars)
build_ncc_matrices(separability, vars, **kw)

Precompute non-constant coefficients and build multiplication matrices.

expression_matrices(subproblem, vars, **kw)

Build expression matrices for a specific subproblem and variables.

class DotProduct(arg0, arg1, indices=(-1, 0), out=None, **kw)

Base class for deferred operations on data.

Parameters:
  • *args (Operands) – Operands. Number must match class attribute arity, if present.

  • out (data, optional) – Output data object. If not specified, a new object will be used.

Notes

Operators are stacked (i.e. provided as arguments to other operators) to construct trees that represent compound expressions. Nodes are evaluated by first recursively evaluating their subtrees, and then calling the operate method.

name = 'Dot'
ncc_method = 'dot_product_ncc'
new_operands(arg0, arg1, **kw)
GammaCoord(A_tensorsig, B_tensorsig, C_tensorsig)
operate(out)

Perform operation.

class CrossProduct(arg0, arg1, out=None, **kw)

Cross product on two 3D vector fields.

name = 'Cross'
operate_right_handed(out)
operate_left_handed(out)
new_operands(arg0, arg1, **kw)
GammaCoord(A_tensorsig, B_tensorsig, C_tensorsig)
class Multiply(*args, out=None)

Multiplication operator.

name = 'Mul'
new_operands(arg0, arg1, **kw)
GammaCoord(A_tensorsig, B_tensorsig, C_tensorsig)