Skip to content

Commit

Permalink
Remove trailing whitespace from all Jupyter notebook code cells. Uses…
Browse files Browse the repository at this point in the history
… algorithm from here: jupyter/notebook#1455 (comment)
  • Loading branch information
zachetienne committed Jun 1, 2020
1 parent 19771b6 commit 0497609
Show file tree
Hide file tree
Showing 67 changed files with 1,191 additions and 1,232 deletions.
6 changes: 3 additions & 3 deletions Tutorial-ADMBSSN_tofrom_4metric.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
" if inputvars == \"ADM\":\n",
" return\n",
"\n",
" # Step 6: If inputvars == \"BSSN\", convert ADM to BSSN & return hDD, cf, \n",
" # Step 6: If inputvars == \"BSSN\", convert ADM to BSSN & return hDD, cf,\n",
" import BSSN.BSSN_in_terms_of_ADM as BitoA\n",
" dummyBU = ixp.zerorank1()\n",
" BitoA.gammabarDD_hDD( gammaDD)\n",
Expand Down Expand Up @@ -567,7 +567,7 @@
"for i in range(3):\n",
" print(\"vetU[\"+str(i)+\"] - mod_vetU[\"+str(i)+\"] = \" + str(vetU[i] - AB4m.vetU[i]))\n",
" for j in range(3):\n",
" print(\"hDD[\"+str(i)+\"][\"+str(j)+\"] - mod_hDD[\"+str(i)+\"][\"+str(j)+\"] = \" \n",
" print(\"hDD[\"+str(i)+\"][\"+str(j)+\"] - mod_hDD[\"+str(i)+\"][\"+str(j)+\"] = \"\n",
" + str(hDD[i][j] - AB4m.hDD[i][j]))\n",
"\n",
"BSSN_or_ADM_ito_g4DD(\"ADM\")\n",
Expand All @@ -577,7 +577,7 @@
"for i in range(3):\n",
" print(\"betaU[\"+str(i)+\"] - mod_betaU[\"+str(i)+\"] = \" + str(betaU[i] - AB4m.betaU[i]))\n",
" for j in range(3):\n",
" print(\"gammaDD[\"+str(i)+\"][\"+str(j)+\"] - mod_gammaDD[\"+str(i)+\"][\"+str(j)+\"] = \" \n",
" print(\"gammaDD[\"+str(i)+\"][\"+str(j)+\"] - mod_gammaDD[\"+str(i)+\"][\"+str(j)+\"] = \"\n",
" + str(gammaDD[i][j] - AB4m.gammaDD[i][j]))"
]
},
Expand Down
2 changes: 1 addition & 1 deletion Tutorial-ADM_Initial_Data-Brill-Lindquist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"# Step 3: Code Validation against BSSN.BrillLindquist NRPy+ module\n",
"\n",
"# First we import reference_metric, which is\n",
"# needed since BSSN.BrillLindquist calls \n",
"# needed since BSSN.BrillLindquist calls\n",
"# BSSN.ADM_Exact_Spherical_or_Cartesian_to_BSSNCurvilinear, which\n",
"# depends on reference_metric:\n",
"import reference_metric as rfm # NRPy+: Reference metric support\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@
"metadata": {},
"outputs": [],
"source": [
"# Step 3: All input quantities are in terms of r,th,ph or x,y,z. We want them in terms \n",
"# Step 3: All input quantities are in terms of r,th,ph or x,y,z. We want them in terms\n",
"# of xx0,xx1,xx2, so here we call sympify_integers__replace_rthph() to replace\n",
"# r,th,ph or x,y,z, respectively, with the appropriate functions of xx0,xx1,xx2\n",
"# as defined for this particular reference metric in reference_metric.py's \n",
"# as defined for this particular reference metric in reference_metric.py's\n",
"# xxSph[] or xxCart[], respectively:\n",
"\n",
"# UIUC Black Hole initial data are given in Spherical coordinates.\n",
Expand All @@ -152,7 +152,7 @@
" print(\" first setting up reference metric, by calling rfm.reference_metric().\")\n",
" sys.exit(1)\n",
"\n",
"# Note that substitution only works when the variable is not an integer. Hence the \n",
"# Note that substitution only works when the variable is not an integer. Hence the\n",
"# if isinstance(...,...) stuff:\n",
"def sympify_integers__replace_rthph_or_Cartxyz(obj, rthph_or_xyz, rthph_or_xyz_of_xx):\n",
" if isinstance(obj, int):\n",
Expand Down Expand Up @@ -352,7 +352,7 @@
"import BSSN.ADM_Exact_Spherical_or_Cartesian_to_BSSNCurvilinear as ADMtoBSSN\n",
"returnfunction = uibh.UIUCBlackHole()\n",
"mod_cf,mod_hDD,mod_lambdaU,mod_aDD,mod_trK,mod_alpha,mod_vetU,mod_betU = \\\n",
" ADMtoBSSN.Convert_Spherical_or_Cartesian_ADM_to_BSSN_curvilinear(\"Spherical\",uibh.Sph_r_th_ph, \n",
" ADMtoBSSN.Convert_Spherical_or_Cartesian_ADM_to_BSSN_curvilinear(\"Spherical\",uibh.Sph_r_th_ph,\n",
" uibh.gammaSphDD, uibh.KSphDD, uibh.alphaSph, uibh.betaSphU, uibh.BSphU)\n",
"\n",
"print(\"Consistency check between this tutorial notebook and BSSN.ADM_Exact_Spherical_or_Cartesian_to_BSSNCurvilinear NRPy+ module: ALL SHOULD BE ZERO.\")\n",
Expand All @@ -366,9 +366,9 @@
" print(\"betU[\"+str(i)+\"] - mod_betU[\"+str(i)+\"] = \" + str(betU[i] - mod_betU[i]))\n",
" print(\"lambdaU[\"+str(i)+\"] - mod_lambdaU[\"+str(i)+\"] = \" + str(lambdaU[i] - mod_lambdaU[i]))\n",
" for j in range(DIM):\n",
" print(\"hDD[\"+str(i)+\"][\"+str(j)+\"] - mod_hDD[\"+str(i)+\"][\"+str(j)+\"] = \" \n",
" print(\"hDD[\"+str(i)+\"][\"+str(j)+\"] - mod_hDD[\"+str(i)+\"][\"+str(j)+\"] = \"\n",
" + str(hDD[i][j] - mod_hDD[i][j]))\n",
" print(\"aDD[\"+str(i)+\"][\"+str(j)+\"] - mod_aDD[\"+str(i)+\"][\"+str(j)+\"] = \" \n",
" print(\"aDD[\"+str(i)+\"][\"+str(j)+\"] - mod_aDD[\"+str(i)+\"][\"+str(j)+\"] = \"\n",
" + str(aDD[i][j] - mod_aDD[i][j]))\n",
"\n",
"# If you wish to generate & analyze C code output, uncomment the following:\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@
"metadata": {},
"outputs": [],
"source": [
"# Step 1: All input quantities are in terms of r,th,ph or x,y,z. We want them in terms \n",
"# Step 1: All input quantities are in terms of r,th,ph or x,y,z. We want them in terms\n",
"# of xx0,xx1,xx2, so here we call sympify_integers__replace_rthph() to replace\n",
"# r,th,ph or x,y,z, respectively, with the appropriate functions of xx0,xx1,xx2\n",
"# as defined for this particular reference metric in reference_metric.py's \n",
"# as defined for this particular reference metric in reference_metric.py's\n",
"# xxSph[] or xxCart[], respectively:\n",
"\n",
"# Define the input variables:\n",
Expand Down Expand Up @@ -325,7 +325,7 @@
}
],
"source": [
"# Step 6: Output all ADM-to-BSSN expressions to a C function \n",
"# Step 6: Output all ADM-to-BSSN expressions to a C function\n",
"ID_inputs_param = \"ID_inputs other_inputs,\"\n",
"if pointer_to_ID_inputs == True:\n",
" ID_inputs_param = \"ID_inputs *other_inputs,\"\n",
Expand Down Expand Up @@ -365,11 +365,11 @@
" outputC([hDD[0][0],hDD[0][1],hDD[0][2],hDD[1][1],hDD[1][2],hDD[2][2],\n",
" aDD[0][0],aDD[0][1],aDD[0][2],aDD[1][1],aDD[1][2],aDD[2][2],\n",
" trK, vetU[0],vetU[1],vetU[2], betU[0],betU[1],betU[2],\n",
" alpha, cf], \n",
" alpha, cf],\n",
" [\"*hDD00\",\"*hDD01\",\"*hDD02\",\"*hDD11\",\"*hDD12\",\"*hDD22\",\n",
" \"*aDD00\",\"*aDD01\",\"*aDD02\",\"*aDD11\",\"*aDD12\",\"*aDD22\",\n",
" \"*trK\", \"*vetU0\",\"*vetU1\",\"*vetU2\", \"*betU0\",\"*betU1\",\"*betU2\",\n",
" \"*alpha\",\"*cf\"],\"returnstring\",params=outCparams), \n",
" \"*alpha\",\"*cf\"],\"returnstring\",params=outCparams),\n",
" opts = \"DisableCparameters\")"
]
},
Expand Down Expand Up @@ -464,16 +464,16 @@
"source": [
"# Step 7: Compute $\\bar{\\Lambda}^i$ from finite-difference derivatives of rescaled metric quantities\n",
"\n",
"# We will need all BSSN gridfunctions to be defined, as well as \n",
"# expressions for gammabarDD_dD in terms of exact derivatives of \n",
"# We will need all BSSN gridfunctions to be defined, as well as\n",
"# expressions for gammabarDD_dD in terms of exact derivatives of\n",
"# the rescaling matrix and finite-difference derivatives of\n",
"# hDD's. This functionality is provided by BSSN.BSSN_unrescaled_and_barred_vars,\n",
"# which we call here to overwrite above definitions of gammabarDD,gammabarUU, etc.\n",
"Bq.gammabar__inverse_and_derivs() # Provides gammabarUU and GammabarUDD\n",
"gammabarUU = Bq.gammabarUU\n",
"GammabarUDD = Bq.GammabarUDD\n",
"\n",
"# Next evaluate \\bar{\\Lambda}^i, based on GammabarUDD above and GammahatUDD \n",
"# Next evaluate \\bar{\\Lambda}^i, based on GammabarUDD above and GammahatUDD\n",
"# (from the reference metric):\n",
"LambdabarU = ixp.zerorank1()\n",
"for i in range(DIM):\n",
Expand Down Expand Up @@ -543,7 +543,7 @@
}
],
"source": [
"# Reset the gridfunctions list; \n",
"# Reset the gridfunctions list;\n",
"# in Convert_Spherical_or_Cartesian_ADM_to_BSSN_curvilinear()\n",
"# below, BSSN_RHSs is called\n",
"# tutorial. This line of code enables us to run\n",
Expand Down
4 changes: 2 additions & 2 deletions Tutorial-ADM_Initial_Data-ShiftedKerrSchild.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Step 2: Define and construct nonzero components gamma_{r_{KS}r_{KS}}$, gamma_{r_{KS}phi}, \n",
"# Step 2: Define and construct nonzero components gamma_{r_{KS}r_{KS}}$, gamma_{r_{KS}phi},\n",
"# gamma_{thetatheta}, gamma_{phiphi}\n",
"\n",
"# Initialize \\gamma_{ij} to zero.\n",
Expand Down Expand Up @@ -425,7 +425,7 @@
],
"source": [
"# First we import reference_metric, which is\n",
"# needed since BSSN.ShiftedKerrSchild calls \n",
"# needed since BSSN.ShiftedKerrSchild calls\n",
"# BSSN.ADM_Exact_Spherical_or_Cartesian_to_BSSNCurvilinear, which\n",
"# depends on reference_metric:\n",
"import reference_metric as rfm # NRPy+: Reference metric support\n",
Expand Down
4 changes: 2 additions & 2 deletions Tutorial-ADM_Initial_Data-StaticTrumpet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"# *** The physical spatial metric in spherical basis ***\n",
"# Set the upper-triangle of the matrix...\n",
"# Eq. 15\n",
"# eta_00 = 1, eta_11 = r^2, eta_22 = r^2 * sin^2 (theta) \n",
"# eta_00 = 1, eta_11 = r^2, eta_22 = r^2 * sin^2 (theta)\n",
"gammaSphDD = ixp.zerorank2()\n",
"gammaSphDD[0][0] = psi0**4\n",
"gammaSphDD[1][1] = psi0**4 * r**2\n",
Expand Down Expand Up @@ -301,7 +301,7 @@
],
"source": [
"# First we import reference_metric, which is\n",
"# needed since BSSN.BrillLindquist calls \n",
"# needed since BSSN.BrillLindquist calls\n",
"# BSSN.ADM_Exact_Spherical_or_Cartesian_to_BSSNCurvilinear, which\n",
"# depends on reference_metric:\n",
"import reference_metric as rfm # NRPy+: Reference metric support\n",
Expand Down
10 changes: 5 additions & 5 deletions Tutorial-ADM_Initial_Data-TOV.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
" no_output_File = False,\n",
" pressure_renormalization=1): # reset the pressure to stellar oscillations studies\n",
"\n",
" def TOV_rhs(r_Schw, y) : \n",
" def TOV_rhs(r_Schw, y) :\n",
" # In \\tilde units\n",
" #\n",
" P = y[0]\n",
Expand All @@ -220,7 +220,7 @@
" rho = (1.0 + eps_cold)*rho_baryon\n",
"\n",
"# m = 4*math.pi/3. * rho*r_Schw**3\n",
" if( r_Schw < 1e-4 or m <= 0.): \n",
" if( r_Schw < 1e-4 or m <= 0.):\n",
" # From https://github.com/natj/tov/blob/master/tov.py#L33:\n",
" # dPdr = -cgs.G*(eden + P/cgs.c**2)*(m + 4.0*pi*r**3*P/cgs.c**2)\n",
" # dPdr = dPdr/(r*(r - 2.0*cgs.G*m/cgs.c**2))\n",
Expand Down Expand Up @@ -278,7 +278,7 @@
" nuArr = []\n",
" rbarArr = []\n",
"\n",
" while integrator.successful() and P > 1e-19*y0[0] : \n",
" while integrator.successful() and P > 1e-19*y0[0] :\n",
" P, m, nu, rbar = integrator.integrate(r_Schw + dr_Schw)\n",
" # Update the value of r_Schw to the latest integrated value\n",
" r_Schw += dr_Schw\n",
Expand Down Expand Up @@ -346,10 +346,10 @@
"\n",
" # Special thanks to Leonardo Werneck for pointing out this issue with zip()\n",
" if sys.version_info[0] < 3:\n",
" np.savetxt(outfile, zip(r_SchwArr_np,rhoArr_np,rho_baryonArr_np,PArr_np,mArr_np,exp2phiArr_np,confFactor_exp4phi_np,rbarArr_np), \n",
" np.savetxt(outfile, zip(r_SchwArr_np,rhoArr_np,rho_baryonArr_np,PArr_np,mArr_np,exp2phiArr_np,confFactor_exp4phi_np,rbarArr_np),\n",
" fmt=\"%.15e\")\n",
" else:\n",
" np.savetxt(outfile, list(zip(r_SchwArr_np,rhoArr_np,rho_baryonArr_np,PArr_np,mArr_np,exp2phiArr_np,confFactor_exp4phi_np,rbarArr_np)), \n",
" np.savetxt(outfile, list(zip(r_SchwArr_np,rhoArr_np,rho_baryonArr_np,PArr_np,mArr_np,exp2phiArr_np,confFactor_exp4phi_np,rbarArr_np)),\n",
" fmt=\"%.15e\")\n",
"\n",
" return R_Schw, M\n",
Expand Down
8 changes: 4 additions & 4 deletions Tutorial-ADM_Initial_Data-UIUC_BlackHole.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Defined under equation 1 in Liu, Etienne, & Shapiro (2009) \n",
"# Defined under equation 1 in Liu, Etienne, & Shapiro (2009)\n",
"# https://arxiv.org/pdf/1001.4077.pdf\n",
"\n",
"# Boyer - Lindquist outer horizon\n",
Expand Down Expand Up @@ -229,7 +229,7 @@
"gammaSphDD = ixp.zerorank2()\n",
"# Declare the nonzero components of the 3-metric (Eq. 13):\n",
"\n",
"# ds^2 = Sigma (r + r_+/4)^2 / ( r^3 (r_{BL} - r_- ) * dr^2 + \n",
"# ds^2 = Sigma (r + r_+/4)^2 / ( r^3 (r_{BL} - r_- ) * dr^2 +\n",
"# Sigma d theta^2 + (A sin^2 theta) / Sigma * d\\phi^2\n",
"\n",
"gammaSphDD[0][0] = ((SIG*(r + rp/4)**2)/(r**3*(rBL - rm)))\n",
Expand Down Expand Up @@ -294,7 +294,7 @@
"# Components of the extrinsic curvature K, given by\n",
"# Eq. 15 of Liu, Etienne, & Shapiro, https://arxiv.org/pdf/1001.4077.pdf:\n",
"\n",
"# K_{theta phi} = K_{phi theta} = -(2a^3 Mr_{BL} cos theta sin^3 theta) / \n",
"# K_{theta phi} = K_{phi theta} = -(2a^3 Mr_{BL} cos theta sin^3 theta) /\n",
"# (Sigma sqrt{A Sigma}) x (r - r_+ / 4) sqrt{(r_{BL} - r_-) / r }\n",
"\n",
"KSphDD[1][2] = KSphDD[2][1] = -((2*a**3*M*rBL*sp.cos(th)*sp.sin(th)**3)/ \\\n",
Expand Down Expand Up @@ -385,7 +385,7 @@
],
"source": [
"# First we import reference_metric, which is\n",
"# needed since BSSN.UIUCBlackHole calls \n",
"# needed since BSSN.UIUCBlackHole calls\n",
"# BSSN.ADM_Exact_Spherical_or_Cartesian_to_BSSNCurvilinear, which\n",
"# depends on reference_metric:\n",
"import reference_metric as rfm # NRPy+: Reference metric support\n",
Expand Down
12 changes: 6 additions & 6 deletions Tutorial-ADM_in_terms_of_BSSN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@
"# Step 1.b: Set the coordinate system for the numerical grid\n",
"par.set_parval_from_str(\"reference_metric::CoordSystem\",\"Spherical\")\n",
"\n",
"# Step 1.c: Given the chosen coordinate system, set up \n",
"# Step 1.c: Given the chosen coordinate system, set up\n",
"# corresponding reference metric and needed\n",
"# reference metric quantities\n",
"# The following function call sets up the reference metric\n",
"# and related quantities, including rescaling matrices ReDD,\n",
"# ReU, and hatted quantities.\n",
"rfm.reference_metric()\n",
"\n",
"# Step 1.d: Set spatial dimension (must be 3 for BSSN, as BSSN is \n",
"# a 3+1-dimensional decomposition of the general \n",
"# Step 1.d: Set spatial dimension (must be 3 for BSSN, as BSSN is\n",
"# a 3+1-dimensional decomposition of the general\n",
"# relativistic field equations)\n",
"DIM = 3\n",
"\n",
Expand Down Expand Up @@ -173,7 +173,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Step 2: The ADM three-metric gammaDD and its \n",
"# Step 2: The ADM three-metric gammaDD and its\n",
"# derivatives in terms of BSSN quantities.\n",
"gammaDD = ixp.zerorank2()\n",
"\n",
Expand All @@ -186,7 +186,7 @@
" exp4phi = (1 / cf**2)\n",
"else:\n",
" print(\"Error EvolvedConformalFactor_cf type = \\\"\"+par.parval_from_str(\"EvolvedConformalFactor_cf\")+\"\\\" unknown.\")\n",
" sys.exit(1) \n",
" sys.exit(1)\n",
"\n",
"for i in range(DIM):\n",
" for j in range(DIM):\n",
Expand Down Expand Up @@ -386,7 +386,7 @@
"outputs": [],
"source": [
"# Step 3: Define ADM extrinsic curvature KDD and\n",
"# its first spatial derivatives KDDdD \n",
"# its first spatial derivatives KDDdD\n",
"# in terms of BSSN quantities\n",
"KDD = ixp.zerorank2()\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"metadata": {},
"outputs": [],
"source": [
"# We will need the h_{ij} quantities defined within BSSN_RHSs \n",
"# We will need the h_{ij} quantities defined within BSSN_RHSs\n",
"# below when we enforce the gammahat=gammabar constraint\n",
"# Step 1: All barred quantities are defined in terms of BSSN rescaled gridfunctions,\n",
"# which we declare here in case they haven't yet been declared elsewhere.\n",
Expand Down Expand Up @@ -195,7 +195,7 @@
"shutil.rmtree(Ccodesdir, ignore_errors=True)\n",
"# Then create a fresh directory\n",
"cmd.mkdir(Ccodesdir)\n",
" \n",
"\n",
"enforce_detg_constraint_vars = [lhrh(lhs=gri.gfaccess(\"in_gfs\",\"hDD00\"),rhs=hprimeDD[0][0]),\n",
" lhrh(lhs=gri.gfaccess(\"in_gfs\",\"hDD01\"),rhs=hprimeDD[0][1]),\n",
" lhrh(lhs=gri.gfaccess(\"in_gfs\",\"hDD02\"),rhs=hprimeDD[0][2]),\n",
Expand Down
8 changes: 4 additions & 4 deletions Tutorial-BSSN-basis_transforms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@
"CartgammabarDD = rfm.basis_transform_tensorDD_from_rfmbasis_to_Cartesian(Jac_dUrfm_dDCartUD, src_gammabarDD)\n",
"CartAbarDD = rfm.basis_transform_tensorDD_from_rfmbasis_to_Cartesian(Jac_dUrfm_dDCartUD, src_AbarDD)\n",
"\n",
"# Step 2.d: All BSSN tensor/vector quantities are written in terms of \n",
"# rescaled quantities and (xx0,xx1,xx2) on the SOURCE grid. \n",
"# Step 2.d: All BSSN tensor/vector quantities are written in terms of\n",
"# rescaled quantities and (xx0,xx1,xx2) on the SOURCE grid.\n",
"# To avoid confusion with (xx0,xx1,xx2) on the DESTINATION grid,\n",
"# we replace (xx0,xx1,xx2) with (src_xx0,src_xx1,src_xx2) here:\n",
"for i in range(3):\n",
Expand Down Expand Up @@ -303,8 +303,8 @@
" dst_vetU[i] = dst_betaU[i] / rfm.ReU[i]\n",
" dst_betU[i] = dst_BU[i] / rfm.ReU[i]\n",
"\n",
"# Step 4.c: All BSSN tensor/vector quantities are written in terms of \n",
"# rescaled quantities and (xx0,xx1,xx2) on the DESTINATION grid. \n",
"# Step 4.c: All BSSN tensor/vector quantities are written in terms of\n",
"# rescaled quantities and (xx0,xx1,xx2) on the DESTINATION grid.\n",
"# To avoid confusion with (xx0,xx1,xx2) on the SOURCE grid,\n",
"# we replace (xx0,xx1,xx2) with (dst_xx0,dst_xx1,dst_xx2) here:\n",
"for i in range(3):\n",
Expand Down
16 changes: 8 additions & 8 deletions Tutorial-BSSN_constraints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
"import reference_metric as rfm # NRPy+: Reference metric support\n",
"import BSSN.BSSN_quantities as Bq\n",
"\n",
"# Step 1.a: Set spatial dimension (must be 3 for BSSN, as BSSN is \n",
"# a 3+1-dimensional decomposition of the general \n",
"# Step 1.a: Set spatial dimension (must be 3 for BSSN, as BSSN is\n",
"# a 3+1-dimensional decomposition of the general\n",
"# relativistic field equations)\n",
"DIM = 3\n",
"\n",
"# Step 1.b: Given the chosen coordinate system, set up \n",
"# Step 1.b: Given the chosen coordinate system, set up\n",
"# corresponding reference metric and needed\n",
"# reference metric quantities\n",
"# The following function call sets up the reference metric\n",
Expand Down Expand Up @@ -306,13 +306,13 @@
"# Step 4: Code Validation against BSSN.BSSN_constraints NRPy+ module\n",
"\n",
"# We already have SymPy expressions for BSSN constraints\n",
"# in terms of other SymPy variables. Even if we reset the \n",
"# in terms of other SymPy variables. Even if we reset the\n",
"# list of NRPy+ gridfunctions, these *SymPy* expressions for\n",
"# BSSN constraint variables *will remain unaffected*. \n",
"# \n",
"# BSSN constraint variables *will remain unaffected*.\n",
"#\n",
"# Here, we will use the above-defined BSSN constraint expressions\n",
"# to validate against the same expressions in the \n",
"# BSSN/BSSN_constraints.py file, to ensure consistency between \n",
"# to validate against the same expressions in the\n",
"# BSSN/BSSN_constraints.py file, to ensure consistency between\n",
"# this tutorial and the module itself.\n",
"#\n",
"# Reset the list of gridfunctions, as registering a gridfunction\n",
Expand Down
Loading

0 comments on commit 0497609

Please sign in to comment.