[Commits] [svn:einsteintoolkit] IllinoisGRMHD/trunk/ (Rev. 15)

zachetie at gmail.com zachetie at gmail.com
Wed Oct 16 15:15:20 CDT 2013


User: zetienne
Date: 2013/10/16 03:15 PM

Modified:
 /trunk/
  interface.ccl
 /trunk/src/
  apply_frozen_boundary_condition.C, compute_B_and_Bstagger_from_A.C, driver_conserv_to_prims.C, driver_evaluate_MHD_rhs.C, driver_prims_to_conserv.C

Log:
 IllinoisGRMHD inherits from Tmunubase, which in turn inherits from StaticConformal. IllinoisGRMHD needs & modifies a variable called psi, that is defined by StaticConformal. To avoid stepping on StaticConformal's toes, I replaced all references to psi with references to a variable called psi_bssn, which IllinoisGRMHD now uses instead of the variable called psi.

File Changes:

Directory: /trunk/src/
======================

File [modified]: apply_frozen_boundary_condition.C
Delta lines: +1 -1
===================================================================
--- trunk/src/apply_frozen_boundary_condition.C	2013-10-16 19:50:41 UTC (rev 14)
+++ trunk/src/apply_frozen_boundary_condition.C	2013-10-16 20:15:20 UTC (rev 15)
@@ -42,7 +42,7 @@
 	    // FIXME: the following line (commented out) yields the following error message from 
 	    //    the Intel compiler (icpc) v 13.1.3 20130607 .
 	    //    error: name followed by "::" must be a class or namespace name
-	    //if(isnan(mhd_st_x_p[index])) {printf("BAD\n");exit(1);}
+	    if(std::isnan(mhd_st_x_p[index])) {printf("BAD\n");exit(1);}
 	  }
 	}
   }

File [modified]: compute_B_and_Bstagger_from_A.C
Delta lines: +5 -5
===================================================================
--- trunk/src/compute_B_and_Bstagger_from_A.C	2013-10-16 19:50:41 UTC (rev 14)
+++ trunk/src/compute_B_and_Bstagger_from_A.C	2013-10-16 20:15:20 UTC (rev 15)
@@ -39,7 +39,7 @@
     for(int j=0;j<cctk_lsh[1];j++)
       for(int i=0;i<cctk_lsh[0];i++) {
 	int index=CCTK_GFINDEX3D(cctkGH,i,j,k);
-	psi[index] = exp(phi[index]);
+	psi_bssn[index] = exp(phi[index]);
       }
 
 #pragma omp parallel for
@@ -60,7 +60,7 @@
 
 	int actual_index = CCTK_GFINDEX3D(cctkGH,i,j,k);
 
-	double Psi = psi[actual_index];
+	double Psi = psi_bssn[actual_index];
 	double Psim3 = 1.0/(Psi*Psi*Psi);
 
 	// For the lower boundaries, the following applies a "copy" 
@@ -87,7 +87,7 @@
 	// Now multiply Bx and Bx_stagger by 1/sqrt(gamma(i+1/2,j,k)]) = 1/sqrt(1/2 [gamma + gamma_ip1]) = exp(-6 x 1/2 [phi + phi_ip1] )
 	int imax_minus_i = (cctk_lsh[0]-1)-i;
 	int indexip1jk = CCTK_GFINDEX3D(cctkGH,i + ( (imax_minus_i > 0) - (0 > imax_minus_i) ),j,k);
-	double Psi_ip1 = psi[indexip1jk];
+	double Psi_ip1 = psi_bssn[indexip1jk];
 	Bx_stagger[actual_index] *= Psim3/(Psi_ip1*Psi_ip1*Psi_ip1);
 
 	/**************/
@@ -103,7 +103,7 @@
 	// Now multiply By and By_stagger by 1/sqrt(gamma(i,j+1/2,k)]) = 1/sqrt(1/2 [gamma + gamma_jp1]) = exp(-6 x 1/2 [phi + phi_jp1] )
 	int jmax_minus_j = (cctk_lsh[1]-1)-j;
 	int indexijp1k = CCTK_GFINDEX3D(cctkGH,i,j + ( (jmax_minus_j > 0) - (0 > jmax_minus_j) ),k);
-	double Psi_jp1 = psi[indexijp1k];
+	double Psi_jp1 = psi_bssn[indexijp1k];
 	By_stagger[actual_index] *= Psim3/(Psi_jp1*Psi_jp1*Psi_jp1);
 
 
