This tutorial shows how to solve the magnetic field integral equation (MFIE) for exterior scattering problems, as described in section 6 of Scroggs et al (2017).
In this tutorial, we use consider an incident wave
scattering off the unit sphere.
We let be the scattered field and look to solve
where is the total electric field. This is the same problem as solved in the EFIE example.
The (indirect) MFIE uses the representation formula
and the following boundary integral equation.
Here, is the tangential trace of a function, as defined in the EFIE example.
First, we do the usual imports, set the wavenumber, and define the incident wave, as in the EFIE example.
import numpy as np
k = 3
grid = bempp.api.shapes.sphere(h=0.1)
return np.array([np.exp(1j*k*x), 0.*x, 0.*x])
def tangential_trace(x, n, domain_index, result):
result[:] = np.cross(incident_field(x), n, axis=0)
We define the multitrace operator, extract the spaces and operator we will need from it, and build a grid function representing the incident wave.
identity = bempp.api.operators.boundary.sparse.multitrace_identity(
calderon = .5 * identity - multitrace
rwg_space = multitrace.domain_spaces
rbc_space = multitrace.dual_to_range_spaces
rhs = bempp.api.GridFunction(rwg_space,
op = -calderon[0,0]
Next, we solve the discrete system and print the number of iterations.
op, rhs, return_iteration_count=True)
print("Number of iterations:", iterations)