class sumpy.expansion.ExpansionBase(kernel, order, use_rscale=None)[source]

Returns the identifiers of the coefficients that actually get stored.

coefficients_from_source(avec, bvec, rscale, sac=None)[source]

Form an expansion from a source point.

  • avec – vector from source to center.

  • bvec – vector from center to target. Not usually necessary, except for line-Taylor expansion.

  • sac – a symbolic assignment collection where temporary expressions are stored.


a list of sympy expressions representing the coefficients of the expansion.

translate_from(src_expansion, src_coeff_exprs, src_rscale, dvec, tgt_rscale, sac=None)[source]

Return self==value.


Return self!=value.

class sumpy.expansion.LinearPDEBasedExpansionTermsWrangler(order, dim, max_mi=None)[source]
__init__(order, dim, max_mi=None)[source]
  • order – order of the expansion

  • dim – number of dimensions


Returns the PDE as a sumpy.expansion.diff_op.LinearPDESystemOperator object L where L(u) = 0 is the PDE.

Expansion Factories

class sumpy.expansion.ExpansionFactoryBase[source]

An interface .. automethod:: get_local_expansion_class .. automethod:: get_multipole_expansion_class

class sumpy.expansion.DefaultExpansionFactory[source]

An implementation of ExpansionFactoryBase that gives the ‘best known’ expansion for each kernel.

class sumpy.expansion.VolumeTaylorExpansionFactory[source]

An implementation of ExpansionFactoryBase that uses Volume Taylor expansions for each kernel.

Differential Operators

Differential operator interface

class sumpy.expansion.diff_op.LinearPDESystemOperator(dim, *eqs)[source]

Represents a constant-coefficient linear differential operator of a vector-valued function with dim spatial variables. It is represented by a tuple of immutable dictionaries. The dictionary maps a DerivativeIdentifier to the coefficient. This object is immutable. Optionally supports a time variable as the last variable in the multi-index of the DerivativeIdentifier.

class sumpy.expansion.diff_op.DerivativeIdentifier(mi, vec_idx)
sumpy.expansion.diff_op.make_identity_diff_op(ninput, noutput=1, time_dependent=False)[source]

Returns the identity as a linear PDE system operator. if include_time is true, then the last dimension of the multi-index is time.

  • ninput – number of spatial variables of the function

  • noutput – number of output values of function

  • time_dependent – include time as a dimension

sumpy.expansion.diff_op.as_scalar_pde(pde, vec_idx)[source]

Returns a scalar PDE that is satisfied by the vec_idx component of pde.

  • pde – An instance of LinearPDESystemOperator

  • vec_idx – the index of the vector-valued function that we want as a scalar PDE

Local Expansions

class sumpy.expansion.local.VolumeTaylorLocalExpansion(kernel, order, use_rscale=None)[source]
class sumpy.expansion.local.H2DLocalExpansion(kernel, order, use_rscale=None)[source]
class sumpy.expansion.local.Y2DLocalExpansion(kernel, order, use_rscale=None)[source]
class sumpy.expansion.local.LineTaylorLocalExpansion(kernel, order, use_rscale=None)[source]

Multipole Expansions

class sumpy.expansion.multipole.VolumeTaylorMultipoleExpansion(kernel, order, use_rscale=None)[source]
class sumpy.expansion.multipole.H2DMultipoleExpansion(kernel, order, use_rscale=None)[source]
class sumpy.expansion.multipole.Y2DMultipoleExpansion(kernel, order, use_rscale=None)[source]