Interaction routinesΒΆ
Particle-to-particleΒΆ
-
class
sumpy.p2p.
P2PBase
(ctx, target_kernels, exclude_self, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None)[source]ΒΆ
-
class
sumpy.p2p.
P2P
(ctx, target_kernels, exclude_self, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None)[source]ΒΆ Direct applier for P2P interactions.
-
class
sumpy.p2p.
P2PMatrixGenerator
(ctx, target_kernels, exclude_self, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None)[source]ΒΆ Generator for P2P interaction matrix entries.
-
class
sumpy.p2p.
P2PMatrixBlockGenerator
(ctx, target_kernels, exclude_self, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None)[source]ΒΆ Generator for a subset of P2P interaction matrix entries.
-
__call__
(queue, targets, sources, index_set, **kwargs)[source]ΒΆ Construct a set of blocks of the full P2P interaction matrix.
The blocks are returned as one-dimensional arrays, for performance and storage reasons. If the two-dimensional form is desired, it can be obtained using the information in the index_set for a block \(i\) in the following way:
blkranges = index_set.linear_ranges() blkshape = index_set.block_shape(i) block2d = result[blkranges[i]:blkranges[i + 1]].reshape(*blkshape)
- Parameters
targets β target point coordinates.
sources β source point coordinates.
index_set β a
sumpy.tools.MatrixBlockIndexRanges
used to define the blocks.
- Returns
a tuple of one-dimensional arrays of kernel evaluations at target-source pairs described by index_set.
-
QBX for Layer PotentialsΒΆ
-
class
sumpy.qbx.
LayerPotentialBase
(ctx, expansion, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None, target_kernels=None)[source]ΒΆ
-
class
sumpy.qbx.
LayerPotential
(ctx, expansion, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None, target_kernels=None)[source]ΒΆ Direct applier for the layer potential.
-
class
sumpy.qbx.
LayerPotentialMatrixGenerator
(ctx, expansion, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None, target_kernels=None)[source]ΒΆ Generator for layer potential matrix entries.
-
class
sumpy.qbx.
LayerPotentialMatrixBlockGenerator
(ctx, expansion, strength_usage=None, value_dtypes=None, name=None, device=None, source_kernels=None, target_kernels=None)[source]ΒΆ Generator for a subset of the layer potential matrix entries.
-
__call__
(queue, targets, sources, centers, expansion_radii, index_set, **kwargs)[source]ΒΆ - Parameters
targets β target point coordinates.
sources β source point coordinates.
centers β QBX target expansion centers.
expansion_radii β radii for each expansion center.
index_set β a
sumpy.tools.MatrixBlockIndexRanges
used to define the blocks.
- Returns
a tuple of one-dimensional arrays of kernel evaluations at target-source pairs described by index_set.
-
Translation routinesΒΆ
Particle-to-expansionΒΆ
-
class
sumpy.p2e.
P2EBase
(ctx, expansion, kernels=None, name=None, device=None, strength_usage=None)[source]ΒΆ Common input processing for kernel computations.
Integration with boxtree
ΒΆ
Integrates boxtree
with sumpy
.
-
class
sumpy.fmm.
SumpyExpansionWranglerCodeContainer
(cl_context, multipole_expansion_factory, local_expansion_factory, target_kernels, exclude_self=False, use_rscale=None, strength_usage=None, source_kernels=None)[source]ΒΆ Objects of this type serve as a place to keep the code needed for
SumpyExpansionWrangler
. SinceSumpyExpansionWrangler
necessarily must have apyopencl.CommandQueue
, but this queue is allowed to be more ephemeral than the code, the codeβs lifetime is decoupled by storing it in this object.Timing results returned by this wrangler contain the values wall_elapsed which measures elapsed wall time. This requires a command queue with profiling enabled.
-
class
sumpy.fmm.
SumpyExpansionWrangler
(code_container, queue, tree, dtype, fmm_level_to_order, source_extra_kwargs, kernel_extra_kwargs=None, self_extra_kwargs=None)[source]ΒΆ Implements the
boxtree.fmm.ExpansionWranglerInterface
by usingsumpy
expansions/translations.-
source_extra_kwargs
ΒΆ Keyword arguments to be passed to interactions that involve source particles.
-
kernel_extra_kwargs
ΒΆ Keyword arguments to be passed to interactions that involve expansions, but not source particles.
-
self_extra_kwargs
ΒΆ Keyword arguments to be passed for handling self interactions (source and target particles are the same), provided special handling is needed
-