-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add ionization model ADK #922
Add ionization model ADK #922
Conversation
Again, keep in mind: you only need to check the files commit-wise from the last commits. Otherwise you will see the changes from #874, too. |
@n01r pls rebase against Do you add the "add list of ionization methods (instead of single selection) applied to a species" before or after this pull? |
I would say: after. Makes more sense if we already have two models that I can test and see if I can avoid double counting and so on. It also makes more sense chronologically: ADK is practically ready anyway except from what you guys might have to remark about it. |
sounds reasonable, all right. |
74a34b7
to
c97949b
Compare
@ax3l |
during |
/* atomic unit for energy: | ||
* 1 Rydberg = 27.21 eV --> converted to Joule | ||
*/ | ||
const float_X ATOMIC_UNIT_ENERGY = 4.36e-18; |
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.
the values here must be float_64
if in SI and they should be normalized in a ionizationEnergies.unitless
file before being used in the code.
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.
ah - alright, I was doing that in the AlgorithmADK.hpp
but sure it would be clever to do the normalization there
8eb3fc1
to
f9b05ad
Compare
@@ -141,7 +141,7 @@ typedef bmpl::vector< | |||
interpolation<UsedField2Particle>, | |||
current<UsedParticleCurrentSolver>, | |||
#if(PARAM_IONIZATION == 1) | |||
ionizer<particles::ionization::BSI<PIC_Electrons> >, | |||
ionizer<particles::ionization::ADK<PIC_Electrons> >, |
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.
do you really want to use ADK by default if it still a bit slow?
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.
sorry, forgot that - will change it back
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.
np, thx :)
IonizationAlgorithm ionizeAlgo; | ||
ionizeAlgo( | ||
bField, eField, | ||
particle, (float_X)RandomGen() |
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.
please use static_cast<float_X>
or precisionCast<float_X>
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.
don't need to - I overlooked that the operator()
returns float_X
already
Seems like I have to do another rebase after all the changes in |
3b326be
to
58b6b78
Compare
💃 rebase me, yeah yeah yeah 🎶 |
97c627a
to
01c3479
Compare
cachedE, | ||
fieldEBlock | ||
); | ||
|
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.
please call __syncthreads();
heare to be sure that the shared memory operation before are finished.
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.
added below
* Omitting this results in the different GPUs receiving the same set of seeds | ||
* periodically where the period is the max. number of MPI ranks. | ||
*/ | ||
seed=seed<<16; |
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.
After #1046 is merged please remove this workaround.
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.
@n01r now merged, pls rebase and remove the work-around
Random number generation has been included.
A simplified version of the Ammosov-Delone-Krainov tunneling ionization model has been added. It is valid for hydrogen and hydrogenlike atoms.
- `ionization.hpp`: Add documentation to clarify the domain coordinates - `ionizationMehtods.hpp`: Use the correct cell index inside the local domain to improve seeding. Also added documentation. Shift the unique bits per GPU and species to the left before XORing with `currentStep` and `IONIZATION_SEED` to avoid losing uniqueness.
The random number generator only needs the cell coordinate in the local domain. This parameter was already passed to the RNG but named wrongly. Also: added another `__syncthreads()` in `ADK_Impl.hpp`
- `ionizationMethods.hpp`: - Removed workaround for good seed after merge of ComputationalRadiationPhysics#1046 - `utilities.hpp`: - Added EOF newline
c3d0b26
to
86fc053
Compare
@ax3l I removed the workaround, added an EOF newline where necessary, rebased, compiled, run-tested and re-pushed. |
great, thx! ✨ |
@@ -140,6 +140,7 @@ struct Hydrogen | |||
* For development purposes: --------------------------------------------- |
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.
this comment needs to be added to the general src/picongpu/include/simulation_defines/param/speciesDefinition.param
file - but we can postpone this until ionization leaves the in development state.
UpperMargin | ||
> BlockArea; | ||
|
||
BlockArea BlockDescription; |
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.
@ax3l Who checked this branch last year? ^^
This is not used. This is also in the current version.
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.
not used "any more" ;)
there was probably a magical state in between we can't see ^^
Added the first tunneling ionization model to PIConGPU.
It should be used on hydrogen-like atoms and ions and requires a random generator because it uses a Monte-Carlo method.
Do not merge before #874Feel free to also point out ideas for optimization and better handling of the random numbers.
Only the last commits after f030d45 ( "Small fixes pointed out by @PrometheusPi" ) are new
while the rest before is from #874.Update:
Ionization: update barrier suppression and energies #1022is merged