Skip to content

Commit f80320e

Browse files
committed
BUG: first GC + nGCs - 1 = 2, I think
1 parent 6d25699 commit f80320e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/neutrals_ics.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ bool Neutrals::initial_conditions(Grid grid,
9999
std::cout << " NOT Found in MSIS - setting constant\n";
100100

101101
species[iSpecies].density_scgc.slice(0).
102-
fill(species[iSpecies].lower_bc_density);
102+
fill(species[iSpecies].lower_bc_density);
103103
fill_with_hydrostatic(iSpecies, 1, nAlts, grid);
104104
}
105105

@@ -174,9 +174,11 @@ bool Neutrals::initial_conditions(Grid grid,
174174
for (iLon = 0; iLon < nLons; iLon ++) {
175175
for (iLat = 0; iLat < nLats; iLat++) {
176176
for (int iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
177+
177178
species[iSpecies].density_scgc.subcube(
178-
iLon, iLat, 0, iLon, iLat, grid.first_lower_gc(iLon, iLat)+1).fill(
179+
iLon, iLat, 0, iLon, iLat, grid.first_lower_gc(iLon, iLat) + 1).fill(
179180
species[iSpecies].lower_bc_density);
181+
180182
}
181183
}
182184
}
@@ -188,7 +190,7 @@ bool Neutrals::initial_conditions(Grid grid,
188190
report.print(2, "Filling with hydrostatic");
189191

190192
for (int iSpecies = 0; iSpecies < nSpecies; iSpecies++)
191-
fill_with_hydrostatic(iSpecies, nGCs, nAlts, grid);
193+
fill_with_hydrostatic(iSpecies, nGCs - 1, nAlts, grid);
192194
} // type = planet
193195
}
194196

0 commit comments

Comments
 (0)