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
|
/*@@
@file GRHydro_RegisterMask.c
@date Sun Jan 26 01:55:25 2003
@author Ian Hawke
@desc
Routines to register states with SpaceMask.
@enddesc
@@*/
#include "cctk.h"
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"
#include "SpaceMask.h"
#include <stdio.h>
#include <stdlib.h>
/*@@
@routine GRHydro_RegisterMask
@date Sun Jan 26 01:56:06 2003
@author
@desc
Register the different mask states with the SpaceMask thorn.
At the moment, the recognized states and values are
Hydro_Atmosphere (in_atmosphere, not_in_atmosphere)
Hydro_RiemannProblem (trivial, not_trivial)
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int GRHydro_RegisterMask(void)
{
DECLARE_CCTK_PARAMETERS;
int ierr;
const char *atmosphere_list[2] = {"in_atmosphere","not_in_atmosphere"};
const char *rp_list[2] = {"trivial","not_trivial"};
ierr = SpaceMask_RegisterType("Hydro_Atmosphere", 2, atmosphere_list);
if (ierr)
{
CCTK_WARN(0, "Failed to register the atmosphere with the mask!");
}
ierr = SpaceMask_RegisterType("Hydro_RiemannProblemX", 2, rp_list);
if (ierr)
{
CCTK_WARN(0, "Failed to register the x Riemann Problem with the mask!");
}
ierr = SpaceMask_RegisterType("Hydro_RiemannProblemY", 2, rp_list);
if (ierr)
{
CCTK_WARN(0, "Failed to register the y Riemann Problem with the mask!");
}
ierr = SpaceMask_RegisterType("Hydro_RiemannProblemZ", 2, rp_list);
if (ierr)
{
CCTK_WARN(0, "Failed to register the z Riemann Problem with the mask!");
}
return 0;
}
void GRHydro_SetupDescriptors(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
*atmosphere_field_descriptor=SpaceMask_GetTypeBits("Hydro_Atmosphere");
*atmosphere_atmosp_descriptor=SpaceMask_GetStateBits("Hydro_Atmosphere",
"in_atmosphere");
*atmosphere_normal_descriptor = SpaceMask_GetStateBits("Hydro_Atmosphere",
"not_in_atmosphere");
}
|