from bempp import shapes mesh = "/home/betcke/local/bempp/development-nodebug/bempp/examples/meshes/sphere-h-0.1.msh" context, evalOps, evalQuadStrategy = tools.create_bempp_options() solver = TimeDomainByFrequencyTransformationSolver() solver.final_time = 20e-3 solver.time_steps = time_steps solver.incident_field = incident_wave solver.transformation_rule = ConvolutionQuadrature(solver, bdf2) solver.frequency_solver = MaxwellEfiePecIndirect(context, mesh, evalOps, evalQuadStrategy) solver.evaluation_points = points solver.tolerance = 1e-10 solver.initialize() solver.solve() sol = transform_to_full_field_domain_solution(incident_wave, solver.domain_solution, solver.times, points) import matplotlib matplotlib.use("AGG") from matplotlib import pyplot as plt fig = plt.figure() def saveImage(points, data, fname): field = data[0, ...] ** 2 + data[1, ...] ** 2 + data[2, ...] ** 2 x, y, data_2d = np.real(tools.reshape_to_2d_plane(points, field, eval_dims, "xy"))