Example #1
0
    def __init__(self,
                 ctx,
                 expansion,
                 kernels=None,
                 name=None,
                 device=None,
                 strength_usage=None):
        """
        :arg expansion: a subclass of :class:`sympy.expansion.ExpansionBase`
        :arg strength_usage: A list of integers indicating which expression
          uses which source strength indicator. This implicitly specifies the
          number of strength arrays that need to be passed.
          Default: all kernels use the same strength.
        """
        if kernels is None:
            kernels = [expansion.kernel]

        KernelComputation.__init__(self,
                                   ctx=ctx,
                                   kernels=kernels,
                                   strength_usage=strength_usage,
                                   value_dtypes=None,
                                   name=name,
                                   device=device)

        from sumpy.kernel import TargetDerivativeRemover
        expansion = expansion.with_kernel(TargetDerivativeRemover()(
            expansion.kernel))

        self.expansion = expansion
        self.dim = expansion.dim
Example #2
0
    def __init__(self, ctx, expansions, strength_usage=None,
            value_dtypes=None,
            options=[], name="layerpot", device=None):
        KernelComputation.__init__(self, ctx, expansions, strength_usage,
                value_dtypes,
                name, options, device)

        from pytools import single_valued
        self.dim = single_valued(knl.dim for knl in self.expansions)
Example #3
0
    def __init__(self,
                 ctx,
                 expansions,
                 strength_usage=None,
                 value_dtypes=None,
                 name=None,
                 device=None):
        KernelComputation.__init__(self, ctx, expansions, strength_usage,
                                   value_dtypes, name, device)

        from pytools import single_valued
        self.dim = single_valued(knl.dim for knl in self.expansions)
Example #4
0
File: p2p.py Project: inducer/sumpy
    def __init__(self, ctx, kernels, exclude_self, strength_usage=None,
            value_dtypes=None,
            options=[], name=None, device=None):
        """
        :arg kernels: list of :class:`sumpy.kernel.Kernel` instances
        :arg strength_usage: A list of integers indicating which expression
          uses which source strength indicator. This implicitly specifies the
          number of strength arrays that need to be passed.
          Default: all kernels use the same strength.
        """
        KernelComputation.__init__(self, ctx, kernels, strength_usage,
                value_dtypes,
                name, options, device)

        self.exclude_self = exclude_self

        from pytools import single_valued
        self.dim = single_valued(knl.dim for knl in self.kernels)
Example #5
0
    def __init__(self,
                 ctx,
                 kernels,
                 exclude_self,
                 strength_usage=None,
                 value_dtypes=None,
                 name=None,
                 device=None):
        """
        :arg kernels: list of :class:`sumpy.kernel.Kernel` instances
        :arg strength_usage: A list of integers indicating which expression
          uses which source strength indicator. This implicitly specifies the
          number of strength arrays that need to be passed.
          Default: all kernels use the same strength.
        """
        KernelComputation.__init__(self, ctx, kernels, strength_usage,
                                   value_dtypes, name, device)

        self.exclude_self = exclude_self

        from pytools import single_valued
        self.dim = single_valued(knl.dim for knl in self.kernels)