PartMC  2.6.1
Coding Style

The code is mainly modern Fortran, with a few parts still clearly showing their Fortran 77 heritage. Fortran 2003 features are used heavily (especially allocatable array features). The code needs to be processed with cpp or a compatible pre-processor.

Object Oriented Fortran

Extensive use is made of Fortran 90 derived types. Derived types are named my_type_t and are generally defined in modules named pmc_my_type within files named my_type.F90. Almost all subroutines and function in each my_type.F90 file have names of the form my_type_*() and take an object of type my_type_t (called my_type) as the first argument on which to operate.

Module names are always the same as the name of the containing file, but prefixed with pmc_. Thus the module pmc_condense is contained in the file condense.F90.

Memory Management

The memory allocation policy is to always use allocatable arrays and to do the allocation in the lowest-level routine possible. Explicit allocate() and deallocate() statements are discouraged in favor of automatic memory management, where possible.