-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
material_grid API #1199
Comments
We'll need to design this API so that it can be used by the adjoint solver. That is, it has to expose the interpolation weights or do the product of interpolation weights with fields/currents in C++. |
Given such a grid feature, we might want to implement a simpler subpixel averaging feature that just uses an MxMxM subgrid. |
I'm trying to map out the API. It seems like we can adopt an approach that is very similar to the material_type make_material_grid(int Nx, int Ny, material_data *m1, material_data *m2); which is similar to Lines 1580 to 1584 in 65b69ef
The update call would also be similar, only with the proper interpolations: Lines 281 to 299 in 65b69ef
Which will need a proper call in Lines 516 to 533 in 65b69ef
For the adjoint solver, we can do an implicit vector-jacobian-product (similar to the MPB routine). Obviously we would need proper SWIG hooks too, which shouldn't be too bad thanks to Chris. Does this sound right? Also, can you explain each of the MPB https://github.com/NanoComp/mpb/blob/0935b95c362873c2dd871646c5f12899e48af1c6/mpb/mpb.h#L98 |
Definitely it should be 3d (Nx x Ny x Nz). |
That enumeration is to support combining overlapping material grids from different objects. |
Might be nice to have something like the
material_grid
feature in MPB where you can have a material function based on a numpy array of ε or u ∈ [0,1] values and it would linearly interpolate onto the Yee grid (implemented in C++ for performance) and then interpolate between two given materials as a function of u.We might even implement the feature in MPB where you can have overlapping material grids, which is useful for projecting onto symmetry groups during optimization (http://arxiv.org/abs/arXiv:1405.4350) and potentially other applications (e.g. I initially implemented it to model overlapping lithography steps).
The text was updated successfully, but these errors were encountered: