Skip to content

Commit 0f94f7e

Browse files
committed
BUG: restart both grids
1 parent 8827cbf commit 0f94f7e

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/neutrals_ics.cpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
// -----------------------------------------------------------------------------
99
// Set initial conditions for the neutrals.
10-
// Two methods implemented so far:
10+
// If user wants to restart, then read the restart files.
11+
// Otherwise, initialize the neutrals.
12+
//
13+
// Two methods of initialization implemented so far:
1114
// - Planet: Use fixed density values in the planet.in file and the
1215
// temperature profile to set the densities and temperature.
1316
// Densities are filled with hydrostatic solution.
@@ -35,9 +38,12 @@ bool Neutrals::initial_conditions(Grid grid,
3538

3639
report.print(3, "Creating Neutrals initial_condition");
3740

41+
// ----------------------------------------------------------
42+
// Restart file:
43+
3844
if (input.get_do_restart()) {
3945
report.print(1, "Restarting! Reading neutral files!");
40-
didWork = restart_file(input.get_restartin_dir(), DoRead);
46+
didWork = restart_file(input.get_restartin_dir(), grid.get_gridtype(), DoRead);
4147

4248
if (!didWork)
4349
report.error("Reading Restart for Neutrals Failed!!!");
@@ -46,6 +52,9 @@ bool Neutrals::initial_conditions(Grid grid,
4652
json ics = input.get_initial_condition_types();
4753
std::string icsType = mklower(ics["type"]);
4854

55+
// ----------------------------------------------------------
56+
// MSIS:
57+
4958
if (icsType == "msis") {
5059
report.print(2, "Using MSIS for Initial Conditions");
5160

@@ -98,6 +107,9 @@ bool Neutrals::initial_conditions(Grid grid,
98107
} // msis init worked ok
99108
} // type = msis
100109

110+
// ----------------------------------------------------------
111+
// Planet:
112+
101113
if (icsType == "planet") {
102114
report.print(2, "Using planet for Initial Conditions");
103115

@@ -161,7 +173,6 @@ bool Neutrals::initial_conditions(Grid grid,
161173

162174
// Make the initial condition in the lower ghost cells to be consistent
163175
// with the actual lowwer BC:
164-
// Set the lower boundary condition:
165176

166177
for (int iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
167178
species[iSpecies].density_scgc.slice(0).

0 commit comments

Comments
 (0)