Kranc provides a Mathematica function called CreateThorn. The user must construct arguments and
data structures for this function describing the thorn they wish to create. Kranc generates code and
Cactus CCL files for:
- Declaring the grid functions which the simulation will use;
- Registering the grid functions for the evolved variables with the MoL thorn;
- Computing the right hand sides of evolution equations so that the time integrator can compute the evolved variables at the next time step;
- Computing finite differences, both using built-in definitions of standard centred finite differencing operators, as well as allowing the user to create customised operators;
- Performing a user-specified calculation at each point of the grid.
User-specified calculations will typically set certain grid variables as functions of others, and can be
used for various purposes including making a change of variables or computing intermediate or analysis
quantities from evolved variables.
The most important data structure in Kranc is a Calculation structure. It encapsulates the idea of
assigning new values to grid functions in a loop over grid points based upon evaluating expressions
involving other grid functions. Calculations contain lists of assignment statements for different grid
functions, and these are evaluated at each point on the grid. Calculations can also contain temporary
variables called shorthands into which are placed intermediate expressions which are used later in the
calculation. Calculations also contain additional information needed by the Kranc system, such as a
name for the calculation"
No comments:
Post a Comment