Next: The param.ccl File
Up: Configuring your Thorn
Previous: General Syntax of CCL
Contents
The interface.ccl File
The interface.ccl file is used to declare
- the implementation provided by the thorn
- the variables provided by the thorn
- the include files provided by the thorn
- the functions provided by the thorn (in development)
The implementation is declared by a single line at the top of the file
implements: <name>
Where <name> can be any combination of alphanumeric
characters and underscores, and is case independent.
There are three different access levels available for variables
- Public
- Can be `inherited' by other implementations (see below).
- Protected
- Can be shared with other implementations which declare themselves to
be friends of this one (see below).
- Private
- Can only be seen by this thorn.
Corresponding to the first two access levels there are two relationship
statements that can be used to get variables (actually groups of variables,
see below) from other implementations.
- Inherits: <name>
- This gets all Public variables from implementation <name>, and all
variables that <name> has in turn inherited.
An implementation may inherit from any number of other implementations.
- Friend: <name>
- This gets all Protected variables from implementation <name>, but,
unlike inherits, it is symmetric and also defines a transitive relation by
pushing its own implementation's Protected variables onto implementation
name. This keyword is used to define a group of implementations which
all end up with the same Protected variables.
So, for example, an interface.ccl starting
implements: wavetoy
inherits: grid
friend: wave_extract
declares that the thorn provides an implementation called wavetoy, gets
all the public variables declared by an implementation called grid,
and shares all protected variables with wave_extract and its
friends.
Cactus variables, described in Chapter B4, are placed
in groups with homogeneous attributes, where
the attributes describe properties such as the data type, group type,
dimension, ghostsize, number of timelevels, type of staggering and
distribution.
For example, a group, called realfields of 5 real grid
functions (phi, a,
b, c, d), on a 3D grid, would be defined by
CCTK_REAL realfields type=GF TimeLevels=3 Dim=3
{
phi
a,b,c,d
} "Example grid functions"
or, for a group called intfields consisting of just one
distributed 2D array of integers,
CCTK_INT intfields type=ARRAY size=xsize,ysize ghostsize=gxsize,gysize dim=2
{
anarray
} "My 2D arrays"
where xsize, ysize, gxsize, gysize are all
parameters defined in the thorn's param.ccl.
By default, all groups are private, to change this, an access
specification of the form public: or protected: (or
private: to change it back) may be placed on a line by itself. This
changes the access level for any group defined in the file from that point on.
All variables seen by any one thorn must have distinct names.
Next: The param.ccl File
Up: Configuring your Thorn
Previous: General Syntax of CCL
Contents
|