Skip to content

Commit fa4c0bb

Browse files
committed
DOC: added a couple of comments
1 parent febb59b commit fa4c0bb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/calc_ion_drift.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ void Ions::calc_exb_drift(Grid grid) {
3434

3535
for (int64_t iComp = 0; iComp < 3; iComp++)
3636
exb_vcgc[iComp] = exb_vcgc[iComp] / bmag2;
37+
3738
report.exit(function);
3839
}
3940

@@ -44,9 +45,9 @@ void Ions::calc_exb_drift(Grid grid) {
4445
std::vector<arma_cube> Ions::calc_ion_electron_pressure_gradient(int64_t iIon,
4546
Grid grid) {
4647

47-
std::string function = "Ions::elec_ion_pressure_gradient";
48-
static int iFunction = -1;
49-
report.enter(function, iFunction);
48+
std::string function = "Ions::elec_ion_pressure_gradient";
49+
static int iFunction = -1;
50+
report.enter(function, iFunction);
5051
std::vector<arma_cube> pressure_gradient_vcgc;
5152
arma_cube total_pressure_scgc;
5253

@@ -201,6 +202,9 @@ void Ions::calc_ion_drift(Neutrals neutrals,
201202
species[iIon].par_velocity_vcgc[iComp] =
202203
(species[iIon].par_velocity_vcgc[iComp] + a_par[iComp] * dt) /
203204
(1 + nuin_sum * dt);
205+
206+
// These need to change, since they are dependent on the
207+
// grid. Closed, dipole fieldlines should NOT do this!!!
204208
species[iIon].par_velocity_vcgc[iComp].slice(nZ - 1).zeros();
205209
species[iIon].par_velocity_vcgc[iComp].slice(nZ - 2).zeros();
206210
species[iIon].par_velocity_vcgc[iComp].slice(nZ - 3) =
@@ -238,6 +242,7 @@ void Ions::calc_ion_drift(Neutrals neutrals,
238242

239243
} // for iIon
240244

245+
// This is the mass weighted total bulk velocity:
241246
for (int64_t iComp = 0; iComp < 3; iComp++)
242247
velocity_vcgc[iComp] = velocity_vcgc[iComp] / sum_rho;
243248

0 commit comments

Comments
 (0)