-
Notifications
You must be signed in to change notification settings - Fork 230
Added AnalyticFluxDistribution class #5422
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
Added AnalyticFluxDistribution class #5422
Conversation
for more information, see https://pre-commit.ci
…shapoval/WarpX into add_analytic_flux_distribution
Python/pywarpx/picmi.py
Outdated
| species.add_new_group_attr(source_name, "density", density_scale) | ||
|
|
||
|
|
||
| class AnalyticFluxDistribution( |
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.
Is there a different way to handle this? This is an exact duplicate of UniformFluxDistribution except for the one keyword argument flux_expression.
This could be simplified if the picmistandard class took the same argument, flux, as the uniform distribution, then one could do "UniformFluxDistribution = AnalyticFluxDistribution" and have only one version of the class.
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.
Good point.
Note that we also have two different classes for the volume injection: UniformDistribution and AnalyticDistribution, so we were trying to mirror the same setup here for UniformFluxDistribution and AnalyticFluxDistribution.
Do you think that your comment also applies to UniformDistribution and AnalyticDistribution?
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.
Thanks for pointing this out, I will refactor accordingly.
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 UniformDistribution and AnalyticDistribution are quite a bit different from each other and it's probably too late to change that API.
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.
Is this PR ready? I still see the duplication of 'UniformFluxDistribution' - this is fine if that is the intent. Also, UniformFluxDistribution has the inject_from_embedded_boundary option - would that also be supported with the analytic distribution?
…be parsed as a function
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…shapoval/WarpX into add_analytic_flux_distribution
for more information, see https://pre-commit.ci
dpgrote
left a comment
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 looks good now. Thanks!
Added an AnalyticFluxDistribution class with a parsed
flux_expression. Depends on picmi-standard/picmi#121