Expansions¶
-
class
sumpy.expansion.
ExpansionBase
(kernel, order, use_rscale=None)[source]¶ -
-
get_coefficient_identifiers
()[source]¶ Returns the identifiers of the coefficients that actually get stored.
-
coefficients_from_source
(kernel, avec, bvec, rscale, sac=None)[source]¶ Form an expansion from a source point.
- Parameters
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.
- Returns
a list of
sympy
expressions representing the coefficients of the expansion.
-
-
class
sumpy.expansion.
LinearPDEBasedExpansionTermsWrangler
(order, dim, max_mi=None)[source]¶ -
__init__
(order, dim, max_mi=None)[source]¶ - Parameters
order – order of the expansion
dim – number of dimensions
-
get_pde_as_diff_op
()[source]¶ 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 theDerivativeIdentifier
.
-
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.
- Parameters
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.
- Parameters
pde – An instance of
LinearPDESystemOperator
vec_idx – the index of the vector-valued function that we want as a scalar PDE