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

Function LOOP_OVER_VOL_NOTOWNED

tests/integrate.cpp:298–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296
297 count = 0;
298 LOOP_OVER_VOL_NOTOWNED(gv, c, i) {
299 IVEC_LOOP_ILOC(gv, ihere);
300 IVEC_LOOP_LOC(gv, here);
301 ivec ihere0(gv.iloc(c, i));
302 vec here0(gv[ihere0]);
303 if (ihere0 != ihere) meep::abort("FAILED: wrong LOOP_OVER_VOL_NOTOWNED iloc at i=%td\n", i);
304 if (abs(here0 - here) > 1e-13)
305 meep::abort("FAILED: wrong LOOP_OVER_VOL_NOTOWNED loc (err = %g) at i=%td\n",
306 abs(here0 - here), i);
307 if (gv.owns(ihere)) meep::abort("FAILED: LOOP_OVER_VOL_NOTOWNED includes owned at i=%td\n", i);
308 if (ihere < vmin || ihere > vmax)
309 meep::abort("FAILED: LOOP_OVER_VOL_NOTOWNED outside V at i=%td\n", i);
310 ++count;
311 }
312 if (count != gv.ntot() - count_owned)
313 meep::abort("FAILED: LOOP_OVER_VOL_NOTOWNED has %zd iterations instead of %zd\n", count,
314 gv.ntot() - count_owned);

Callers 1

FOR_COMPONENTSFunction · 0.85

Calls 4

abortFunction · 0.85
absFunction · 0.85
ilocMethod · 0.80
ownsMethod · 0.80

Tested by

no test coverage detected