aboutsummaryrefslogtreecommitdiff
path: root/src/Register.c
blob: d7c8a305031fd90094ad53ef99e8631b5db6e144 (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
 /*@@
   @file      Register.c
   @date      Sat Oct 26 22:39:40 CEST 2002
   @author    David Rideout
   @desc 
              Register implemented boundary conditions.
   @enddesc 
   @version   $Header$
 @@*/

#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
#include "util_Table.h"
#include "Boundary.h"

static const char *rcsid = "$Header$";

CCTK_FILEVERSION(CactusBase_Boundary_Register_c);

/********************************************************************
 *********************     Local Data Types   ***********************
 ********************************************************************/

/********************************************************************
 ********************* Local Routine Prototypes *********************
 ********************************************************************/

void Boundary_RegisterBCs(CCTK_ARGUMENTS);

/********************************************************************
 ***************** Aliased Routine Prototypes ***********************
 ********************************************************************/

/********************************************************************
 ***************** Scheduled Routine Prototypes *********************
 ********************************************************************/

/********************************************************************
 ********************* Other Routine Prototypes *********************
 ********************************************************************/

/********************************************************************
 *********************     Local Data   *****************************
 ********************************************************************/

/********************************************************************
 *********************     Aliased Routines   ***********************
 ********************************************************************/

/********************************************************************
 *********************     Scheduled Routines   *********************
 ********************************************************************/

 /*@@
   @routine    Boundary_RegisterBCs
   @date       Sun Nov  3 19:51:37 CET 2002
   @author     David Rideout
   @desc 
               Register all boundary conditions implemented by this thorn.
   @enddesc 
   @calls      
   @history 
   @endhistory
   @var        CCTK_ARGUMENTS
   @vdesc      Cactus argument list
   @vtype      CCTK_*
   @vio        in
   @endvar
   @returntype void
@@*/

void Boundary_RegisterBCs(CCTK_ARGUMENTS) {
  DECLARE_CCTK_PARAMETERS;
  int err;  

  if (register_scalar)
  {
    err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, 
                                      (phys_bc_fn_ptr) &BndScalar, 
                                      "Scalar");
    if (err)
    {
      CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
                 "Error %d when registering routine to handle \"Scalar\" "
                 "boundary condition", err);
    }
  }

  if (register_flat)
  {
    err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, 
                                      (phys_bc_fn_ptr) &BndFlat, 
                                      "Flat");
    if (err)
    {
      CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
                 "Error %d when registering routine to handle \"Flat\" "
                 "boundary condition", err);
    }
  }

  if (register_radiation)
  {
    err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, 
                                      (phys_bc_fn_ptr) &BndRadiative, 
                                      "Radiation");
    if (err)
    {
      CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
                 "Error %d when registering routine to handle \"Radiation\" "
                 "boundary condition", err);
    }
  }

  if (register_copy)
  {
    err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, 
                                      (phys_bc_fn_ptr) &BndCopy, 
                                      "Copy");
    if (err)
    {
      CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
                 "Error %d when registering routine to handle \"Copy\" "
                 "boundary condition", err);
    }
  }

  if (register_robin)
  {
    err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, 
                                      (phys_bc_fn_ptr) &BndRobin,
                                      "Robin");
    if (err)
    {
      CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
                 "Error %d when registering routine to handle \"Robin\" "
                 "boundary condition", err);
    }
  }

  if (register_static)
  {
    err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, 
                                      (phys_bc_fn_ptr) &BndStatic,
                                      "Static");
    if (err)
    {
      CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
                 "Error %d when registering routine to handle \"Static\" "
                 "boundary condition", err);
    }
  }

  if (register_none)
  {
    err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, 
                                      (phys_bc_fn_ptr) &BndNone, 
                                      "None");
    if (err)
    {
      CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
                 "Error %d when registering routine to handle \"None\" "
                 "boundary condition", err);
    }
  }
}

/********************************************************************
 *********************     Local Routines   *************************
 ********************************************************************/