| 136 | } |
| 137 | |
| 138 | bench bench_2d_tm(const double xmax, const double ymax, double eps(const vec &)) { |
| 139 | const double a = 10.0; |
| 140 | const double gridpts = a * a * xmax * ymax; |
| 141 | const double ttot = 5.0 + te_tm_2d_time / gridpts; |
| 142 | |
| 143 | grid_volume gv = voltwo(xmax, ymax, a); |
| 144 | structure s(gv, eps); |
| 145 | fields f(&s); |
| 146 | f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); |
| 147 | |
| 148 | while (f.time() < f.last_source_time()) |
| 149 | f.step(); |
| 150 | const double tend = f.time() + ttot; |
| 151 | double start = wall_time(); |
| 152 | while (f.time() < tend) |
| 153 | f.step(); |
| 154 | bench b; |
| 155 | b.time = (wall_time() - start); |
| 156 | b.gridsteps = ttot * a * 2 * gridpts; |
| 157 | // f.print_times(); |
| 158 | return b; |
| 159 | } |
| 160 | |
| 161 | bench bench_2d_te(const double xmax, const double ymax, double eps(const vec &)) { |
| 162 | const double a = 10.0; |
no test coverage detected