aboutsummaryrefslogtreecommitdiff
path: root/CarpetExtra/ReductionTest2/src/CoM.c
blob: f87a01519062405b913542379fbb897cd7142b4d (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
#include "cctk.h"
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"
#include "util_Table.h"
#include <assert.h>
#include <math.h>

void CoM2_Local(CCTK_ARGUMENTS)
{
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

  int i,j,k,index;

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

  for (k=0;k<nz;k++)
    for (j=0;j<ny;j++)
      for (i=0;i<nx;i++) {

	index = CCTK_GFINDEX3D(cctkGH,i,j,k);

	redvar[index] = 0.45e0;

      }
}