aboutsummaryrefslogtreecommitdiff
path: root/ML_BSSN_Helper/src/UnsetCheckpointTags.c
blob: 3eaf347aa8966ec882cce176f7fc8f667fb0d97d (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
#include <cctk.h>
#include <util_Table.h>

#include <assert.h>

static void
unset_checkpoint_tag (int prolongate, char const * restrict gn);

int
ML_BSSN_UnsetCheckpointTags (void)
{
  unset_checkpoint_tag (1, "ADMBase::metric");
  unset_checkpoint_tag (1, "ADMBase::curv");
  unset_checkpoint_tag (1, "ADMBase::lapse");
  unset_checkpoint_tag (1, "ADMBase::shift");
  unset_checkpoint_tag (1, "ADMBase::dtlapse");
  unset_checkpoint_tag (1, "ADMBase::dtshift");
  
  unset_checkpoint_tag (0, "ML_BSSN::ML_cons_detg");
  unset_checkpoint_tag (0, "ML_BSSN::ML_cons_Gamma");
  unset_checkpoint_tag (0, "ML_BSSN::ML_cons_traceA");
  unset_checkpoint_tag (0, "ML_BSSN::ML_Ham");
  unset_checkpoint_tag (0, "ML_BSSN::ML_mom");
  unset_checkpoint_tag (0, "ML_BSSN::ML_curvrhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_dtlapserhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_dtshiftrhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_Gammarhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_lapserhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_log_confacrhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_metricrhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_shiftrhs");
  unset_checkpoint_tag (0, "ML_BSSN::ML_trace_curvrhs");
  
  return 0;
}

static void
unset_checkpoint_tag (int const prolongate, char const * restrict const gn)
{
  assert (gn);
  
  int const gi = CCTK_GroupIndex (gn);
  assert (gi >= 0);
  
  int const table = CCTK_GroupTagsTableI (gi);
  assert (table >= 0);
  
  int ierr;
  ierr = Util_TableSetString (table, "no", "Checkpoint");
  assert (! ierr);
  
  ierr = Util_TableSetString (table, "no", "Persistent");
  assert (! ierr);
  
  if (! prolongate) {
    ierr = Util_TableSetString (table, "none", "Prolongation");
    assert (! ierr);
  }
}