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
|
#ifndef EXTENDING_HH
#define EXTENDING_HH
#include <set>
#include <string>
#include <vector>
#include "cctk.h"
namespace CarpetIOF5 {
using std::set;
using std::string;
using std::vector;
class extending_t {
static char const * const extension_name;
struct extension_t {
set<string> did_truncate;
// [mglevel][reflevel][variable];
vector<vector<vector<int> > > last_output_iteration;
};
extension_t * m_extension;
public:
static int
create (void * (* Setup) (tFleshConfig * config,
int convlevel,
cGH * cctkGH));
static void *
setup (cGH * cctkGH,
int (* OutputGH) (cGH const * cctkGH),
int (* TimeToOutput) (cGH const * cctkGH,
int variable),
int (* TriggerOutput) (cGH const * cctkGH,
int variable),
int (* OutputVarAs) (cGH const * cctkGH,
char const * varname,
char const * alias));
extending_t (cGH const * cctkGH);
bool
get_did_truncate (string name)
const;
void
set_did_truncate (string name);
int
get_last_output_iteration (int ml, int rl, int vi)
const;
void
set_last_output_iteration (int ml, int rl, int vi, int iteration);
private:
void
resize_last_output_iteration (int ml, int rl, int vi)
const;
};
} // namespace CarpetIOF5
#endif // #ifndef EXDENDING_HH
|