aboutsummaryrefslogtreecommitdiff
path: root/src/Initialisation.c
blob: edba79a4233bce16a5773ee59cabd871cfb81361 (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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
 /*@@
   @header    Initialisation.c
   @date      Thu Apr 25 22:58:03 2002
   @author    Tom Goodale
   @desc 
   Do all the lapse, shift, metric and curvature initialisation known about by
   ADMBase.   
   @enddesc
   @version $Header$
 @@*/

#include "cctk.h"

#include "cctk_Arguments.h"
#include "cctk_Parameters.h"

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

CCTK_FILEVERSION(CactusEinstein_ADMBase_Initialisation_c)

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

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

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

void ADMBase_CartesianMinkowski(CCTK_ARGUMENTS);
void ADMBase_LapseOne(CCTK_ARGUMENTS);
void ADMBase_ShiftZero(CCTK_ARGUMENTS);

void ADMBase_SetShiftStateOn(CCTK_ARGUMENTS);
void ADMBase_SetShiftStateOff(CCTK_ARGUMENTS);

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

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

/********************************************************************
 *********************     External Routines   **********************
 ********************************************************************/

/*@@
  @routine    ADMBase_CartesianMinkowski
  @date       Thu Apr 25 23:12:18 2002
  @author     Tom Goodale
  @desc 
  Scheduled routine to initialise the metric and extrinsic curvature to
  Minkowski space in cartesian coordinate values.
  @enddesc 
  @calls     
  @calledby   
  @history 
  
  @endhistory 
  
 @@*/
void ADMBase_CartesianMinkowski(CCTK_ARGUMENTS)
{
  int i;
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

  for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
  {
    gxx[i] = 1.0;
    gyy[i] = 1.0;
    gzz[i] = 1.0;

    gxy[i] = 0.0;
    gxz[i] = 0.0;
    gyz[i] = 0.0;

    kxx[i] = 0.0;
    kyy[i] = 0.0;
    kzz[i] = 0.0;

    kxy[i] = 0.0;
    kxz[i] = 0.0;
    kyz[i] = 0.0;
  }

}


/*@@
  @routine    ADMBase_LapseOne
  @date       Thu Apr 25 23:12:18 2002
  @author     Tom Goodale
  @desc 
  Scheduled routine to initialise the lapse to one.
  @enddesc 
  @calls     
  @calledby   
  @history 
  
  @endhistory 
  
 @@*/
void ADMBase_LapseOne(CCTK_ARGUMENTS)
{
  int i;
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

  for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
  {
    alp[i] = 1.0;
  }
}

/*@@
  @routine    ADMBase_ShiftZero
  @date       Thu Apr 25 23:12:18 2002
  @author     Tom Goodale
  @desc 
  Scheduled routine to initialise the shift to zero.
  @enddesc 
  @calls     
  @calledby   
  @history 
  
  @endhistory 
  
 @@*/
void ADMBase_ShiftZero(CCTK_ARGUMENTS)
{
  int i;
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

  for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
  {
    betax[i] = 1.0;
    betay[i] = 1.0;
    betaz[i] = 1.0;
  }

}

/*@@
  @routine    ADMBase_SetShiftStateOn
  @date       Thu Apr 25 23:12:18 2002
  @author     Tom Goodale
  @desc 
  Scheduled routine to set the value of the shift state to on.
  @enddesc 
  @calls     
  @calledby   
  @history 
  
  @endhistory 
  
 @@*/
void ADMBase_SetShiftStateOn(CCTK_ARGUMENTS)
{
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

  *shift_state = 1;
}

/*@@
  @routine    ADMBase_SetShiftStateOff
  @date       Thu Apr 25 23:12:18 2002
  @author     Tom Goodale
  @desc 
  Scheduled routine to set the value of the shift state to off.
  @enddesc 
  @calls     
  @calledby   
  @history 
  
  @endhistory 
  
 @@*/
void ADMBase_SetShiftStateOff(CCTK_ARGUMENTS)
{
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

  *shift_state = 0;
}



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