aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetRegrid2/src/regrid.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetRegrid2/src/regrid.cc')
-rw-r--r--Carpet/CarpetRegrid2/src/regrid.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/Carpet/CarpetRegrid2/src/regrid.cc b/Carpet/CarpetRegrid2/src/regrid.cc
index b0d4c4d7c..85f1c0b83 100644
--- a/Carpet/CarpetRegrid2/src/regrid.cc
+++ b/Carpet/CarpetRegrid2/src/regrid.cc
@@ -19,6 +19,7 @@
#include <vect.hh>
#include <carpet.hh>
+#include <CarpetTimers.hh>
#include "indexing.hh"
@@ -829,6 +830,10 @@ namespace CarpetRegrid2 {
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
+ char const * const where = "CarpetRegrid2::Regrid";
+ static Carpet::Timer timer (where);
+ timer.start();
+
assert (is_singlemap_mode());
// Decide whether to change the grid hierarchy
@@ -950,7 +955,7 @@ namespace CarpetRegrid2 {
Regrid (cctkGH, superregss);
// Make multiprocessor aware
- vector <vector <region_t> > regss;
+ vector <vector <region_t> > regss (superregss.size());
for (size_t rl = 0; rl < regss.size(); ++ rl) {
SplitRegions (cctkGH, superregss.at(rl), regss.at(rl));
} // for rl
@@ -973,6 +978,8 @@ namespace CarpetRegrid2 {
} // if do_recompose
+ timer.stop();
+
return do_recompose;
}
@@ -989,6 +996,10 @@ namespace CarpetRegrid2 {
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
+ char const * const where = "CarpetRegrid2::RegridMaps";
+ static Carpet::Timer timer (where);
+ timer.start();
+
assert (is_level_mode());
// Decide whether to change the grid hierarchy
@@ -1161,6 +1172,8 @@ namespace CarpetRegrid2 {
} // if do_recompose
+ timer.stop();
+
return do_recompose;
}