Skip to content

Commit 8c84638

Browse files
committed
Remove trailing whitespace
1 parent 67b2282 commit 8c84638

File tree

5 files changed

+28
-54
lines changed

5 files changed

+28
-54
lines changed

IllinoisGRMHD/Convert_to_HydroBase/src/Convert_to_HydroBase.C

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ void Convert_to_HydroBase(CCTK_ARGUMENTS) {
2424
*/
2525
eos_struct eos;
2626
initialize_EOS_struct_from_input(eos);
27-
28-
#pragma omp parallel for
27+
28+
#pragma omp parallel for
2929
for(int k=0;k<cctk_lsh[2];k++)
3030
for(int j=0;j<cctk_lsh[1];j++)
3131
for(int i=0;i<cctk_lsh[0];i++) {
@@ -62,8 +62,8 @@ void Convert_to_HydroBase(CCTK_ARGUMENTS) {
6262
eps[index] = (PRIMS[PRESSURE]-P_cold)/PRIMS[RHOB]/(Gamma_th-1.0);
6363

6464
// IllinoisGRMHD defines v^i = u^i/u^0.
65-
66-
// Meanwhile, the ET/HydroBase formalism, called the Valencia
65+
66+
// Meanwhile, the ET/HydroBase formalism, called the Valencia
6767
// formalism, splits the 4 velocity into a purely spatial part
6868
// and a part that is normal to the spatial hypersurface:
6969
// u^a = G (n^a + U^a), (Eq. 14 of arXiv:1304.5544; G=W, U^a=v^a)
@@ -74,8 +74,8 @@ void Convert_to_HydroBase(CCTK_ARGUMENTS) {
7474
// of course \alpha u^0 = 1/sqrt(1+γ^ij u_i u_j) = \Gamma,
7575
// the standard Lorentz factor.
7676

77-
// Note that n^i = - \beta^i / \alpha, so
78-
// u^a = \Gamma (n^a + U^a)
77+
// Note that n^i = - \beta^i / \alpha, so
78+
// u^a = \Gamma (n^a + U^a)
7979
// -> u^i = \Gamma ( U^i - \beta^i / \alpha )
8080
// which implies
8181
// v^i = u^i/u^0
@@ -91,7 +91,7 @@ void Convert_to_HydroBase(CCTK_ARGUMENTS) {
9191
// \alpha u^0 = 1/sqrt(1+γ^ij u_i u_j) = \Gamma = w_lorentz
9292
// First compute u^0:
9393
// Derivation of first equation:
94-
// \gamma_{ij} (v^i + \beta^i)(v^j + \beta^j)/(\alpha)^2
94+
// \gamma_{ij} (v^i + \beta^i)(v^j + \beta^j)/(\alpha)^2
9595
// = \gamma_{ij} 1/(u^0)^2 ( \gamma^{ik} u_k \gamma^{jl} u_l /(\alpha)^2 <- Using Eq. 53 of arXiv:astro-ph/0503420
9696
// = 1/(u^0 \alpha)^2 u_j u_l \gamma^{jl} <- Since \gamma_{ij} \gamma^{ik} = \delta^k_j
9797
// = 1/(u^0 \alpha)^2 ( (u^0 \alpha)^2 - 1 ) <- Using Eq. 56 of arXiv:astro-ph/0503420

IllinoisGRMHD/Convert_to_HydroBase/src/make.code.defn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
SRCS = Convert_to_HydroBase.C
66

77
# Subdirectories containing source files
8-
SUBDIRS =
8+
SUBDIRS =
99

IllinoisGRMHD/ID_converter_ILGRMHD/src/set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_ADMBase_variables.C

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/********************************
22
* CONVERT ET ID TO IllinoisGRMHD
3-
*
3+
*
44
* Written in 2014 by Zachariah B. Etienne
55
*
6-
* Sets metric & MHD variables needed
6+
* Sets metric & MHD variables needed
77
* by IllinoisGRMHD, converting from
88
* HydroBase and ADMBase.
99
********************************/
@@ -37,7 +37,7 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
3737
***************/
3838
eos_struct eos;
3939
initialize_EOS_struct_from_input(eos);
40-
40+
4141
if(pure_hydro_run) {
4242
#pragma omp parallel for
4343
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++) {
@@ -49,38 +49,12 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
4949
}
5050
}
5151

52-
// Check whether or not to apply a pressure depletion to the initial data
53-
bool apply_pressure_depletion = false;
54-
if( ID_converter_ILGRMHD_pressure_depletion_factor != 0.0 ) apply_pressure_depletion = true;
55-
5652
#pragma omp parallel for
5753
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++) {
5854
int index=CCTK_GFINDEX3D(cctkGH,i,j,k);
5955

60-
if( apply_pressure_depletion ) {
61-
// Deplete the pressure
62-
const CCTK_REAL pressL = (1.0 - ID_converter_ILGRMHD_pressure_depletion_factor)*press[index];
63-
// Recompute P and eps
64-
const CCTK_INT ppidx = find_polytropic_K_and_Gamma_index_from_P(eos,pressL);
65-
const CCTK_REAL K = eos.K_ppoly_tab[ppidx];
66-
const CCTK_REAL Gamma = eos.Gamma_ppoly_tab[ppidx];
67-
// Now we have
68-
// .----------------------.
69-
// P = K rho^Gamma => | rho = (P/K)^(1/Gamma)|
70-
// .----------------------.
71-
const CCTK_REAL rhoL = pow( pressL/K, 1.0/Gamma );
72-
// Finally compute eps
73-
const CCTK_REAL epsC = eos.eps_integ_const[ppidx];
74-
const CCTK_REAL epsL = pressL/(rhoL*(Gamma-1.0)) + epsC;
75-
76-
// Now update the HydroBase gridfunctions
77-
rho [index] = rhoL;
78-
press[index] = pressL;
79-
eps [index] = epsL;
80-
}
81-
8256
rho_b[index] = rho[index];
83-
P [index] = press[index];
57+
P[index] = press[index];
8458

8559
/***************
8660
* PPEOS Patch *
@@ -113,14 +87,14 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
11387
Ay[index] = Avec[CCTK_GFINDEX4D(cctkGH,i,j,k,1)];
11488
Az[index] = Avec[CCTK_GFINDEX4D(cctkGH,i,j,k,2)];
11589
psi6phi[index] = Aphi[index];
116-
90+
11791
double ETvx = vel[CCTK_GFINDEX4D(cctkGH,i,j,k,0)];
11892
double ETvy = vel[CCTK_GFINDEX4D(cctkGH,i,j,k,1)];
11993
double ETvz = vel[CCTK_GFINDEX4D(cctkGH,i,j,k,2)];
12094

12195
// IllinoisGRMHD defines v^i = u^i/u^0.
122-
123-
// Meanwhile, the ET/HydroBase formalism, called the Valencia
96+
97+
// Meanwhile, the ET/HydroBase formalism, called the Valencia
12498
// formalism, splits the 4 velocity into a purely spatial part
12599
// and a part that is normal to the spatial hypersurface:
126100
// u^a = G (n^a + U^a), (Eq. 14 of arXiv:1304.5544; G=W, U^a=v^a)
@@ -131,8 +105,8 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
131105
// of course \alpha u^0 = 1/sqrt(1+γ^ij u_i u_j) = \Gamma,
132106
// the standard Lorentz factor.
133107

134-
// Note that n^i = - \beta^i / \alpha, so
135-
// u^a = \Gamma (n^a + U^a)
108+
// Note that n^i = - \beta^i / \alpha, so
109+
// u^a = \Gamma (n^a + U^a)
136110
// -> u^i = \Gamma ( U^i - \beta^i / \alpha )
137111
// which implies
138112
// v^i = u^i/u^0
@@ -157,7 +131,7 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
157131
int index=CCTK_GFINDEX3D(cctkGH,i,j,k);
158132
double pert = (random_pert*(double)rand() / RAND_MAX);
159133
double one_plus_pert=(1.0+pert);
160-
rho[index]*=one_plus_pert;
134+
rho_b[index]*=one_plus_pert;
161135
vx[index]*=one_plus_pert;
162136
vy[index]*=one_plus_pert;
163137
vz[index]*=one_plus_pert;
@@ -173,7 +147,7 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
173147

174148
double dxi = 1.0/CCTK_DELTA_SPACE(0);
175149
double dyi = 1.0/CCTK_DELTA_SPACE(1);
176-
double dzi = 1.0/CCTK_DELTA_SPACE(2);
150+
double dzi = 1.0/CCTK_DELTA_SPACE(2);
177151

178152
#pragma omp parallel for
179153
for(int k=0;k<cctk_lsh[2];k++)
@@ -196,7 +170,7 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
196170
double Psi = psi_bssn[actual_index];
197171
double Psim3 = 1.0/(Psi*Psi*Psi);
198172

199-
// For the lower boundaries, the following applies a "copy"
173+
// For the lower boundaries, the following applies a "copy"
200174
// boundary condition on Bi_stagger where needed.
201175
// E.g., Bx_stagger(i,jmin,k) = Bx_stagger(i,jmin+1,k)
202176
// We find the copy BC works better than extrapolation.
@@ -276,7 +250,7 @@ extern "C" void set_IllinoisGRMHD_metric_GRMHD_variables_based_on_HydroBase_and_
276250

277251
int actual_index = CCTK_GFINDEX3D(cctkGH,i,j,k);
278252

279-
// For the lower boundaries, the following applies a "copy"
253+
// For the lower boundaries, the following applies a "copy"
280254
// boundary condition on Bi and Bi_stagger where needed.
281255
// E.g., Bx(imin,j,k) = Bx(imin+1,j,k)
282256
// We find the copy BC works better than extrapolation.

UnitTesting/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Deprecated: See jupyter notebook
22

3-
# NRPy Unit Testing: Functions In-Depth
3+
# NRPy Unit Testing: Functions In-Depth
44
If you have not already, please read through the Jupyter notebook
55
tutorial for unit testing `Tutorial-UnitTesting.ipynb` This will contain
66
in-depth information on all functions used for unit testing, not a
@@ -49,7 +49,7 @@ The script is run with the following syntax:
4949
This of course assumes that the user is in the nrpy directory; the user
5050
simply has to specify the path from their current directory to the bash
5151
file.
52-
52+
5353
Examples of `python interpreter` are `python` and `python3`.
5454

5555
The script first lets the user know if they forgot to pass a python
@@ -204,14 +204,14 @@ module being tested; since `setup_trusted_values_dict` is called before
204204

205205
`run_test` then determines if the current function/module is being done
206206
for the first time based off the existence of the proper entry in
207-
`trusted_values_dict`.
207+
`trusted_values_dict`.
208208

209209
[evaluate_globals](#evaluate_globals) is then run in order to generate
210-
the SymPy expressions for each global being tested.
210+
the SymPy expressions for each global being tested.
211211

212212
Next,
213213
[cse_simplify_and_evaluate_sympy_expressions](#cse_simplify_and_evaluate_sympy_expressions)
214-
is
214+
is
215215

216216

217217

UnitTesting/bench_all_notebooks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ time for i in *.ipynb; do
66
# First clean up any mess made by notebook.
77
git clean -fdq
88
echo Working on $i now ...
9-
9+
1010
# NRPy+ Jupyter notebooks are completely Python 2/3 cross-compatible.
1111
# However `jupyter nbconvert` will refuse to run if the notebook
1212
# was generated using a different kernel. Here we fool Jupyter
@@ -20,7 +20,7 @@ time for i in *.ipynb; do
2020

2121
BENCH=$(/usr/bin/time -f %e jupyter nbconvert --log-level=0 --to notebook --inplace --execute --ExecutePreprocessor.timeout=-1 $i 2>&1)
2222
echo $BENCH $i | tee -a /tmp/outNRPybench.txt
23-
23+
2424
done
2525

2626
sort -k1 -g /tmp/outNRPybench.txt

0 commit comments

Comments
 (0)