10
10
#include < algorithm>
11
11
#include < cmath>
12
12
#include < iostream>
13
+ #include < Kokkos_Timer.hpp>
13
14
#include < sstream>
14
15
#include < string>
15
16
#include < vector>
@@ -135,6 +136,7 @@ void LoadSpectreInitialData(MeshBlockPack *pmbp, const std::string &filename_glo
135
136
x[2 ].resize (sz);
136
137
137
138
int nmb = pmbp->nmb_thispack ;
139
+ Kokkos::Timer timer{};
138
140
for (int m = 0 ; m < nmb; ++m) {
139
141
// Get the coordinates for this meshblock
140
142
Real &x1min = size.h_view (m).x1min ;
@@ -155,8 +157,9 @@ void LoadSpectreInitialData(MeshBlockPack *pmbp, const std::string &filename_glo
155
157
}
156
158
157
159
// Interpolate data to the coordinates
160
+ timer.reset ();
158
161
std::cout << " Interpolating initial data for meshblock " << m << " /"
159
- << nmb - 1 << " with " << sz << " points " << std::endl;
162
+ << nmb - 1 << " with " << sz << " points... " << std::endl;
160
163
const auto data = spectre::Exporter::interpolate_to_points<3 >(
161
164
filename_glob, subfile_name, spectre::Exporter::ObservationStep{observation_step},
162
165
{" SpatialMetric_xx" , " SpatialMetric_yx" , " SpatialMetric_yy" ,
@@ -165,6 +168,8 @@ void LoadSpectreInitialData(MeshBlockPack *pmbp, const std::string &filename_glo
165
168
" ExtrinsicCurvature_zx" , " ExtrinsicCurvature_zy" , " ExtrinsicCurvature_zz" },
166
169
/* target_points */ x,
167
170
/* extrapolate_into_excisions */ true );
171
+ std::cout << " done in " << timer.seconds () << " seconds." << std::endl;
172
+
168
173
const auto &gxx = data[0 ];
169
174
const auto &gyx = data[1 ];
170
175
const auto &gyy = data[2 ];
0 commit comments