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
|
/*@@
@file Counter.c
@date Mon May 20 09:52:33 2002
@author Ian Hawke
@desc
Routines setting and altering the loop counter.
@enddesc
@version $Header$
@@*/
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
static const char *rcsid = "$Header$";
CCTK_FILEVERSION(AlphaThorns_MoL_Counter_c);
/********************************************************************
********************* Local Data Types ***********************
********************************************************************/
/********************************************************************
********************* Local Routine Prototypes *********************
********************************************************************/
/********************************************************************
***************** Scheduled Routine Prototypes *********************
********************************************************************/
int MoL_SetCounter(CCTK_ARGUMENTS);
int MoL_DecrementCounter(CCTK_ARGUMENTS);
/********************************************************************
********************* Other Routine Prototypes *********************
********************************************************************/
/********************************************************************
********************* Local Data *****************************
********************************************************************/
/********************************************************************
********************* External Routines **********************
********************************************************************/
/*@@
@routine MoL_SetCounter
@date Mon May 20 09:54:39 2002
@author Ian Hawke
@desc
Initially set the counter to the number of intermediate steps.
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int MoL_SetCounter(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
CCTK_REAL *Var;
/*
// Var = CCTK_VarDataPtr(cctkGH,0,"adm_bssn::ADM_BS_gxx");
Var = CCTK_VarDataPtr(cctkGH,0,"wavetoymol::phi");
printf("MoL:Counter. Level %d. Variable %g\n",cctk_levfac[0],Var[0]);
// Var = CCTK_VarDataPtr(cctkGH,1,"adm_bssn::ADM_BS_gxx");
Var = CCTK_VarDataPtr(cctkGH,1,"wavetoymol::phi");
printf("\n\nMoL:Counter. Level %d. Variable %g\n\n",cctk_levfac[0],Var[0]);
*/
*MoL_Intermediate_Step = MoL_Intermediate_Steps;
return 0;
}
/*@@
@routine MoL_DecrementCounter
@date Mon May 20 09:55:13 2002
@author Ian Hawke
@desc
During the loop decrement the counter
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int MoL_DecrementCounter(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
(*MoL_Intermediate_Step) --;
return 0;
}
/********************************************************************
********************* Local Routines *************************
********************************************************************/
|