aboutsummaryrefslogtreecommitdiff
path: root/src/get_offset.c
blob: d1a35d962f4d2cf6cec05015e50cf636eee9e4e5 (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
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Functions.h"
#include "cctk_Parameters.h"

void CCTK_FCALL CCTK_FNAME(get_grid_offsets) (CCTK_INT *offset) {

  DECLARE_CCTK_PARAMETERS;

  int i, type;

  const CCTK_INT* shiftout_x_lower = (const CCTK_INT*) CCTK_ParameterGet ( "boundary_shiftout_x_lower", "coordbase", &type );
  if (shiftout_x_lower != NULL ) {
    offset[0] = *shiftout_x_lower;
  }
  const CCTK_INT* shiftout_x_upper = (const CCTK_INT*) CCTK_ParameterGet ( "boundary_shiftout_x_upper", "coordbase", &type );
  if (shiftout_x_upper != NULL ) {
    offset[1] = *shiftout_x_upper;
  }
  const CCTK_INT* shiftout_y_lower = (const CCTK_INT*) CCTK_ParameterGet ( "boundary_shiftout_y_lower", "coordbase", &type );
  if (shiftout_y_lower != NULL ) {
    offset[2] = *shiftout_y_lower;
  }
  const CCTK_INT* shiftout_y_upper = (const CCTK_INT*) CCTK_ParameterGet ( "boundary_shiftout_y_upper", "coordbase", &type );
  if (shiftout_y_upper != NULL ) {
    offset[3] = *shiftout_y_upper;
  }
  const CCTK_INT* shiftout_z_lower = (const CCTK_INT*) CCTK_ParameterGet ( "boundary_shiftout_z_lower", "coordbase", &type );
  if (shiftout_z_lower != NULL ) {
    offset[4] = *shiftout_z_lower;
  }
  const CCTK_INT* shiftout_z_upper = (const CCTK_INT*) CCTK_ParameterGet ( "boundary_shiftout_z_upper", "coordbase", &type );
  if (shiftout_z_upper != NULL ) {
    offset[5] = *shiftout_z_upper;
  }

  
}