Skip to content

Commit c740361

Browse files
committed
STY: astyle, yo
1 parent 4961430 commit c740361

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/init_mag_grid.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void Grid::create_dipole_connection(Quadtree quadtree) {
4444
edge_Xm = middle_norm - size_right_norm / 2.0;
4545
edge_Yp = middle_norm + size_up_norm / 2.0;
4646
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
4848
// not exchange messages in the Z direction.
4949
edge_Z = middle_norm;
5050

@@ -65,6 +65,7 @@ void Grid::create_dipole_connection(Quadtree quadtree) {
6565
// along the Z direction, which turns out to be the same processor
6666
// as the Y direction, so just take that one:
6767
IsClosed = false;
68+
6869
if ((middle_norm(1) < 0) && (up_norm(1) > 0)) {
6970
// We are in the south and need to pass to the north:
7071
iRootZ = iRootYp;
@@ -77,6 +78,7 @@ void Grid::create_dipole_connection(Quadtree quadtree) {
7778
edge_Z(2) = 5.0;
7879
IsClosed = true;
7980
}
81+
8082
if ((middle_norm(1) > 0) && (down_norm(1) < 0)) {
8183
// We are in the north and need to pass to the south:
8284
iRootZ = iRootYm;
@@ -221,6 +223,7 @@ bool Grid::init_dipole_grid(Quadtree quadtree_ion, Planets planet) {
221223
IsDipole = true;
222224

223225
report.print(0, "Creating inter-node dipole connections");
226+
224227
if (!Is0D & !Is1Dz)
225228
create_dipole_connection(quadtree_ion);
226229

@@ -608,11 +611,11 @@ bool Grid::init_dipole_grid(Quadtree quadtree_ion, Planets planet) {
608611
}
609612

610613
// 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);
616619

617620
precision_t mu = planet.get_mu();
618621
gravity_vcgc[1] = mu * rad_unit_vcgc[1] % radius2i_scgc;

0 commit comments

Comments
 (0)