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

Improve style consistency #917

Open
MaxThevenet opened this issue Apr 12, 2023 · 0 comments
Open

Improve style consistency #917

MaxThevenet opened this issue Apr 12, 2023 · 0 comments
Labels
cleaning Code cleaning, avoid duplication, better naming, better style etc.

Comments

@MaxThevenet
Copy link
Member

MaxThevenet commented Apr 12, 2023

Similar patterns appear across the code, and are sometimes treated in different ways, which lacks consistency. This issue aims at identifying them and deciding on the way to treat each of them:

  1. A function needs to do something only if a condition is met. Do we put the condition outside the function (if (m_multi_plasma.IonizationOn() && m_do_tiling) m_multi_plasma.TileSort(bx, geom[lev]);) or in the function (see Fields::AddRhoIons)?
  2. A module can be ON or OFF. How do we test it? m_multi_plasma.IonizationOn() or do_MR or InSameTransverseCommunicator or m_multi_laser.m_use_laser?

This list is in construction. If we agree this is worth improving and decide on a convention, we would put this in the doc and slowly implement it in the code, when we stumble upon it. inconsistencies in naming conventions in the input file should be included too.

@MaxThevenet MaxThevenet added the cleaning Code cleaning, avoid duplication, better naming, better style etc. label Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning Code cleaning, avoid duplication, better naming, better style etc.
Projects
None yet
Development

No branches or pull requests

1 participant