forked from NanoComp/meep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compute material volume averages of a MaterialGrid using analytic for…
…mulation (NanoComp#1568) * compute material volume averages of a MaterialGrid using analytic formulation * fixes * evaluate weight of matgrid once at the voxel center * compute weights array at voxel center using geom_box coordinates * flip weights for two materials when computing averaged quantities * add support for overlapping grids * compute gradients with respect to x,y,z coordinates rather than dx,dy,dz using chain rule * fix bug in scaling of gradient in z direction * a few simplifications * compute gradient of the weights array with respect to the coordinates of the geometric object using vector-Jacobian product * check if geometric_object is not NULL in to_geom_object_coords_VJP * add chain rule for the map_lattice_coordinates function for default material * refactor to minimize copy-pasted lines * fix bug in matgrid_ceps_func * fixes and tweaks
- Loading branch information
Showing
2 changed files
with
184 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters