Skip to content

Commit f007ead

Browse files
committed
BUG: cubesphere variables need to computed
1 parent 3a03d92 commit f007ead

File tree

1 file changed

+5
-44
lines changed

1 file changed

+5
-44
lines changed

src/init_geo_grid.cpp

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -907,19 +907,6 @@ void Grid::correct_xy_grid(Planets planet) {
907907
precision_t R = R_Alts(iAlt);
908908
refx_scgc.slice(iAlt) *= R;
909909
refy_scgc.slice(iAlt) *= R;
910-
//A11_scgc.slice(iAlt) *= R;
911-
//A12_scgc.slice(iAlt) *= R;
912-
//A21_scgc.slice(iAlt) *= R;
913-
//A22_scgc.slice(iAlt) *= R;
914-
//A11_inv_scgc.slice(iAlt) /= R;
915-
//A12_inv_scgc.slice(iAlt) /= R;
916-
//A21_inv_scgc.slice(iAlt) /= R;
917-
//A22_inv_scgc.slice(iAlt) /= R;
918-
//g11_upper_scgc.slice(iAlt) /= R * R;
919-
//g12_upper_scgc.slice(iAlt) /= R * R;
920-
//g21_upper_scgc.slice(iAlt) /= R * R;
921-
//g22_upper_scgc.slice(iAlt) /= R * R;
922-
//sqrt_g_scgc.slice(iAlt) *= R * R;
923910

924911
// Addition: Get a copy of dx dy
925912
arma_mat curr_refx = refx_scgc.slice(iAlt);
@@ -930,36 +917,8 @@ void Grid::correct_xy_grid(Planets planet) {
930917

931918
refx_Left.slice(iAlt) *= R;
932919
refy_Left.slice(iAlt) *= R;
933-
//A11_Left.slice(iAlt) *= R;
934-
//A12_Left.slice(iAlt) *= R;
935-
//A21_Left.slice(iAlt) *= R;
936-
//A22_Left.slice(iAlt) *= R;
937-
//A11_inv_Left.slice(iAlt) /= R;
938-
//A12_inv_Left.slice(iAlt) /= R;
939-
//A21_inv_Left.slice(iAlt) /= R;
940-
//A22_inv_Left.slice(iAlt) /= R;
941-
//g11_upper_Left.slice(iAlt) /= R * R;
942-
//g12_upper_Left.slice(iAlt) /= R * R;
943-
//g21_upper_Left.slice(iAlt) /= R * R;
944-
//g22_upper_Left.slice(iAlt) /= R * R;
945-
//sqrt_g_Left.slice(iAlt) *= R * R;
946-
947920
refx_Down.slice(iAlt) *= R;
948921
refy_Down.slice(iAlt) *= R;
949-
//A11_Down.slice(iAlt) *= R;
950-
//A12_Down.slice(iAlt) *= R;
951-
//A21_Down.slice(iAlt) *= R;
952-
//A22_Down.slice(iAlt) *= R;
953-
//A11_inv_Down.slice(iAlt) /= R;
954-
//A12_inv_Down.slice(iAlt) /= R;
955-
//A21_inv_Down.slice(iAlt) /= R;
956-
//A22_inv_Down.slice(iAlt) /= R;
957-
//g11_upper_Down.slice(iAlt) /= R * R;
958-
//g12_upper_Down.slice(iAlt) /= R * R;
959-
//g21_upper_Down.slice(iAlt) /= R * R;
960-
//g22_upper_Down.slice(iAlt) /= R * R;
961-
//sqrt_g_Down.slice(iAlt) *= R * R;
962-
963922
refx_Corner.slice(iAlt) *= R;
964923
refy_Corner.slice(iAlt) *= R;
965924
}
@@ -991,13 +950,15 @@ bool Grid::init_geo_grid(Quadtree quadtree,
991950
else
992951
create_sphere_connection(quadtree);
993952

994-
if (input.get_do_restart()) {
953+
if (input.get_do_restart() & !input.get_is_cubesphere()) {
995954
report.print(1, "Restarting! Reading grid files!");
996955
DidWork = read_restart(input.get_restartin_dir());
997956
} else {
998-
if (input.get_is_cubesphere())
957+
if (input.get_is_cubesphere()) {
958+
if (input.get_do_restart())
959+
report.print(0, "Not restarting the grid - it is too complicated!");
999960
create_cubesphere_grid(quadtree);
1000-
else
961+
} else
1001962
create_sphere_grid(quadtree);
1002963

1003964
MPI_Barrier(aether_comm);

0 commit comments

Comments
 (0)