aboutsummaryrefslogtreecommitdiff
path: root/src/Startup.c
blob: bb3365b76ca77f7ee3c82be07ffdfd162fcc4b74 (plain)
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
93
94
95
96
97
98
99
100
101
102
 /*@@
   @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 *config, int convlevel, cGH *GH);
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.  We name the 
     GHextension "Symmetry" and get an  integer ("handle") 
     identifying the GHex.
   @enddesc 
   @calls     
   @calledby   
   @history 
 
   @endhistory 

@@*/

/* Store the handle in a global variable for the moment. */
int Symmetry_handle;


int SymmetryStartup(void) 
{
  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 ierr;
  int nerrors=0;

  ierr=CCTK_CoordRegisterSystem(3,"cart3d");
  ierr=CCTK_CoordRegisterSystem(3,"spher3d");

  ierr=CCTK_CoordRegisterData(1,"grid::x","x","cart3d");
  if (ierr<0)
  {
    CCTK_WARN(1,"Problem with registering coordinate x");
    nerrors--;
  }
  ierr=CCTK_CoordRegisterData(2,"grid::y","y","cart3d");
  if (ierr<0)
  {
    CCTK_WARN(1,"Problem with registering coordinate y");
    nerrors--;
  }
  ierr=CCTK_CoordRegisterData(3,"grid::z","z","cart3d");
  if (ierr<0)
  {
    CCTK_WARN(1,"Problem with registering coordinate z");
    nerrors--;
  }
  ierr=CCTK_CoordRegisterData(1,"grid::r","r","spher3d");
  if (ierr<0)
  {
    CCTK_WARN(1,"Problem with registering coordinate r");
    nerrors--;
  }

  return nerrors;
}