aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetRegrid2/src/regrid.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-09-03 16:19:15 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:42:31 +0000
commit11c4d98017cbb86d08e15fd1b549180184b58a26 (patch)
tree2546a154c6f7bc0bec87de7316125ae7d1453569 /Carpet/CarpetRegrid2/src/regrid.cc
parentf520477b1c14e02f1495cfa8d3e09f4e21ab34d0 (diff)
Import Carpet
Ignore-this: 309b4dd613f4af2b84aa5d6743fdb6b3
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;
}