Skip to content
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

Don't do averaging where epsilon is uniform #791

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Don't do averaging where epsilon is uniform #791

merged 1 commit into from
Apr 9, 2019

Conversation

ChristopherHogan
Copy link
Contributor

Implements the algorithm described in this comment. However, it doesn't seem to make any difference in the runtime of the simulation script in #764.
@stevengj @oskooi

@ChristopherHogan
Copy link
Contributor Author

I must have made a mistake, because it also significantly changes the resulting epsilon (although it wasn't correct to begin with).

@stevengj
Copy link
Collaborator

stevengj commented Apr 8, 2019

Would be good to check that it is no longer messing up ε.

@ChristopherHogan
Copy link
Contributor Author

ChristopherHogan commented Apr 8, 2019

The epsilon output is correct. Trying resolution 20 exceeds my available memory with the averaged material function, but at resolution 10 python/examples/ring.py and the version that uses a material function and the fallback averaging produces Harminv output that's the same up to 4 or 5 decimal places.

ring.py, resolution 10

harminv0:, frequency, imag. freq., Q, |amp|, amplitude, error
harminv0:, 0.11810150542150445, -0.0007317200176453875, 80.70129460278059, 0.003413351859500044, -0.0030498468152507087-0.0015327769962579412i, 1.0324565072157651e-05+0.0i
harminv0:, 0.1471626643261352, -0.00023257744313091665, 316.3734675750522, 0.028644166889685307, 0.019309509482952406-0.02115729520359148i, 7.310989427157562e-07+0.0i
harminv0:, 0.17524672525773047, -5.2271941035269695e-05, 1676.2982375141323, 0.007211538380799207, -0.0008129425141697651-0.007165571176563345i, 1.9077210115422416e-07+0.0i

Material function with averaging, resolution 10

harminv0:, frequency, imag. freq., Q, |amp|, amplitude, error
harminv0:, 0.11810148928382809, -0.0007316426211713271, 80.70982052327193, 0.0034121562439828577, -0.003048471978583548-0.001532849904309653i, 1.0408745501360815e-05+0.0i
harminv0:, 0.14716195963468734, -0.0002325660253292107, 316.3874848580549, 0.028641545695560697, 0.01932004384775394-0.021144125556564326i, 7.300059204362234e-07+0.0i
harminv0:, 0.17524619935908187, -5.242539743704413e-05, 1671.3864646379557, 0.007214293355171828, -0.0008172334836814178-0.007167855889150278i, 2.1592661960886496e-07+0.0i

I'll have to use AWS to do additional testing.

@stevengj stevengj merged commit ae05ae5 into NanoComp:master Apr 9, 2019
@ChristopherHogan ChristopherHogan deleted the chogan/normal_opt branch April 10, 2019 13:55
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants