Skip to content

Commit

Permalink
remove whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed May 4, 2024
1 parent 6096d0d commit 3bbb8a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions source/convective_grad/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void main_main()
}

} else if (ndims == 2) {
// r is from x and y
// r is from x and y
Real dp = (xpos / dx[0]) * (P(i+1,j,k) - P(i-1,j,k))
+ (ypos / dx[1]) * (P(i,j+1,k) - P(i,j-1,k));

Expand All @@ -292,12 +292,12 @@ void main_main()
// r is from x, y, and z
Real dp = (xpos / dx[0]) * (P(i+1,j,k) - P(i-1,j,k))
+ (ypos / dx[1]) * (P(i,j+1,k) - P(i,j-1,k))
+ (zpos / dx[2]) * (P(i,j,k+1) - P(i,j,k-1));
+ (zpos / dx[2]) * (P(i,j,k+1) - P(i,j,k-1));

if (dp != 0.0) {
Real dT = (xpos / dx[0]) * (T(i+1,j,k) - T(i-1,j,k))
+ (ypos / dx[1]) * (T(i,j+1,k) - T(i,j-1,k))
+ (zpos / dx[2]) * (T(i,j,k+1) - T(i,j,k-1));
+ (zpos / dx[2]) * (T(i,j,k+1) - T(i,j,k-1));

ga(i,j,k,0) = (dT / dp) * (P(i,j,k) / T(i,j,k));

Expand Down Expand Up @@ -408,17 +408,17 @@ void main_main()
lnPalt_minus = std::log(eos_state.p);

} else if (ndims ==2 ) {
// r is made of x and y
// r is made of x and y

// actual
// actual
lnP_plus = (xpos / dx[0]) * std::log(P(i+1,j,k))
+ (ypos / dx[1]) * std::log(P(i,j+1,k));

lnP_minus = (xpos / dx[0]) * std::log(P(i-1,j,k))
+ (ypos / dx[1]) * std::log(P(i,j-1,k));

//alternate
//plus - x
//plus - x
for (int n = 0; n < NumSpec; ++n) {
eos_state.xn[n] = X(i+1,j,k,n);
}
Expand All @@ -432,7 +432,7 @@ void main_main()
eos(eos_input_rt, eos_state);
lnPalt_plus += (ypos / dx[1]) * std::log(eos_state.p);

//minus - x
//minus - x
for (int n = 0; n < NumSpec; ++n) {
eos_state.xn[n] = X(i-1,j,k,n);
}
Expand All @@ -447,9 +447,9 @@ void main_main()
lnPalt_minus += (ypos / dx[1]) * std::log(eos_state.p);

} else {
// r is made of x, y and z
// r is made of x, y and z

// actual
// actual
lnP_plus = (xpos / dx[0]) * std::log(P(i+1,j,k))
+ (ypos / dx[1]) * std::log(P(i,j+1,k))
+ (zpos / dx[2]) * std::log(P(i,j,k+1));
Expand All @@ -459,7 +459,7 @@ void main_main()
+ (zpos / dx[2]) * std::log(P(i,j,k-1));

//alternate
//plus - x
//plus - x
for (int n = 0; n < NumSpec; ++n) {
eos_state.xn[n] = X(i+1,j,k,n);
}
Expand All @@ -480,7 +480,7 @@ void main_main()
eos(eos_input_rt, eos_state);
lnPalt_plus += (zpos / dx[2]) * std::log(eos_state.p);

//minus - x
//minus - x
for (int n = 0; n < NumSpec; ++n) {
eos_state.xn[n] = X(i-1,j,k,n);
}
Expand Down
6 changes: 3 additions & 3 deletions source/fluxes/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void main_main()
varnames = pf.varNames();

// find variable indices
// We want:
// We want:
// density, temperature, pressure, species
// vertical velocity, temperature perturbation
// we will assume here that the species are contiguous, so we will find
Expand Down Expand Up @@ -325,7 +325,7 @@ void main_main()
//Real Hp = -pres/(rho*g) // g is negative

// Convective heat flux
ga(i,j,k,0) = rho * cp * vel * delT;
ga(i,j,k,0) = rho * cp * vel * delT;

// Mixing-length heat flux
// ga(i,j,k,1) = rho * cp * temp * pow(vel, 3) / (Q * g * Hp);
Expand All @@ -335,7 +335,7 @@ void main_main()
// Kinetic flux
ga(i,j,k,2) = rho * pow(vel,3);

// Radiative flux
// Radiative flux
// conductivity is k = 4*a*c*T^3/(kap*rho)
// see Microphysics/conductivity/stellar/actual_conductivity.H
ga(i,j,k,3) = -eos_state.conductivity * dT_dr;
Expand Down

0 comments on commit 3bbb8a8

Please sign in to comment.