UppASD is an open software simulation package for the study of the magnetization at the atomic scale.
The code is written mostly in FORTRAN 90, so please adhere to that standard. The code has been optimized mostly with the Intel Fortran Compiler in mind, making use of several of the functions and capabilities coming from Intel MKL. The code is of course compatible with other compilers, such as gfortran, but many of the optimizations done were not made with this compiler in mind.
- If you find a bug or are planning to add a feature write an issue about it. Of this way development can be traced, double work can be avoided and releases can be more easily managed.
- Please write informative commit messages. If you are addressing a given issue in the git, remember to refer to it in your comment.
- Be mindful to tests:
- If you introduce a new feature write a test about it.
UppASDuses the scripttests/bergtest.pyto handle its tests with its reference values are inyamlfiles found in thetestsfolder. - If you fix a bug or change a behaviour that alters the values from any test, make sure that this is correct before updating the defaults in the test suite.
- Make sure that your tests are added to the
.gitlab-ci.ymlto ensure that the CI/CD automatically runs your tests in the future.
- If you introduce a new feature write a test about it.
- Please try to use feature branches as much as possible during development.
- The
developbranch will keep the most up to date version of the code, with the latest changes pushed to it.- If you are implementing into develop remember to first
pullthe remote to the local, resolve conflicts, perform tests and thenpushyour changes. - The agreed
gitpractices for working indevelopare:- Write your changes.
- Perform
make asd-tests,make sld-tests,make gneb-testsandmake regression-test. - Perform
git pull. - Solve any conflicts.
- Perform
make asd-tests,make sld-tests,make gneb-testsandmake regression-testagain. - If everything is okay do
git commitand leave an explanatory comment of the changes. - After that
git push.
- If you are implementing into develop remember to first
UppASDis a code under constant development, to avoid divergence between branches, remember to update your local implementation as often as possible.- If you have a question the
UppASDyou can join the UppASD slack channel (contact the administrators about how to join) where you can always ask questions and discuss your ideas.
UppASD has the following conventions:
realnumbers are all ofkind=dblprec, wheredblprecis defined asselected_real_kind(15, 307). Write all float numbers asreal(dblprec). Float constants should thus be written like1.0_dblprecor1.0e-12_dblprec. Also avoid intrinsics with fixed kind, likedcos().- The indentation level is set to 3 spaces.
UppASDis not fixed format, so please adhere to that convention.- General mathematical functions that can be used by many subroutines should be added to the
math_functions.f90module found insource/Tools/.- Any function and or subroutine defined here must start as
f_dummy_name.
- Any function and or subroutine defined here must start as
- To define an array the following convention is used
real(dblprec), dimension(:,:,:), allocatable, optional, intent(in) :: dummy_1- Always indicate the
intentof the variable. - Pass the
dimensionoption explicitly whenever possible.
- Always indicate the
UppASDmakes use of Doxygen for automatic documentation, please document your routines.- Indicate a short description of the purpose of the piece of code with
@brief, a more detailed explanation when needed with@detailsand the authors of the code with@author. - Please use the
!<command to document all input/output variables for a routine.
- Indicate a short description of the purpose of the piece of code with
- Whenever writing a routine for
UppASDtry for it to be modular i.e. as self contained as possible. - Python code should be written in python3 following the PEP8 coding standard.
- Always test the code with the
make testscommand before pushing a revision to the repository.