next up previous contents
Next: Overloadable and Registerable Functions Up: UsersGuideStable Previous: I/O Methods   Contents

GH Extensions

A GH extension is created by calling CCTK_RegisterGHExtension, with the name of the extension. This returns a unique handle that identifies the extension. (This handle can be retrieved at any time by a call to CCTK_GHExtensionHandle.)

Associated with a GH extension are three functions

SetupGH
this is used to actually create the data structure holding the extension. It is called when a new cGH is created.
InitGH
this is used to initialise the extension. It is called after the scheduler has been initialised on the cGH.
ScheduleTraverseGH
this is called whenever the schedule tree is due to be traversed on the GH. It should initialise the data on the cGH and the call CCTK_ScheduleTraverse to traverse the schedule tree.