@@ -44,7 +44,7 @@ void Grid::create_dipole_connection(Quadtree quadtree) {
44
44
edge_Xm = middle_norm - size_right_norm / 2.0 ;
45
45
edge_Yp = middle_norm + size_up_norm / 2.0 ;
46
46
edge_Ym = middle_norm - size_up_norm / 2.0 ;
47
- // by default, edge_Z isn't even an edge, since most processors should
47
+ // by default, edge_Z isn't even an edge, since most processors should
48
48
// not exchange messages in the Z direction.
49
49
edge_Z = middle_norm;
50
50
@@ -65,6 +65,7 @@ void Grid::create_dipole_connection(Quadtree quadtree) {
65
65
// along the Z direction, which turns out to be the same processor
66
66
// as the Y direction, so just take that one:
67
67
IsClosed = false ;
68
+
68
69
if ((middle_norm (1 ) < 0 ) && (up_norm (1 ) > 0 )) {
69
70
// We are in the south and need to pass to the north:
70
71
iRootZ = iRootYp;
@@ -77,6 +78,7 @@ void Grid::create_dipole_connection(Quadtree quadtree) {
77
78
edge_Z (2 ) = 5.0 ;
78
79
IsClosed = true ;
79
80
}
81
+
80
82
if ((middle_norm (1 ) > 0 ) && (down_norm (1 ) < 0 )) {
81
83
// We are in the north and need to pass to the south:
82
84
iRootZ = iRootYm;
@@ -221,6 +223,7 @@ bool Grid::init_dipole_grid(Quadtree quadtree_ion, Planets planet) {
221
223
IsDipole = true ;
222
224
223
225
report.print (0 , " Creating inter-node dipole connections" );
226
+
224
227
if (!Is0D & !Is1Dz)
225
228
create_dipole_connection (quadtree_ion);
226
229
@@ -608,11 +611,11 @@ bool Grid::init_dipole_grid(Quadtree quadtree_ion, Planets planet) {
608
611
}
609
612
610
613
// Gravity should be negative in the k direction, since the grid switches directions.
611
- // j direction should switch signs when crossing the equator (+ in south, - in north)
612
- rad_unit_vcgc[1 ] = sign (magLat_scgc) % cos (magLat_scgc) / pow ( abs ( 1.0 + 3.0 * sin (magLat_scgc)
613
- % sin (magLat_scgc)), 0.5 );
614
- rad_unit_vcgc[2 ] = - 2.0 * abs (sin (magLat_scgc)) / pow ( abs ( 1.0 + 3.0 * sin (magLat_scgc)
615
- % sin (magLat_scgc)), 0.5 );
614
+ // j direction should switch signs when crossing the equator (+ in south, - in north)
615
+ rad_unit_vcgc[1 ] = sign (magLat_scgc) % cos (magLat_scgc)
616
+ / pow ( abs ( 1.0 + 3.0 * sin (magLat_scgc) % sin (magLat_scgc)), 0.5 );
617
+ rad_unit_vcgc[2 ] = - 2.0 * abs (sin (magLat_scgc))
618
+ / pow ( abs ( 1.0 + 3.0 * sin ( magLat_scgc) % sin (magLat_scgc)), 0.5 );
616
619
617
620
precision_t mu = planet.get_mu ();
618
621
gravity_vcgc[1 ] = mu * rad_unit_vcgc[1 ] % radius2i_scgc;
0 commit comments