1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
/*@@
@file Startup.c
@date Mon Mar 15 15:48:42 1999
@author Gerd Lanfermann
@desc
Startup file to register the GHextension and coordinates
@enddesc
@@*/
#include "cctk.h"
void *Symmetry_AllocGHex(tFleshConfig *, int, cGH *);
int Symmetry_InitGHex(cGH *GH);
/*@@
@routine SymmetryStartup
@date Mon Mar 15 15:49:16 1999
@author Gerd Lanfermann
@desc
Routine registers the Setup and Initialation routines for the
GHExtension, which holds the symmetry BCs.
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
/* Store the handle in a global variable for the moment. */
int Symmetry_handle;
int SymmetryStartup(void) {
/* we name the GHextension "Symmetry" and get an
integer identifying the GHex */
Symmetry_handle = CCTK_RegisterGHExtension("Symmetry");
/* Register the allocation and init routine */
CCTK_RegisterGHExtensionSetupGH(Symmetry_handle,Symmetry_AllocGHex);
CCTK_RegisterGHExtensionInitGH(Symmetry_handle,Symmetry_InitGHex);
return 0;
}
/*@@
@routine RegisterCartGrid3DCoords
@date
@author Gabrielle Allen
@desc
Routine registers the coordinates provided by CartGrid3D
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int RegisterCartGrid3DCoords(void)
{
int handle;
handle=CCTK_CoordRegister(1,"grid::x","x");
if (handle<0)
{
CCTK_WARN(1,"Problem with registering coordinate x");
}
handle=CCTK_CoordRegister(2,"grid::y","y");
if (handle<0)
{
CCTK_WARN(1,"Problem with registering coordinate y");
}
handle=CCTK_CoordRegister(3,"grid::z","z");
if (handle<0)
{
CCTK_WARN(1,"Problem with registering coordinate z");
}
handle=CCTK_CoordRegister(0,"grid::r","r");
if (handle<0)
{
CCTK_WARN(1,"Problem with registering coordinate r");
}
return 0;
}
|