:py:mod:`bempp.api.fmm.helpers` =============================== .. py:module:: bempp.api.fmm.helpers .. autoapi-nested-parse:: FMM helper functions. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: bempp.api.fmm.helpers.laplace_kernel bempp.api.fmm.helpers.modified_helmholtz_kernel bempp.api.fmm.helpers.helmholtz_kernel bempp.api.fmm.helpers.get_local_interaction_operator bempp.api.fmm.helpers.get_local_interaction_evaluator_numba bempp.api.fmm.helpers.numba_evaluate_local_interactions bempp.api.fmm.helpers.get_local_interaction_matrix_impl bempp.api.fmm.helpers.map_space_to_points bempp.api.fmm.helpers.map_space_to_points_impl bempp.api.fmm.helpers.grid_to_points bempp.api.fmm.helpers.get_local_interaction_evaluator_opencl bempp.api.fmm.helpers.debug_fmm bempp.api.fmm.helpers.dense_interaction_evaluator bempp.api.fmm.helpers.dense_interaction_evaluator_impl Attributes ~~~~~~~~~~ .. autoapisummary:: bempp.api.fmm.helpers.M_INV_4PI .. py:data:: M_INV_4PI .. py:function:: laplace_kernel(target_points, source_points, kernel_parameters, dtype, result_type) Evaluate the Laplace kernel. .. py:function:: modified_helmholtz_kernel(target_points, source_points, kernel_parameters, dtype, result_type) Evaluate the modified Helmholtz kernel. .. py:function:: helmholtz_kernel(target_points, source_points, kernel_parameters, dtype, result_type) Evaluate the Laplace kernel. .. py:function:: get_local_interaction_operator(grid, local_points, kernel_function, kernel_parameters, precision, is_complex, device_interface=None) Get the local interaction operator. .. py:function:: get_local_interaction_evaluator_numba(grid_data, local_points, kernel_function, kernel_parameters, dtype, result_type) Return an evaluator for the local interactions. .. py:function:: numba_evaluate_local_interactions(grid_data, coeffs, local_points, kernel_function, kernel_parameters, dtype, result_type) Get the local interaction matrix on the grid. .. py:function:: get_local_interaction_matrix_impl(grid_data, local_points, kernel_function, kernel_parameters, dtype, result_type) Get the local interaction matrix on the grid. .. py:function:: map_space_to_points(space, local_points, weights, return_transpose=False) Return mapper from grid coeffs to point evaluations. .. py:function:: map_space_to_points_impl(grid_data, local2global, local_multipliers, normal_multipliers, support_elements, numba_evaluate, shape_fun, local_points, weights, number_of_shape_functions) Numba accelerated computational parts for point map. .. py:function:: grid_to_points(grid_data, local_points) Map a grid to an array of points. Returns a (N, 3) point array that stores the global vertices associated with the local points in each triangle. Points are stored in consecutive order for each element in the support_elements list. Hence, the returned array is of the form [ v_1^1, v_2^1, ..., v_M^1, v_1^2, v_2^2, ...], where v_i^j is the ith point in the jth element in the support_elements list. Parameters ---------- grid_data : GridData A Bempp GridData object. local_points : np.ndarray (2, M) array of local coordinates. .. py:function:: get_local_interaction_evaluator_opencl(grid, local_points, kernel_function, kernel_parameters, dtype, result_type) Return an evaluator for the local interactions. .. py:function:: debug_fmm(targets, sources, charges, mode, kernel_parameters, fmm_result) Compare the result of an FMM result with the corresponding dense computation. .. py:function:: dense_interaction_evaluator(targets, sources, charges, mode, kernel_parameters) Dense evaluation of interaction between sources and targets. Parameters ---------- targets : ndarray M x 3 array of target points. sources : ndarray N x 3 array of source points. charges : ndarray N array of charges. mode : string Either 'laplace', 'helmholtz', 'modified_helmholtz' kernel_parameters : ndarray Array with kernel parameters kernel_type : dtype Type of the kernel (numpy.float64 or numpy.complex128) Returns the dense evaluation of the interaction between sources and targets with the given charges. .. py:function:: dense_interaction_evaluator_impl(targets, sources, charges, kernel, kernel_parameters, kernel_type) Dense evaluation of interaction between sources and targets. Parameters ---------- targets : ndarray M x 3 array of target points. sources : ndarray N x 3 array of source points. charges : ndarray N array of charges. kernel : Numba function object The kernel object (either helpers.laplace, helpers.helmholtz or helpers.modified_helmholtz) kernel_parameters : ndarray Array with kernel parameters kernel_type : dtype Type of the kernel (numpy.float64 or numpy.complex128) Returns the dense evaluation of the interaction between sources and targets with the given charges.