User: zetienne Date: 2013/10/16 03:51 PM
Modified: /trunk/ interface.ccl /trunk/src/ InitSymBound.C, MoL_registration.C, apply_frozen_boundary_condition.C, compute_B_and_Bstagger_from_A.C, convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij.C, driver_conserv_to_prims.C, driver_evaluate_MHD_rhs.C, driver_prims_to_conserv.C, font_fix.C, mhdflux.C, output_BC_error.C, postinitialdata.C, reconstruct_set_of_prims_PPM.C, symmetry__set_gzs_staggered_gfs.C
Log: Improve compatibility with ET coding standards. Thanks to Roland Haas for the suggestions!
File Changes:
Directory: /trunk/src/ ======================
File [modified]: InitSymBound.C Delta lines: +2 -2 =================================================================== --- trunk/src/InitSymBound.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/InitSymBound.C 2013-10-16 20:51:11 UTC (rev 17) @@ -2,9 +2,9 @@ Set the symmetries for the IllinoisGRMHD variables */
-#include <stdio.h> -#include <stdlib.h> #include "cctk.h" +#include <cstdio> +#include <cstdlib> #include "cctk_Arguments.h" #include "cctk_Parameters.h" #include "Symmetry.h"
File [modified]: MoL_registration.C Delta lines: +3 -4 =================================================================== --- trunk/src/MoL_registration.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/MoL_registration.C 2013-10-16 20:51:11 UTC (rev 17) @@ -4,11 +4,10 @@ // To understand this, read documentation in arrangements/CactusBase/MoL/doc //--------------------------------------------------------------------------
-#include <stdio.h> -#include <math.h> -#include <stddef.h> - #include "cctk.h" +#include <cstdio> +#include <cmath> +#include <stddef.h> #include "cctk_Parameters.h" #include "cctk_Arguments.h"
File [modified]: apply_frozen_boundary_condition.C Delta lines: +6 -17 =================================================================== --- trunk/src/apply_frozen_boundary_condition.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/apply_frozen_boundary_condition.C 2013-10-16 20:51:11 UTC (rev 17) @@ -12,29 +12,22 @@ * shouldn't matter. ****************************************/
- -#include <stdio.h> -#include <stdlib.h> -#include <math.h> -#include <sys/time.h> #include "cctk.h" +#include <cstdio> +#include <cstdlib> +#include <cmath> +#include <sys/time.h> #include "cctk_Arguments.h" #include "cctk_Parameters.h" -#include "cctk_Math.h"
-extern "C" void CCTK_FCALL CCTK_FNAME(apply_frozen_boundary_condition) (CCTK_ARGUMENTS); - extern "C" void apply_frozen_boundary_condition(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS;
+ int levelnumber = GetRefinementLevel(cctkGH);
- int levelnumber = (int)( log((double)(cctk_levfac[0]))/log(2.0) + 1.e-5 ) + 1; + if(levelnumber==0) {
- //printf("LEVELNUM=%d %d\n",levelnumber,cctk_levfac[0]); - - if(levelnumber==1) { - for(int k=0;k<cctk_lsh[2];k++) for(int j=0;j<cctk_lsh[1];j++) for(int i=0;i<cctk_lsh[0];i++) { if(i<cctk_nghostzones[0] || i>cctk_lsh[0]-cctk_nghostzones[0]-1 || j<cctk_nghostzones[1] || j>cctk_lsh[1]-cctk_nghostzones[1]-1 || @@ -62,7 +55,3 @@ } } } - -extern "C" void CCTK_FCALL CCTK_FNAME(apply_frozen_boundary_condition) (CCTK_ARGUMENTS) { - apply_frozen_boundary_condition(CCTK_PASS_CTOC); -}
File [modified]: compute_B_and_Bstagger_from_A.C Delta lines: +4 -4 =================================================================== --- trunk/src/compute_B_and_Bstagger_from_A.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/compute_B_and_Bstagger_from_A.C 2013-10-16 20:51:11 UTC (rev 17) @@ -1,8 +1,8 @@ -#include <stdio.h> -#include <stdlib.h> -#include <math.h> +#include "cctk.h" +#include <cstdio> +#include <cstdlib> +#include <cmath> #include <sys/time.h> -#include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h"
File [modified]: convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij.C Delta lines: +1 -2 =================================================================== --- trunk/src/convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij.C 2013-10-16 20:51:11 UTC (rev 17) @@ -1,6 +1,5 @@ -#include <math.h> #include "cctk.h" -#include "cctk_Parameters.h" +#include <cmath>
void convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij(const cGH *cctkGH,const int *cctk_lsh, double *gxx,double *gxy,double *gxz,double *gyy,double *gyz,double *gzz,double *alp,
File [modified]: driver_conserv_to_prims.C Delta lines: +2 -2 =================================================================== --- trunk/src/driver_conserv_to_prims.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/driver_conserv_to_prims.C 2013-10-16 20:51:11 UTC (rev 17) @@ -25,13 +25,13 @@ * polytrope. */
+#include "cctk.h" #include <iostream> #include <iomanip> #include <fstream> #include <time.h> #include <sys/time.h> -#include <math.h> -#include "cctk.h" +#include <cmath> #include "cctk_Arguments.h" #include "cctk_Parameters.h" #include "Symmetry.h"
File [modified]: driver_evaluate_MHD_rhs.C Delta lines: +4 -4 =================================================================== --- trunk/src/driver_evaluate_MHD_rhs.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/driver_evaluate_MHD_rhs.C 2013-10-16 20:51:11 UTC (rev 17) @@ -34,11 +34,11 @@ * to have 3 ghostzones instead of 4. *********************************************/
-#include <stdio.h> -#include <stdlib.h> -#include <math.h> +#include "cctk.h" +#include <cstdio> +#include <cstdlib> +#include <cmath> #include <sys/time.h> -#include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" #include "GRMHD_params_not_for_params_dot_ccl.h"
File [modified]: driver_prims_to_conserv.C Delta lines: +4 -5 =================================================================== --- trunk/src/driver_prims_to_conserv.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/driver_prims_to_conserv.C 2013-10-16 20:51:11 UTC (rev 17) @@ -1,10 +1,9 @@ -#include <stdio.h> -#include <stdlib.h> -#include <math.h> +#include "cctk.h" +#include <cstdio> +#include <cstdlib> +#include <cmath> #include <sys/time.h> #include "Symmetry.h" -#include "cctk.h" -#include "cctk_Math.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" #include "harm_primitives_headers.h"
File [modified]: font_fix.C Delta lines: +3 -3 =================================================================== --- trunk/src/font_fix.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/font_fix.C 2013-10-16 20:51:11 UTC (rev 17) @@ -1,6 +1,6 @@ -#include <stdio.h> -#include <stdlib.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cmath> #include <iostream> #include <sys/time.h>
File [modified]: mhdflux.C Delta lines: +3 -3 =================================================================== --- trunk/src/mhdflux.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/mhdflux.C 2013-10-16 20:51:11 UTC (rev 17) @@ -3,9 +3,9 @@ // and S_i . //-----------------------------------------------------------------------------
-#include "stdio.h" -#include "stdlib.h" -#include "math.h" +#include <cstdio> +#include <cstdlib> +#include <cmath>
#define SQR(x) ((x) * (x))
File [modified]: output_BC_error.C Delta lines: +4 -4 =================================================================== --- trunk/src/output_BC_error.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/output_BC_error.C 2013-10-16 20:51:11 UTC (rev 17) @@ -1,8 +1,8 @@ -#include <stdio.h> -#include <stdlib.h> -#include <math.h> +#include "cctk.h" +#include <cstdio> +#include <cstdlib> +#include <cmath> #include <sys/time.h> -#include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h"
File [modified]: postinitialdata.C Delta lines: +2 -2 =================================================================== --- trunk/src/postinitialdata.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/postinitialdata.C 2013-10-16 20:51:11 UTC (rev 17) @@ -2,9 +2,9 @@ // Stuff to run right after initial data is set up //-------------------------------------------------
-#include "stdio.h" -#include "stdlib.h" #include "cctk.h" +#include <cstdio> +#include <cstdlib> #include "cctk_Arguments.h" #include "cctk_Functions.h" #include "cctk_Parameters.h"
File [modified]: reconstruct_set_of_prims_PPM.C Delta lines: +3 -3 =================================================================== --- trunk/src/reconstruct_set_of_prims_PPM.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/reconstruct_set_of_prims_PPM.C 2013-10-16 20:51:11 UTC (rev 17) @@ -7,9 +7,9 @@ * to have 3 ghostzones instead of 4. *****************************************/
-#include <stdio.h> -#include <stdlib.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cmath> #include <sys/time.h>
#define MINUS2 0
File [modified]: symmetry__set_gzs_staggered_gfs.C Delta lines: +2 -2 =================================================================== --- trunk/src/symmetry__set_gzs_staggered_gfs.C 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/src/symmetry__set_gzs_staggered_gfs.C 2013-10-16 20:51:11 UTC (rev 17) @@ -1,6 +1,6 @@ -#include "stdio.h" -#include "stdlib.h" #include "cctk.h" +#include <cstdio> +#include <cstdlib>
extern "C" void CCTK_FCALL CCTK_FNAME(IllinoisGRMHD_set_symmetry_gzs_staggered) (const cGH **cctkGH, const int *cctk_lsh,double *X,double *Y,double *Z,const int &Symmetry, double *gridfunc,
Directory: /trunk/ ==================
File [modified]: interface.ccl Delta lines: +9 -0 =================================================================== --- trunk/interface.ccl 2013-10-16 20:22:27 UTC (rev 16) +++ trunk/interface.ccl 2013-10-16 20:51:11 UTC (rev 17) @@ -173,3 +173,12 @@ USES FUNCTION Boundary_SelectVarForBC USES FUNCTION Boundary_SelectGroupForBC ########################################################################### + +######################################### +### Aliased functions from Carpet ### +######################################### + +CCTK_INT FUNCTION \ + GetRefinementLevel \ + (CCTK_POINTER_TO_CONST IN cctkGH) +USES FUNCTION GetRefinementLevel