XSHELLS 2.8 : User Manual

Chapter 4 Hacking

4.1 Main source files

The main programs (xsbig, xsbig_mpi and xsbig_hyb) all share the same source code:

  • xshells_big.cpp is the main source file, including the main loop, and all the solver logic.

  • xshells.hpp is where a lot of customization goes on. See section 2.2.

  • grid.cpp contains functions related to the radial grid and to the banded matrix linear solver.

  • xshells_spectral.cpp contains the definition of the classes used to describe spectral fields (scalar and vector), and the implementation of most associated methods.

  • xshells_io.cpp contains methods and functions to load and store fields to file on disk.

  • xshells_physics.cpp generation of evolution matrices and computation of physical quantities.

  • xshells_init.cpp initialization functions and predefined fields.

  • findiff.cpp finite difference derivatives.

  • xshells_linop.cpp Linear operators (banded matrices) and solvers.

  • xshells_stepper.cpp Support of various time-steppers.

  • xshells_sparse.cpp To handle the Coriolis force implicitely, we rely to large sparse matrices.

The post-processing program xspp uses the previous source files but also:

  • xspp.cpp as main source file (instead of xshells_big.cpp)

  • xshells_spatial.cpp contains the definition of the classes used to describe spatial fields (scalar and vector), their relationship with spectral representation and associated methods.

  • xshells_render.cpp contains method implementations for rendering fields on grids and slices, as well as output to hdf5 files.

4.2 Doxygen

The source code also contains Doxygen documentation comments. Run make docs to generate the documentation targeted at developers and contributors in the doc/html/ folder.

4.3 Git repository

To track the changes to the code, the distributed version control system git is used. Two repositories exist.

Both allow to fork it and merge requests are welcome.