/*@@ @file Bitant.c @date Tue Nov 2 08:10:56 CET 1999 @author Gabrielle Allen @desc Set up origin for bitant plane @enddesc @@*/ #include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" static char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusBase_CartGrid3D_Bitant_c) void bitant_byspacing(CCTK_ARGUMENTS, CCTK_REAL this_dx, CCTK_REAL this_dy, CCTK_REAL this_dz, CCTK_REAL *x_origin, CCTK_REAL *y_origin, CCTK_REAL *z_origin) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS if (CCTK_EQUALS(bitant_plane,"xy")) { if (no_origin && no_originx) { *x_origin = (0.5 - cctk_gsh[0]/2)*this_dx; } else { *x_origin = (- cctk_gsh[0]/2)*this_dx; } if (no_origin && no_originy) { *y_origin = (0.5 - cctk_gsh[1]/2)*this_dy; } else { *y_origin = (- cctk_gsh[1]/2)*this_dy; } if (no_origin && no_originz) { *z_origin = (- cctk_nghostzones[2]+0.5)*this_dz; } else { *z_origin = (- cctk_nghostzones[2])*this_dz; } } else if (CCTK_EQUALS(bitant_plane,"xz")) { if (no_origin && no_originx) { *x_origin = (0.5 - cctk_gsh[0]/2)*this_dx; } else { *x_origin = (- cctk_gsh[0]/2)*this_dx; } if (no_origin && no_originy) { *y_origin = (- cctk_nghostzones[1]+0.5)*this_dy; } else { *y_origin = (- cctk_nghostzones[1])*this_dy; } if (no_origin && no_originz) { *z_origin = (0.5 - cctk_gsh[2]/2)*this_dz; } else { *z_origin = (- cctk_gsh[2]/2)*this_dz; } } else if (CCTK_EQUALS(bitant_plane,"yz")) { if (no_origin && no_originx) { *x_origin = (- cctk_nghostzones[0]+0.5)*this_dx; } else { *x_origin = (- cctk_nghostzones[0])*this_dx; } if (no_origin && no_originy) { *y_origin = (0.5 - cctk_gsh[1]/2)*this_dy; } else { *y_origin = (- cctk_gsh[1]/2)*this_dy; } if (no_origin && no_originz) { *z_origin = (0.5 - cctk_gsh[2]/2)*this_dz; } else { *z_origin = (- cctk_gsh[2]/2)*this_dz; } } return; }