Skip to content

Commit eb9e29b

Browse files
committed
BUG: Dipole missing factor of 2 in number of GCs
1 parent c740361 commit eb9e29b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

edu/examples/Dipole/MoreDipoleInfo.ipynb

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

edu/examples/Dipole/dipole.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def main(alt_minRE, alt_maxRE, lat_min, lat_max, origins, extent, nLatsPerBlock,
5353
origin = -1*origin - extent
5454

5555
lat0 = (2*(lat_max - lat_min))*origin
56-
dlat = extent * ((lat_max - lat_min)*2) / (nLatsPerBlock - nGCs)
56+
dlat = extent * (2*(lat_max - lat_min)) / (nLatsPerBlock - nGCs*2)
5757

5858
# Put latitudes down evenly (centers & corners)
5959
# - This forms the invariant latitudes which field lines must pass thru

src/init_mag_grid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ bool Grid::init_dipole_grid(Quadtree quadtree_ion, Planets planet) {
335335

336336
precision_t lat0 = 2.0 * (max_lat - min_lat) * lat_origin;
337337
precision_t dlat = 2.0 * size_up_norm(1) * (max_lat - min_lat) /
338-
(nLats - nGCs);
338+
(nLats - nGCs * 2);
339339

340340
arma_vec lat1d(nLats);
341341
arma_vec lat1dDown(nLats + 1);

0 commit comments

Comments
 (0)