bempp.api.fmm.helpers
¶
FMM helper functions.
Module Contents¶
Functions¶
|
Evaluate the Laplace kernel. |
|
Evaluate the modified Helmholtz kernel. |
|
Evaluate the Laplace kernel. |
|
Get the local interaction operator. |
|
Return an evaluator for the local interactions. |
|
Get the local interaction matrix on the grid. |
|
Get the local interaction matrix on the grid. |
|
Return mapper from grid coeffs to point evaluations. |
|
Numba accelerated computational parts for point map. |
|
Map a grid to an array of points. |
|
Return an evaluator for the local interactions. |
|
Compare the result of an FMM result with the corresponding dense computation. |
|
Dense evaluation of interaction between sources and targets. |
|
Dense evaluation of interaction between sources and targets. |
Attributes¶
- bempp.api.fmm.helpers.M_INV_4PI¶
- bempp.api.fmm.helpers.laplace_kernel(target_points, source_points, kernel_parameters, dtype, result_type)¶
Evaluate the Laplace kernel.
- bempp.api.fmm.helpers.modified_helmholtz_kernel(target_points, source_points, kernel_parameters, dtype, result_type)¶
Evaluate the modified Helmholtz kernel.
- bempp.api.fmm.helpers.helmholtz_kernel(target_points, source_points, kernel_parameters, dtype, result_type)¶
Evaluate the Laplace kernel.
- bempp.api.fmm.helpers.get_local_interaction_operator(grid, local_points, kernel_function, kernel_parameters, precision, is_complex, device_interface=None)¶
Get the local interaction operator.
- bempp.api.fmm.helpers.get_local_interaction_evaluator_numba(grid_data, local_points, kernel_function, kernel_parameters, dtype, result_type)¶
Return an evaluator for the local interactions.
- bempp.api.fmm.helpers.numba_evaluate_local_interactions(grid_data, coeffs, local_points, kernel_function, kernel_parameters, dtype, result_type)¶
Get the local interaction matrix on the grid.
- bempp.api.fmm.helpers.get_local_interaction_matrix_impl(grid_data, local_points, kernel_function, kernel_parameters, dtype, result_type)¶
Get the local interaction matrix on the grid.
- bempp.api.fmm.helpers.map_space_to_points(space, local_points, weights, return_transpose=False)¶
Return mapper from grid coeffs to point evaluations.
- bempp.api.fmm.helpers.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.
- bempp.api.fmm.helpers.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_dataGridData
A Bempp GridData object.
- local_pointsnp.ndarray
(2, M) array of local coordinates.
- bempp.api.fmm.helpers.get_local_interaction_evaluator_opencl(grid, local_points, kernel_function, kernel_parameters, dtype, result_type)¶
Return an evaluator for the local interactions.
- bempp.api.fmm.helpers.debug_fmm(targets, sources, charges, mode, kernel_parameters, fmm_result)¶
Compare the result of an FMM result with the corresponding dense computation.
- bempp.api.fmm.helpers.dense_interaction_evaluator(targets, sources, charges, mode, kernel_parameters)¶
Dense evaluation of interaction between sources and targets.
Parameters¶
- targetsndarray
M x 3 array of target points.
- sourcesndarray
N x 3 array of source points.
- chargesndarray
N array of charges.
- modestring
Either ‘laplace’, ‘helmholtz’, ‘modified_helmholtz’
- kernel_parametersndarray
Array with kernel parameters
- kernel_typedtype
Type of the kernel (numpy.float64 or numpy.complex128)
Returns the dense evaluation of the interaction between sources and targets with the given charges.
- bempp.api.fmm.helpers.dense_interaction_evaluator_impl(targets, sources, charges, kernel, kernel_parameters, kernel_type)¶
Dense evaluation of interaction between sources and targets.
Parameters¶
- targetsndarray
M x 3 array of target points.
- sourcesndarray
N x 3 array of source points.
- chargesndarray
N array of charges.
- kernelNumba function object
The kernel object (either helpers.laplace, helpers.helmholtz or helpers.modified_helmholtz)
- kernel_parametersndarray
Array with kernel parameters
- kernel_typedtype
Type of the kernel (numpy.float64 or numpy.complex128)
Returns the dense evaluation of the interaction between sources and targets with the given charges.