incident_wave = MaxwellModulatedPlaneWave(400, [0, 0, 1], [1, 0, 0], 10e-3, 1000) eval_dims = [300, 300] time_steps = 100 points = tools.create_points_in_plane([-3, 3, -3, 3], eval_dims) 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 tdbempp import tools from tdbempp.visualization import FfmpegMovieCreator from tdbempp.incident_wave import AcousticModulatedPlaneWave incident_wave = AcousticModulatedPlaneWave(400,[1,0,0],10E-3,1000) eval_dims = [300,300] time_steps = 50 points = tools.create_points_in_plane([-3,3,-3,3],eval_dims) from bempp import shapes mesh = '/home/betcke/local/bempp/development-nodebug/bempp/examples/meshes/sphere-h-0.1.msh' 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 = AcousticSoundSoftIndirect(mesh) 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) if comm.rank == 0: np.save('wavenumbers.npy',solver.wave_numbers) np.save('wavenumbers_active.npy',solver.active_wave_numbers)