In this tutorial, we describe all operators available in Bempp. For details of the functionality of these operators see the operator tutorial.

## Scalar non-local operators

Let be a given Green’s function. We define the single layer () and double layer () potential operators as follows.

From this we derive the following boundary operators:

Operator | Formula |

Single layer boundary operator | |

Double layer boundary operator | |

Adjoint double layer boundary operator | |

Hypersingular boundary operator |

The actual implementation of boundary operators in Bempp is based on variational formulations. Foe example, the implementation of the single-layer boundary operator is given by

For the hypersingular operator, a slightly different formulation based on integration by parts of this variational form is used. Details can be found in the book *Numerical Approximation Methods for Elliptic Boundary Value Problems* by Steinbach.

The different types of boundary operators are dependent on the choice of the Green’s function . The Green’s functions used in Bempp, plus the modules in which the boundary operators are defined, are given below.

PDE | Green’s function | Module |

Laplace |
bempp.api.operators.boundary.laplace | |

Modified Helmholtz |
bempp.api.operators.boundary.modified_helmholtz | |

Helmholtz |
bempp.api.operators.boundary.helmholtz |

In each of the modules, the names of the corresponding functions are single_layer, double_layer, adjoint_double_layer and hypersingular.

The packages for the corresponding potential operators are:

PDE | Module |

Laplace | bempp.api.operators.potential.laplace |

Helmholtz | bempp.api.operators.potential.helmholtz |

Modified Helmholtz | bempp.api.operators.potential.modified_helmholtz |

The names of the corresponding potentials in each module are single_layer and double_layer.

For example, a Helmholtz hypersingular boundary operator is instantiated as

domain, range, dual_to_range, k)

Here, `k`

is the wavenumber that appears in the PDE and Green’s function in the table above.

In several applications, in particular transmission problems it is useful to define the multitrace operator

This operator has the property that

if and are the Dirichlet and Neumann data (respectively) of an interior solution to the corresponding PDE. The operator is called the interior Calderón projector. From this property, it follows directly that and therefore is self-regularizing.

The exterior Calderón projector is defined as .

The following code snippet defines a multitrace operator for a Helmholtz problem with wavenumber and forms the interior Calderón projector.

A = bempp.api.operators.helmholtz.multitrace_operator(grid, 1)

ident = bempp.api.operators.boundary.sparse.multitrace_identity(grid)

calderon = .5 * ident + A

The assembly of the multitrace operator requires the assembly of the single-layer and double-layer boundary operators using discontinuous piecewise linear basis functions on a barycentric refinement of the grid. This barycentric refinement has six times the number of elements as the original grid. This is necessary to assemble a basis for piecewise constant basis functions on the dual grid.

## Scalar, sparse operators

Bempp implements two sparse operators acting on scalar spaces: the identity operator and the Laplace-Beltrami operator . They are given in their variational form as follows.

Operator | Variational form | Function |

Identity Operator | bempp.api.boundary.sparse.identity | |

Laplace-Beltrami Operator | bempp.api.boundary.sparse.laplace_beltrami |

## Maxwell operators

Bempp supports the solution of the time-harmonic Maxwell equation of the form

We define the electric field () and magnetic field () potential operators by:

The corresponding functions are `bempp.api.operators.potential.maxwell.electric_field`

and `bempp.api.operators.potential.maxwell.magnetic_field`

.

The definition of the electric field operator given above includes a factor in the numerator. This is less common, but has implementational advantages in Bempp.

Based on the electric and magnetic field potential operators we can derive the corresponding boundary operators. These are given in the following table.

Operator | Varational form & function |

Electric field boundary operator | `bempp.operators.boundary.maxwell.electric_field` |

Magnetic field boundary operator | `bempp.operators.boundary.maxwell.magnetic_field` |

In these variational forms, the `domain`

functions and the `range`

functions should belong div-conforming spaces, while the `dual_to_range`

functions should be curl-conforming. More details of these spaces can be found in the spaces tutorial and the Maxwell tutorials.

The Maxwell multitrace operator is defined by

and the interior and exterior Calderón projectors are defined as and . The Maxwell multitrace operator (with wavenumber 1) and interior Calderón projector may be created in Bempp using the following code.

A = bempp.api.operators.maxwell.multitrace_operator(grid, 1)

ident = bempp.api.operators.boundary.sparse.multitrace_identity(grid,

use_maxwell_space=True)

calderon = .5 * ident + A

These operators in the multitrace operator are automatically discretised using stable pairings of Raviart–Thomas and Buffa–Christiansen basis functions. More details on this can be found in this tutorial.

## Far Field Operators

Bempp implements far field operators for Maxwell and Helmholtz problems. These can be found in the modules `bempp.api.operators.far_field.maxwell`

and `bempp.api.operators.far_field.helmholtz`

.

## Approximate DtN and NtD operators

Bempp implements the OSRC approximations to the Dirichlet-to-Neumann (DtN) and Neumann-to-Dirichlet (NtD) maps (see Antoine and Darbas (2007)). The corresponding functions are bempp.api.boundary.helmholtz.osrc_ntd and bempp.api.boundary.helmholtz.osrc_dtn.