JD6PQOJ6YYNQYEEWEXO2NM7NVYNBUI6V7ZU6Q3FNHGAT2VYOF5WAC
template <typename T> struct reduction {
T fmax1(T x, T y) {
if (CCTK_isnan(x))
return x;
if (CCTK_isnan(y))
return y;
return fmax(x, y);
}
T fmin1(T x, T y) {
if (CCTK_isnan(x))
return x;
if (CCTK_isnan(y))
return y;
return fmin(x, y);
}
template <typename T> T fmax1(T x, T y) {
if (CCTK_isnan(x))
return x;
if (CCTK_isnan(y))
return y;
return fmax(x, y);
}
template <typename T> T fmin1(T x, T y) {
if (CCTK_isnan(x))
return x;
if (CCTK_isnan(y))
return y;
return fmin(x, y);
}
double pts0 = ghext->leveldata.at(0).mfab0->boxArray().d_numPts();
for (const auto &leveldata : ghext->leveldata) {
int sz = leveldata.mfab0->size();
double pts = leveldata.mfab0->boxArray().d_numPts();
CCTK_VINFO(" level %d: %d boxes, %.0f cells (%.4g%%)", leveldata.level,
sz, pts,
100 * pts / (pow(2.0, dim * leveldata.level) * pts0));
}
double pts0 = ghext->leveldata.at(0).mfab0->boxArray().d_numPts();
for (const auto &leveldata : ghext->leveldata) {
int sz = leveldata.mfab0->size();
double pts = leveldata.mfab0->boxArray().d_numPts();
CCTK_VINFO(" level %d: %d boxes, %.0f cells (%.4g%%)", leveldata.level,
sz, pts,
100 * pts / (pow(2.0, dim * leveldata.level) * pts0));
}