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
|
/*@@
@file Boundary.c
@date Friday 18th July 2003
@author Gabrielle Allen
@desc
Use any provided boundary condition with WaveToy
@enddesc
@version $Id$
@@*/
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
#include "util_Table.h"
static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusWave_WaveToyExtra_Boundary_c);
/********************************************************************
********************* Local Data Types ***********************
********************************************************************/
/********************************************************************
********************* Local Routine Prototypes *********************
********************************************************************/
/********************************************************************
********************* Other Routine Prototypes *********************
********************************************************************/
void WaveToyExtra_Boundary(CCTK_ARGUMENTS);
/********************************************************************
********************* Local Data *****************************
********************************************************************/
static int handle=-1;
/********************************************************************
********************* External Routines **********************
********************************************************************/
/*@@
@routine WaveToyC_Boundary
@date Friday 18th July 2003
@author Gabrielle Allen
@desc
Mark wavetoy variables for custom boundary condition
@enddesc
@history
@endhistory
@@*/
void WaveToyExtra_Boundary(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
CCTK_INT ierr=0;
if (CCTK_EQUALS(bound,"custom"))
{
if (!CCTK_EQUALS(custom_options,""))
{
if (handle == -1)
{
handle = Util_TableCreateFromString(custom_options);
if (handle < 0)
{
CCTK_VWarn(0,__LINE__,__FILE__,CCTK_THORNSTRING,
"WaveToyC_Boundaries: Error creating table for "
"boundary condition %s",custom_bound);
}
}
}
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle,
"wavetoy::phi",custom_bound);
}
if (ierr < 0)
{
CCTK_VWarn(0,__LINE__,__FILE__,CCTK_THORNSTRING,
"WaveToyC_Boundaries: Error selecting boundary "
"condition %s",bound);
}
return;
}
/*@@
@routine WaveToyC_Terminate
@date Friday 18th July 2003
@author Gabrielle Allen
@desc
Tidy up wavetoy
@enddesc
@history
@endhistory
@@*/
void WaveToyC_Terminate(CCTK_ARGUMENTS)
{
Util_TableDestroy(handle);
}
|