blob: 85090e4e83ee56707dc9d4453a94660424eaa3a1 (
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
|
#ifndef CARPET_PUBLIC_H
#define CARPET_PUBLIC_H
#include <mpi.h>
#include "cctk.h"
/* Tell thorns that the Carpet routines exist */
#define HAVE_CARPET
#ifdef __cplusplus
namespace Carpet {
extern "C" {
#endif
/* Carpet's GH extension */
struct CarpetGH {
#if 0
/* Maximum number of refinement levels */
int maxreflevels;
/* Refinement levels */
int reflevels;
/* Refinement factor */
int reffact;
/* Refinement factor on finest possible grid */
int maxreflevelfact;
/* Base multigrid level */
int basemglevel;
/* Multigrid levels */
int mglevels;
/* Multigrid factor */
int mgfact;
/* Multigrid factor on coarsest grid */
int maxmglevelfact;
#endif
/* Maps */
int maps;
#if 0
/* Current position on the grid hierarchy */
int reflevel;
int mglevel;
#endif
int map;
#if 0
int component;
/* Current refinement factor */
int reflevelfact;
/* Current multigrid factor */
int mglevelfact;
#endif
#if 0
/* Number of buffer zones */
int const * nbufferzones;
#endif
};
struct CarpetGH const * GetCarpetGH (const cGH * const cgh);
/* Prolongation management */
CCTK_INT CarpetEnableProlongating (const CCTK_INT flag);
CCTK_INT CarpetQueryProlongating (void);
/* Call a schedule group */
int CallScheduleGroup (cGH * const cgh, const char * const group);
/* Call a local function */
int CallLocalFunction (cGH * const cgh,
void (* const function) (cGH * const cgh));
int CallSinglemapFunction (cGH * const cgh,
void (* const function) (cGH * const cgh));
int CallLevelFunction (cGH * const cgh,
void (* const function) (cGH * const cgh));
int CallGlobalFunction (cGH * const cgh,
void (* const function) (cGH * const cgh));
int CallMetaFunction (cGH * const cgh,
void (* const function) (cGH * const cgh));
/* Helper functions */
MPI_Comm CarpetMPIComm (void);
MPI_Datatype CarpetMPIDatatype (int vartype);
MPI_Datatype CarpetSimpleMPIDatatype (int vartype);
int CarpetSimpleMPIDatatypeLength (int vartype);
#ifdef __cplusplus
} /* extern "C" */
} /* namespace Carpet */
#endif
#endif /* !defined(CARPET_PUBLIC_H) */
|