Closed thchr closed 4 years ago
The CI failure is new — looks like one of the frequencies in the test has changed slightly because of this averaging change?
On second thought, I'm not completely convinced this is worthwhile: it adds a check to all (~O(res^2
)) interface voxels , just to weed out a few (~O(res
); in practice, a few handfuls at most) errant voxels.
In the case where fill
is exactly 1 or 0, the voxel permittivity obviously isn't affected one way or the other. Conversely, when fill
is below tol
or above 1-tol
, I suppose it is at least as consistent to just proceed with the Kottke averaging step as it is to not do it.
So, having thought a bit more, I guess I'm inclined to drop this PR. For now, I'll just close it; let me know if you feel otherwise.
While working on #127, I found that
mean_epsilon_func
occasionally identified too many interface points, corresponding to voxels where thefill
value of one of the materials is zero. I figured the most consistent thing to do would be to just treat these situations as homogeneous, and moreover to set a threshold at the tolerancetol
used to compute the filling fraction in the first place.