-
Notifications
You must be signed in to change notification settings - Fork 122
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
Reorganising of Mironov's for merge pull request into templates #741
base: develop
Are you sure you want to change the base?
Reorganising of Mironov's for merge pull request into templates #741
Conversation
… Minor correction to the FullPPT module
Define a new common monteCarloRoutine method in the Ionization class that is called by the () operators of all Ionization children. Also move the common parts of the initialisation of the children to the Ionization class.
Rewrite IonizationTunnel and the new models introduced by Mironov to be more compact and use templates.
A .tex file and a .pdf files have been added to the repo in this branch. I think an important work is to rewrite the information contained in this document into the standard SMilei manual (in the understand section as well as in the namelist section). |
The case
There seems to be a problem with the handling of ionization in the presence of a laser envelope. |
…ome checks to separate methods
a49fb96
to
d6bdfeb
Compare
With the latest fix, all ionization tests of the CI passed. |
All 1D and 2D standard CI tests passed as well. I will run some final performance tests and I think it is going to be ok for me. |
I have tried a case where nitrogen 5+ is ionized. It has a laser intensity a0 = 3. WhenI switch from |
I confirmed with an old executable that, even with |
With these correction some electrons are ionized as expected. Differences are observed with the previous implementation though. This still needs to be clarified. |
This pull request combines the ionization models proposed in the for merge pull request by Arseny Mironov into a single template. This branch is a work in progress that needs to be tested and polished.
The template is give by
template <int Model> class IonizationTunnel
whereModel=0
gives the original Smilei behaviour,Model=1
gives the new IonizationTunnelFullPPT model and so forth.The main changes are that the monte carlo routine in the
()
operator overload method is pulled out into its own template method which is common to all the ionization models. This istemplate <int RateId> monteCarloRoutine
. in this method, the class'Model
template parameter is used to determine what ionization rate will be used, the ionization rate being the only difference within the routine between all the models. TheRateId
template parameter is needed to tell themonteCarloRoutine
what rate to use in the case of the BSI model, which uses different rates depending on some values.It is important to note that in the original implementation of the BSI model in the for merge branch in the src/Ionization/IonizationTunnelBSI.cpp file, at lines 146 (bsi-linear) and 235 (bsi-quadratic), there is
i <= k_times+1
as opposed to thei < k_times+1
found in all the other ionization rates (including the tunnel in the same file, line 325). This change is not currently implemented, although it should be trivial. Neither Mironov nor I know why this is the case.