@@ -120,7 +120,7 @@
 	// Now multiply Bz_stagger by 1/sqrt(gamma(i,j,k+1/2)]) = 1/sqrt(1/2 [gamma + gamma_kp1]) = exp(-6 x 1/2 [phi + phi_kp1] )
 	int kmax_minus_k = (cctk_lsh[2]-1)-k;
 	int indexijkp1 = CCTK_GFINDEX3D(cctkGH,i,j,k + ( (kmax_minus_k > 0) - (0 > kmax_minus_k) ));
-	double Psi_kp1 = psi[indexijkp1];
+	double Psi_kp1 = psi_bssn[indexijkp1];
 	Bz_stagger[actual_index] *= Psim3/(Psi_kp1*Psi_kp1*Psi_kp1);
 	
 

File [modified]: driver_conserv_to_prims.C
Delta lines: +2 -2
===================================================================
--- trunk/src/driver_conserv_to_prims.C	2013-10-16 19:50:41 UTC (rev 14)
+++ trunk/src/driver_conserv_to_prims.C	2013-10-16 20:15:20 UTC (rev 15)
@@ -42,7 +42,7 @@
                                                                    double *gxx,double *gxy,double *gxz,double *gyy,double *gyz,double *gzz,double *alp,
                                                                    double *gtxx,double *gtxy,double *gtxz,double *gtyy,double *gtyz,double *gtzz,
                                                                    double *gtupxx,double *gtupxy,double *gtupxz,double *gtupyy,double *gtupyz,double *gtupzz,
-                                                                   double *phi,double *psi,double *lapm1);
+                                                                   double *phi,double *psi_bssn,double *lapm1);
 
 
 #define SQR(x) ((x) * (x))
@@ -59,7 +59,7 @@
   convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij(cctkGH,cctk_lsh,  gxx,gxy,gxz,gyy,gyz,gzz,alp,
                                                                 gtxx,gtxy,gtxz,gtyy,gtyz,gtzz,
                                                                 gtupxx,gtupxy,gtupxz,gtupyy,gtupyz,gtupzz,
-                                                                phi,psi,lapm1);
+                                                                phi,psi_bssn,lapm1);
 
   if(Symmetry==1) {
     // SET SYMMETRY GHOSTZONES ON ALL CONSERVATIVE VARIABLES!

File [modified]: driver_evaluate_MHD_rhs.C
Delta lines: +16 -16
===================================================================
--- trunk/src/driver_evaluate_MHD_rhs.C	2013-10-16 19:50:41 UTC (rev 14)
+++ trunk/src/driver_evaluate_MHD_rhs.C	2013-10-16 20:15:20 UTC (rev 15)
@@ -96,12 +96,12 @@
   convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij(cctkGH,cctk_lsh,  gxx,gxy,gxz,gyy,gyz,gzz,alp,
 								gtxx,gtxy,gtxz,gtyy,gtyz,gtzz,
 								gtupxx,gtupxy,gtupxz,gtupyy,gtupyz,gtupzz,
-								phi,psi,lapm1);
+								phi,psi_bssn,lapm1);
 
   double *metric[NUMVARS_FOR_METRIC_FACEVALS]; // "metric" here is array of pointers to the actual gridfunctions.
   ww=0;
   metric[ww]=phi;   ww++;
-  metric[ww]=psi;   ww++;
+  metric[ww]=psi_bssn;   ww++;
   metric[ww]=gtxx;  ww++;
   metric[ww]=gtxy;  ww++;
   metric[ww]=gtxz;  ww++;
@@ -464,20 +464,20 @@
   // We need A^i, but only have A_i. So we add gtupij to the list of input variables.
   double *interp_vars[MAXNUMINTERP];
   int w=0;
