Skip to content
Snippets Groups Projects
Commit 281a67fa authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge branch 'master' into h-2d

Conflicts:
	sumpy/expansion/__init__.py
parents 83388ffb 67d606d9
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,11 @@ hank1_01_result hank1_01(cdouble_t z)
"""
def bessel_preamble_generator(seen_dtypes, seen_functions):
def bessel_preamble_generator(target, seen_dtypes, seen_functions):
from loopy.target.pyopencl import PyOpenCLTarget
if not isinstance(target, PyOpenCLTarget):
raise NotImplementedError("Only the PyOpenCLTarget is supported as of now")
require_bessel = False
if any(func.name == "hank1_01" for func in seen_functions):
yield ("50-sumpy-hankel", HANKEL_PREAMBLE)
......@@ -125,13 +129,17 @@ hank1_01_result_dtype = cl.tools.get_or_register_dtype("hank1_01_result",
)
def bessel_mangler(identifier, arg_dtypes):
def bessel_mangler(target, identifier, arg_dtypes):
"""A function "mangler" to make Bessel functions
digestible for :mod:`loopy`.
See argument *function_manglers* to :func:`loopy.make_kernel`.
"""
from loopy.target.pyopencl import PyOpenCLTarget
if not isinstance(target, PyOpenCLTarget):
raise NotImplementedError("Only the PyOpenCLTarget is supported as of now")
if identifier == "hank1_01":
return (np.dtype(hank1_01_result_dtype),
identifier, (np.dtype(np.complex128),))
......
......@@ -67,14 +67,24 @@ class ExpansionBase(object):
return len(self.get_coefficient_identifiers())
def coefficients_from_source(self, avec, bvec):
"""
"""Form an expansion from a source point.
:arg avec: vector from source to center.
:arg bvec: vector from center to target. Not usually necessary,
except for line-Taylor expansion.
:returns: a list of :mod:`sympy` expressions representing
the coefficients of the expansion.
"""
raise NotImplementedError
def evaluate(self, coeffs, bvec):
"""
:return: a :mod:`sympy` expression corresponding
to the evaluated expansion with the coefficients
in *coeffs*.
"""
raise NotImplementedError
def update_persistent_hash(self, key_hash, key_builder):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment