MCPcopy Create free account
hub / github.com/NanoComp/meep / bench_2d_tm

Function bench_2d_tm

tests/bench.cpp:138–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138bench 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
161bench bench_2d_te(const double xmax, const double ymax, double eps(const vec &)) {
162 const double a = 10.0;

Callers 1

mainFunction · 0.85

Calls 7

voltwoFunction · 0.85
wall_timeFunction · 0.85
add_point_sourceMethod · 0.80
timeMethod · 0.80
last_source_timeMethod · 0.80
stepMethod · 0.80
vecClass · 0.50

Tested by

no test coverage detected