-  interp_vars[w]=betax;  w++;
-  interp_vars[w]=betay;  w++;
-  interp_vars[w]=betaz;  w++;
-  interp_vars[w]=gtupxx; w++;
-  interp_vars[w]=gtupxy; w++;
-  interp_vars[w]=gtupxz; w++;
-  interp_vars[w]=gtupyy; w++;
-  interp_vars[w]=gtupyz; w++;
-  interp_vars[w]=gtupzz; w++;
-  interp_vars[w]=psi;    w++;
-  interp_vars[w]=lapm1;  w++;
-  interp_vars[w]=Ax;     w++;
-  interp_vars[w]=Ay;     w++;
-  interp_vars[w]=Az;     w++;
+  interp_vars[w]=betax;   w++;
+  interp_vars[w]=betay;   w++;
+  interp_vars[w]=betaz;   w++;
+  interp_vars[w]=gtupxx;  w++;
+  interp_vars[w]=gtupxy;  w++;
+  interp_vars[w]=gtupxz;  w++;
+  interp_vars[w]=gtupyy;  w++;
+  interp_vars[w]=gtupyz;  w++;
+  interp_vars[w]=gtupzz;  w++;
+  interp_vars[w]=psi_bssn;w++;
+  interp_vars[w]=lapm1;   w++;
+  interp_vars[w]=Ax;      w++;
+  interp_vars[w]=Ay;      w++;
+  interp_vars[w]=Az;      w++;
   int max_num_interp_variables=w;
   if(max_num_interp_variables>MAXNUMINTERP) {printf("Error: Didn't allocate enough space for interp_vars[].\n"); exit(1); }
   // We are FINISHED with v{x,y,z}{r,l} and Pr so we use these 7 gridfunctions' worth of space as temp storage.

File [modified]: driver_prims_to_conserv.C
Delta lines: +3 -6
===================================================================
--- trunk/src/driver_prims_to_conserv.C	2013-10-16 19:50:41 UTC (rev 14)
+++ trunk/src/driver_prims_to_conserv.C	2013-10-16 20:15:20 UTC (rev 15)
@@ -33,7 +33,7 @@
   convert_ADM_to_BSSN__enforce_detgtij_eq_1__and_compute_gtupij(cctkGH,cctk_lsh,  gxx,gxy,gxz,gyy,gyz,gzz,alp,
                                                                 gtxx,gtxy,gtxz,gtyy,gtyz,gtzz,
                                                                 gtupxx,gtupxy,gtupxz,gtupyy,gtupyz,gtupzz,
-                                                                phi,psi,lapm1);
+                                                                phi,psi_bssn,lapm1);
 
   //  for(int index=0;index<cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2];index++) {
 #pragma omp parallel for
@@ -42,7 +42,7 @@
       for(int i=0;i<cctk_lsh[0];i++) {
 
     int index=CCTK_GFINDEX3D(cctkGH,i,j,k);
-    double Psi = psi[index];
+    double Psi = psi_bssn[index];
     double Psi2 = Psi*Psi;
     double Psi4 = Psi2*Psi2;
     double Psi6 = Psi2*Psi4;
@@ -114,10 +114,7 @@
 				 BxL,ByL,BzL,
 				 rho_star[index],tau[index],mhd_st_x[index],mhd_st_y[index],mhd_st_z[index],
 				 u_xL,u_yL,u_zL,au0m1);
-    // FIXME: the following line (commented out) yields the following error message from 
-    //    the Intel compiler (icpc) v 13.1.3 20130607 .
-    //    error: name followed by "::" must be a class or namespace name
-    //if(isnan(tau[index])) {printf("TAU IS NAN AT %d %d %d\n",i,j,k); exit(1); }
+    if(std::isnan(tau[index])) {printf("TAU IS NAN AT %d %d %d\n",i,j,k); exit(1); }
   }
 
 }

Directory: /trunk/
==================

File [modified]: interface.ccl
Delta lines: +1 -2
===================================================================
--- trunk/interface.ccl	2013-10-16 19:50:41 UTC (rev 14)
+++ trunk/interface.ccl	2013-10-16 20:15:20 UTC (rev 15)
@@ -129,8 +129,7 @@
 #vvvvvvv BSSN-based quantities, computed from ADM quantities.v vvvvvvv#
 cctk_real BSSN_quantities type = GF TAGS='Checkpoint="no"'
 {
-   gtxx,gtxy,gtxz,gtyy,gtyz,gtzz,gtupxx,gtupxy,gtupxz,gtupyy,gtupyz,gtupzz,phi,lapm1
-#   gtxx,gtxy,gtxz,gtyy,gtyz,gtzz,gtupxx,gtupxy,gtupxz,gtupyy,gtupyz,gtupzz,phi,psi,lapm1
+   gtxx,gtxy,gtxz,gtyy,gtyz,gtzz,gtupxx,gtupxy,gtupxz,gtupyy,gtupyz,gtupzz,phi,psi_bssn,lapm1
 }
 #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#
 



More information about the Commits mailing list