Implementation of Maxwell Juettner distribution,
Closes #4814
- [x] rebase against dev branch after #4820 is merged
[added by @PrometheusPi]
Velocity distribution for highly relativistic particle temperatures. For this see MaxwellJuettner.hpp and MaxwellJuetner.def.
For verification, a temperature of 10MeV was used.
For some reason, the CI files with some python style issue - code that you did not touch. I will retrigger the CI.
@SergeyKonstantinErmakov the CI complains because you are using an old dev as the base for your pull request(PR) and that is what the CI checks. Please rebase your PR to the current dev.
@SergeyKonstantinErmakov This pull request failed with a formatting issue, but I do not see in the logs why clang format changed.
For me this error looks like a CI issue and not a common clang format error (which gives the not code style conform code lines). Could you have a look @psychocoderHPC and @chillenzer ?
Nope, that's a real formatting issue. Following steps will give you a passing CI (see https://picongpu.readthedocs.io/en/latest/dev/docs/COMMIT.html for details):
# install pre-commit if not yet done
cd /path/to/repo
git checkout add_MaxwellJuettner
pre-commit install
pre-commit run --all-files
git add -u
git commit -m "Fix formatting issues"
git push
PS: As an explanation, clang-format is run within pre-commit since #4817. Which would "report" the necessary changes by editing the files themselves (just like a local run of clang-format would do). In the CI these local changes are wiped out immediately afterwards, so that is not particularly helpful, I agree. pre-commit has better ways to handle this that we currently do not leverage because they are not quite aligned with how we handle CI.
PS: As an explanation,
clang-formatis run withinpre-commitsince #4817. Which would "report" the necessary changes by editing the files themselves (just like a local run ofclang-formatwould do). In the CI these local changes are wiped out immediately afterwards, so that is not particularly helpful, I agree.pre-commithas better ways to handle this that we currently do not leverage because they are not quite aligned with how we handle CI.
@chillenzer can we run git diff in the CI in case a test fails? To show the broken lines?
Thanks to everyone for suggestions and comments! These will be implemented ASAP.
Hi @SergeyKonstantinErmakov, in case you forgot about this pull request: The clang format issue is still open.
Hi @SergeyKonstantinErmakov, what's the status of this pull request?
@SergeyKonstantinErmakov I removed all files that should not be part of this PR, rebased, formatted the code, and squashed all into a single commit. I committed all under your credentials.
in general @SergeyKonstantinErmakov could you rerun the your tests/provide your test scripts to verify the distribution of the current version?
Also the distribution seems to deviate for low energies, do we know why? No Accusation just a a honest question
Great Question! You can find the answer in the paper which I used as a basis for this implementation https://doi.org/10.1063/1.4919383 under Sobols Method. They explicitly state bad convergence for small energies which essentially comes from one of the approximations for the distribution which they have made (for details see paper), which only agrees for large values. Since Maxwell Juettner is used for high temperatures only, this is not an issue. I determined that the convergence becomes significantly worse below 10 keV energies. For energies below this level, I suggest using Maxwell Boltzmann. Maybe this is something which I should document, thanks for pointing that out!
PS: push will follow next thursday :)
@SergeyKonstantinErmakov ping!, gentle reminder ;)
@SergeyKonstantinErmakov Could we finish this pull request this week together?
@psychocoderHPC you can review a second time
ping @PrometheusPi