Fortran applications using Fortran 2008+ features

Code based on Fortran 2018 (The elphbolt ab initio solver for the coupled electron-phonon Boltzmann transport equations)

link: https://arxiv.org/pdf/2109.08547.pdf

The coupled BTEs solver described above is implemented in Fortran 2018. This allows
us to make use of the object-oriented programming (OOP) support and the built-in
coarray functionality that provides concise, native syntax for parallelization. Specifi-
cally, we create the following 7 derived types: crystal, symmetry, numerics, electron,
phonon, epw wannier, and bte dealing with the components of the problem that the
names suggest. Each derived type contains its own data and procedures (functions and
subroutines). Apart from these, there are separate modules for immutable parameters, helper procedures, etc. This hybrid OOP/procedural design enables extensibility of the
code. Boilerplate getter and setter functions are generally avoided. Instead, the intent
and use, only keywords of Fortran are strictly used to control the read, write, and use
access of the different components of the code. This design strategy makes the code com-
pact (about 6700 lines) for what it offers and easily readable. As a general rule, code
repetition is avoided unless the generalizations lead to slow or physically unclear source.
We tried to strike a balance between the speed of development, execution, readability,
and extensibility.

3 Likes