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

Function in_subgrid

src/array_slice.cpp:189–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187bool in_range(int imin, int i, int imax) { return (imin <= i && i <= imax); }
188
189bool in_subgrid(ivec ivmin, ivec iv, ivec ivmax) {
190 LOOP_OVER_DIRECTIONS(iv.dim, d)
191 if (!in_range(ivmin.in_direction(d), iv.in_direction(d), ivmax.in_direction(d))) return false;
192 return true;
193}
194
195static void get_source_slice_chunkloop(fields_chunk *fc, int ichnk, component cgrid, ivec is,
196 ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0,

Callers 1

Calls 3

in_rangeFunction · 0.85
LOOP_OVER_DIRECTIONSFunction · 0.70
in_directionMethod · 0.45

Tested by

no test coverage detected