-
Notifications
You must be signed in to change notification settings - Fork 202
Avoid divide by epsilon
in macroscopic algorithms
#4448
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
base: development
Are you sure you want to change the base?
Avoid divide by epsilon
in macroscopic algorithms
#4448
Conversation
… macroscopic-properties-avoid-divide-by-epsilon
… macroscopic-properties-avoid-divide-by-epsilon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eebasso just curious: for which (meta?) material is epsilon=0? |
I have not yet tested it. I'll try it soon.
According to "N. Garcia, E. V. Ponizovskaya, John Q. Xiao; Zero permittivity materials: Band gaps at the visible. Appl. Phys. Lett. 18 February 2002; 80 (7): 1120–1122", one possible realization would be a dielectric medium with embedded metallic nanoparticles and nanowires. They state
Furthermore, there are materials such as superconductors that can have negative permittivity at radio frequencies. |
… macroscopic-properties-avoid-divide-by-epsilon
@eebasso would you like to add your test result in the PR description just to double check ? Thank you! |
Summary
This PR makes the calculation of
alpha
andbeta
in the algorithms of MacroscopicProperties.H more efficient and avoids dividing by the relative permittivityepsilon
. The check onepsilon
upon initialization is relaxed to require non-negativity instead of strict positivity.Additional Information
The changes allow for the possibility of
epsilon
being zero while reducing the numbers of operations to calculate the coefficients. In particular, the number of division operations gets cut from two to one. In the case ofbeta
, an additional multiplication operation is cut. This could be significant since these calculations occur inside the for loops to evolve the E-field.