next up previous contents
Next: Parameters Up: Fortran Routines Previous: Fortran Routines   Contents

Variables

Any routine using Cactus argument lists (for example, all routines called from the scheduler at time bins between CCTK_STARTUP and CCTK_SHUTDOWN) should include at the top of the file the header

#include "cctk_Arguments.h"

A Cactus macro CCTK_ARGUMENTS is defined for each thorn to contain:

  • General information about the grid hierarchy, for example, the number of grid points used. See Section B7.2.3 for a complete list.
  • All the grid variables defined in the thorn's interface.ccl
  • All the grid variables required from other thorns as requested by the inherits and friend lines in the interface.ccl
These variables must be declared at the start of the routine using the macro DECLARE_CCTK_ARGUMENTS.

To pass the arguments to another routine in the same thorn use the macro CCTK_PASS_FTOF in the calling routine, and again the macro CCTK_ARGUMENTS in the receiving routine.

Note that you cannot use Cactus argument lists in routines scheduled at the CCTK_STARTUP and CCTK_SHUTDOWN time bins, because at this time no grid hierarchy exists.


next up previous contents
Next: Parameters Up: Fortran Routines Previous: Fortran Routines   Contents