-
Notifications
You must be signed in to change notification settings - Fork 641
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
Gyrotropic Fails on Multiple materials (process finished with exit code 139 (interrupted by signal 11: SIGSEGV) #1117
Comments
The above error was thrown by the PyCharm console. but if I run the file in the Ubuntu shell I get the following:
And with gdb I get the following
|
@seewhydee, do you have time to take a look at this? |
@seewhydee @stevengj, Any news on this, it will be of great help and greatly appreciated. |
Sorry for the delay, looking into it now. |
OK, this seems to be related to the allocation of polarization (P) data in gyrotropic_susceptibility::needs_P. There are some comments in susceptibility.cpp (line 66) talking about the subtleties of when to allocate the P data, which I'm afraid I don't understand. As an experiment, if we over-relax the rules on needs_P for gyrotropic media (so that the P data allocation triggers more easily), and add a couple of extra checks to update_P, then the segfault no longer seems to happen: However, I am pretty sure this is not exactly the right thing to do. If anyone has some insight about the P allocation, it would be really helpful. |
@stevengj, any insight? |
In general, Since the FOR_DIRECTIONS(d) {
if (!trivial_sigma[direction_component(c, d)][d]) return true;
} That is, if you have a nonzero |
Note that the Looking at your |
Actually, using the default susceptibility::needs_P works with some minor modifications to gyrotropic_susceptibility::update_P. I have opened pull request #1219 to discuss this. Regarding off-diag averaging, averaging is done to extract the other components of the E fields, which enter into the precession/forcing terms of the equations of motion for P. It doesn't seem like it should be necessary to average over P. Maybe I'm misunderstanding? |
Looking back at the code, I see that we are fine for the reason you discussed in this comment:
If we weren't paying this factor of 3 in memory cost, then we would need a more complicated averaging scheme for off-diagonal P terms, but as it is you are right. |
@stevengj @seewhydee, thanks a lot for the help, we manage to recreate a Au/Co/Au nanodisk with MO response and got results pretty similar to what was measured experimentally here |
hi, i've been trying to use the new gyrotropic feature, but it seems not to work when used for 2 or more materials. the following example is just a simple modification of the faraday_rotation found the meep repository:
Ths previous code runs good and the only different thing is the function "gyrotropic_conversion" i created for convert existing meep.materials in gyrotropic.
Now if I add an extra material to the main code like this:
The execution stops with the error
or even if we just want to pretend an empty space with a small layer of any material (in this case BK7) like in the following, it won't also compile.
best regards
The text was updated successfully, but these errors were encountered: