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

Working and verified version of multilevel atom susceptibility. #500

Merged
merged 4 commits into from Sep 13, 2018

Conversation

acerjan
Copy link
Contributor

@acerjan acerjan commented Sep 8, 2018

This is the version of the code that is verified with SALT, as we discussed in the issue.

…definition of alpha of /scheme/structure.cpp. Fixed a bug in how the E*(n2-n1) term in updating the multilevel polarization was working. Rewrote most of the multilevel-atom.ctl example to be more transparent with agreement with SALT. Still having trouble getting multilevel-atom.ctl to yield non-zero fields, I think this is a field initialization issue.
…ns for gain media in MEEP. The results have been verified against my personal implementation of the oscillator equations in 1D.
…sing, including the two ~0 terms not normally written in the oscillator model equations. Candidate to be merged back into the master branch.
The multilevel atom susceptibility is now working and verified against independent code.
@stevengj
Copy link
Collaborator

stevengj commented Sep 9, 2018

Great! Ideally you can also include documentation in the PR, including specification of precisely what equations are implemented and the definitions of the parameters. (Note that the markdown documentation can include LaTeX equations.)

@stevengj
Copy link
Collaborator

stevengj commented Sep 13, 2018

@oskooi suggested that we merge this now so that we can start playing with it and work on adding a Python front-end.

@acerjan, can you make a separate PR for documentation?

@stevengj
Copy link
Collaborator

We also need a PR for a regression test to make sure that this doesn't bit-rot. That could be as simple as running one of your 1d test cases and adding a check for the numbers that you have already validated.

@stevengj stevengj merged commit 4c54a75 into NanoComp:master Sep 13, 2018
@acerjan
Copy link
Contributor Author

acerjan commented Sep 13, 2018

I'm working on the documentation now, and I can put together a separate PR, sure. it took a while to get mkdocs running correctly.

I understand conceptually what you want by a regression test, but I'll need a bit more guidance as to where this goes in the package. Can you point me in the direction of the other tests?

@oskooi
Copy link
Collaborator

oskooi commented Sep 13, 2018

The C++ tests are in tests/ and the Python tests in python/tests/. A Python test would be sufficient but we need to add the front end first (which we are working on now). @ChristopherHogan can help you port the existing Scheme multilevel example to Python as a unit test.

@oskooi
Copy link
Collaborator

oskooi commented Sep 13, 2018

For reference, here are the commands to install and run mkdocs in a separate Conda environment for viewing the Meep documentation via a local web server:

conda create -n md -c conda-forge mkdocs python-markdown-math
source activate md
pip install --user mkdocs-material
cd /path/to/meep/
mkdocs serve
source deactivate

@acerjan
Copy link
Contributor Author

acerjan commented Sep 13, 2018

For the documentation, I've written the general theory along with some verification plots into Materials.md. Are there additional locations where you'd like for me to provide documentation? Will you be writing documentation for the scheme and python interfaces?

@oskooi
Copy link
Collaborator

oskooi commented Sep 14, 2018

Please also update the Scheme tutorial example as necessary with additional information based on the recent changes. We will port this tutorial to Python and also provide documentation for the interface.

bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
…Comp#500)

* First commit by AWC to multilevel atom branch. Fixed 2*pi bug in the definition of alpha of /scheme/structure.cpp. Fixed a bug in how the E*(n2-n1) term in updating the multilevel polarization was working. Rewrote most of the multilevel-atom.ctl example to be more transparent with agreement with SALT. Still having trouble getting multilevel-atom.ctl to yield non-zero fields, I think this is a field initialization issue.

* Completely working version of the unmodified Oscillator Model Equations for gain media in MEEP. The results have been verified against my personal implementation of the oscillator equations in 1D.

* Working and verified version of multilevel atom susceptibility for lasing, including the two ~0 terms not normally written in the oscillator model equations. Candidate to be merged back into the master branch.
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.

None yet

3 participants