コード例 #1
0
ファイル: maxwell_example.py プロジェクト: rorypeck/tdbempp
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 matplotlib import pyplot as plt