Development guidelines

From Warpx

Jump to: navigation, search

When writing new code for WarpX, or editing existing code, please follow the guidelines as closely as possible. Do not think that these guidelines are meant to get into your way, but they have proven to be very valuable in the past and it is best to stick to practices which work, rather than invent something new for every new researcher working on the code.

Always keep in mind that even small changes impact all of us.

  • You must use the same formatting as used in the rest of WarpX. Emacs is the recommended editor. Please copy and paste the indentation code for emacs into your .emacs file. You can find this on the Code formatting and editing standards page.
  • If you are modifying core code, like the solvers or the library code or very important equations like Maxwell or Euler, you must branch. Work in the branch, once you are satisfied it works then merge in. Instructions on how to branch and how to merge are in the WarpX FAQs. Obviously you do not need to branch when making harmless fixes or if your work does not impact all of us.
  • As a good practice (though not required) please ask someone else to look over your changes. Another pair of eyes will help you find bugs faster and improve the quality of your work. One hesitation here may be that others may not have time for this. However, it usually only takes a few minutes to glance over the code.
  • You must avoid any changes which involve changing the input file. The reason is that we have many, many input files already written and changing all of them would be a major pain. Of course, if this is the only solution we should not hesitate to take it.
  • If you do make a major change please email everyone about this. Even small change in core code can impact all of us.
Personal tools