@@ -125,23 +125,23 @@ bool Ions::set_lower_bcs(Grid &grid, Times time, Indices indices) {
125125
126126 // This is true for all grids:
127127 for (iX = 0 ; iX < nX; iX++) {
128- for (int iY = 0 ; iY < nY; iY++) {
128+ for (iY = 0 ; iY < nY; iY++) {
129129 iFirst = grid.first_lower_gc (iX, iY);
130130
131131 for (iAlt = iFirst; iAlt >= 0 ; iAlt--) {
132132 // Bulk Quantities:
133- temperature_scgc. slice ( iAlt) = temperature_scgc. slice ( iFirst + 1 );
133+ temperature_scgc (iX, iY, iAlt) = temperature_scgc (iX, iY, iFirst + 1 );
134134
135135 // For each species:
136136 for (int iSpecies = 0 ; iSpecies < nSpecies; iSpecies++) {
137137 // assign all species temperatures the bulk temperature:
138- species[iSpecies].temperature_scgc . slice ( iAlt) =
139- temperature_scgc. slice ( iAlt);
138+ species[iSpecies].temperature_scgc (iX, iY, iAlt) =
139+ temperature_scgc (iX, iY, iAlt);
140140 // Assume each species falls off a bit.
141141 // this BC shouldn't matter, since the bottom of the code
142142 // should be in chemical equalibrium:
143- species[iSpecies].density_scgc . slice ( iAlt) =
144- 0.95 * species[iSpecies].density_scgc . slice ( iFirst + 1 );
143+ species[iSpecies].density_scgc (iX, iY, iAlt) =
144+ 0.95 * species[iSpecies].density_scgc (iX, iY, iFirst + 1 );
145145 }
146146 }
147147 }
@@ -158,8 +158,8 @@ bool Ions::set_lower_bcs(Grid &grid, Times time, Indices indices) {
158158
159159 if (grid.setNorthAsDown ) {
160160 // First physical cell:
161- iFirst = nY - nGCs - 2 ;
162- iYs = nY - nGCs - 1 ;
161+ iFirst = nY - nGCs - 1 ;
162+ iYs = nY - nGCs;
163163 iYe = nY;
164164 }
165165
0 commit comments