The divisions of relax's source code

relax's source code can be divided into a few major categories: the initialisation code, the user interface (UI) code, the functional code, the number crunching code, the code storing the program state, the multi-processor, the auto-analyses, and the test suite.

Initialisation:
The code belonging to this section initialises the program, processes the command-line arguments, and determines what mode the program will be run in including the choice of the UI.
UI:
The current UI modes in relax include the prompt, the script and the GUI modes. These consist of separate code paths, all sitting on top of the underlying functional code. It includes the user function code with is shared by all UIs.
Functional code:
This code is the main part of the program. It includes anything which does not fit into the other sections and comprises the data pipe control code, the specific analysis code, and the relax library.
Number crunching:
The computationally expensive code belongs in this section. This also includes parts of the relax library as used by the target functions.
Program state:
Most of the state of the program is contained within the relax data store which is accessible from all parts of the program as a singleton object. Additional non-persistent state information is held in the relax status singleton object.
Multi-processor:
All relax execution passes through this interface which allows for uni-processor and OpenMPI multi-processor operations on code that has been specifically parallelised for this task.
Auto-analyses:
Although not shown in Figure 13.1, these are essentially advanced relax scripts to simplify data analyses for users.
Test suite:
This is where the majority of relax code is located. The relax test suite covers almost 100% of the functionality of relax. If code paths in relax are not tested in the test suite, they are considered equivalent to not existing. The extensive and almost complete coverage ensures that relax will be future-proof and continue to operate as expected.

Figure 13.1: The core design of relax.
\includegraphics[
width=\textwidth,
bb=57 273 447 750
]{images/core_design}

The relax user manual (PDF), created 2020-08-26.