@@ -37,40 +37,34 @@ int main() {
37
37
// cubesphere (6 root)
38
38
Quadtree quadtree (input.get_grid_shape (" neuGrid" ));
39
39
Quadtree quadtree_ion (input.get_grid_shape (" ionGrid" ));
40
-
41
40
if (!quadtree.is_ok ())
42
41
throw std::string (" quadtree initialization failed!" );
43
42
44
43
// Initialize MPI and parallel aspects of the code:
45
44
didWork = init_parallel (quadtree, quadtree_ion);
46
-
47
45
if (!didWork)
48
46
throw std::string (" init_parallel failed!" );
49
47
50
48
// Everything should be set for the inputs now, so write a restart file:
51
49
didWork = input.write_restart ();
52
-
53
50
if (!didWork)
54
51
throw std::string (" input.write_restart failed!" );
55
52
56
53
// Initialize the EUV system:
57
54
Euv euv;
58
-
59
55
if (!euv.is_ok ())
60
56
throw std::string (" EUV initialization failed!" );
61
57
62
58
// Initialize the planet:
63
59
Planets planet;
64
60
MPI_Barrier (aether_comm);
65
-
66
61
if (!planet.is_ok ())
67
62
throw std::string (" planet initialization failed!" );
68
63
69
64
// Initialize the indices, read the files, and perturb:
70
65
Indices indices;
71
66
didWork = read_and_store_indices (indices);
72
67
MPI_Barrier (aether_comm);
73
-
74
68
if (!didWork)
75
69
throw std::string (" read_and_store_indices failed!" );
76
70
@@ -82,7 +76,6 @@ int main() {
82
76
Grid gGrid (" neuGrid" );
83
77
didWork = gGrid .init_geo_grid (quadtree, planet);
84
78
MPI_Barrier (aether_comm);
85
-
86
79
if (!didWork)
87
80
throw std::string (" init_geo_grid failed!" );
88
81
@@ -101,13 +94,15 @@ int main() {
101
94
didWork = mGrid .init_dipole_grid (quadtree_ion, planet);
102
95
if (!didWork)
103
96
throw std::string (" init_dipole_grid failed!" );
104
- }
105
- else {
97
+ } else {
106
98
std::cout << " Making Spherical Magnetic Grid\n " ;
107
99
mGrid .set_IsDipole (false );
108
100
didWork = mGrid .init_geo_grid (quadtree, planet);
109
101
mGrid .set_IsGeoGrid (false );
110
102
}
103
+
104
+ didWork = grid_match (gGrid , mGrid , quadtree, quadtree_ion);
105
+
111
106
// Initialize Neutrals on geographic grid:
112
107
Neutrals neutrals (gGrid , planet, time, indices);
113
108
// Initialize Neutrals on magnetic grid:
0 commit comments