volumential.expression_eval#
Pointwise evaluation of symbolic scalar fields on the device.
This module owns ScalarFieldExpressionEvaluation together with the
pymbolic/loopy plumbing that turns math.foo(x) lookups from a
symbolic expression into callables the OpenCL target understands. It is
re-exported by volumential.tools for backwards compatibility.
- class volumential.expression_eval.ScalarFieldExpressionEvaluation(dim, expression, variables=None, dtype=<class 'numpy.float64'>, function_manglers=None, preamble_generators=None)[source]#
Bases:
KernelCacheWrapperEvaluate a field function on a set of D-d points. Useful for imposing analytic conditions efficiently.
- get_normalised_expr()[source]#
Return
exprrewritten in terms of thex0, x1, ...names used by the generated kernel.