aboutsummaryrefslogtreecommitdiff
path: root/CarpetExtra/CarpetIntegrateTest/src/Local.cc
blob: bc66f5883fc44628854bab435c0f52c49626b28f (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
// $Header:$

#include <math.h>

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

#include "carpet.hh"
#include "defs.hh"
#include "vect.hh"

#include "util_Table.h"



extern "C" { CCTK_INT CarpetIntegrate_Local(CCTK_ARGUMENTS);
}

CCTK_INT CarpetIntegrate_Local(CCTK_ARGUMENTS)
{
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

  using namespace std;
  using namespace Carpet;

  int nx = cctk_lsh[0];
  int ny = cctk_lsh[1];
  int nz = cctk_lsh[2];

  for (int k=0;k<nz;k++) {
    for (int j=0;j<ny;j++) {
      for (int i=0;i<nx;i++) {
	int index = CCTK_GFINDEX3D(cctkGH,i,j,k);
        
	integrand[index] = 1;
      }
    }
  }
  
  return 0;
}