aboutsummaryrefslogtreecommitdiff
path: root/src/getlevelinfo.cc
blob: 4b68abb7dd34b945d2bb6961f106c1de5b8f10f1 (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
/* $Header$ */

#include <cstdio>
#include <cmath>

#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
#include "cctk_DefineThorn.h"

#include "carpet.hh"

namespace NoExcision {

#ifdef HAVE_CARPET
  using namespace Carpet;
#endif

  extern "C"
    void NoExcision_levelinfo(const cGH * cctkGH,
                              CCTK_INT * my_level,
                              CCTK_INT * n_levels)
    {

      *my_level = 0;
      *n_levels = 1;

#ifdef HAVE_CARPET

      if ( CCTK_IsThornActive ( "Carpet" ) ) {
        *my_level = reflevel;
        *n_levels = reflevels;
      } 
     
#endif

    }

  extern "C"
    CCTK_FCALL void CCTK_FNAME (NoExcision_levelinfo) (CCTK_POINTER_TO_CONST * cctkGH, CCTK_INT * my_level, CCTK_INT * n_levels)
    {
      NoExcision_levelinfo((const cGH *)* cctkGH,  my_level, n_levels);
    }

} // namespace NoExcision