diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-05-27 19:11:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-05-27 19:11:00 +0000 |
commit | ab4fde12c6bbe1cd2e1cc7d13bc37ed11e491bac (patch) | |
tree | 32a7f03a4687546cb9e0cfcb7c3777851a8b8beb /Carpet/CarpetRegrid2/src | |
parent | 6d6f6d76cfee06823d85e209e64c6bb6bf7c4891 (diff) |
CarpetRegrid2: More output when parameter verbose is set
Output the location of the centres of the refined regions when they change.
darcs-hash:20070527191139-dae7b-16394354ba0ffc6bb9414666546eaa23529db092.gz
Diffstat (limited to 'Carpet/CarpetRegrid2/src')
-rw-r--r-- | Carpet/CarpetRegrid2/src/initialise.cc | 11 | ||||
-rw-r--r-- | Carpet/CarpetRegrid2/src/regrid.cc | 42 |
2 files changed, 51 insertions, 2 deletions
diff --git a/Carpet/CarpetRegrid2/src/initialise.cc b/Carpet/CarpetRegrid2/src/initialise.cc index 79c20d054..8d1a32ce4 100644 --- a/Carpet/CarpetRegrid2/src/initialise.cc +++ b/Carpet/CarpetRegrid2/src/initialise.cc @@ -140,6 +140,17 @@ namespace CarpetRegrid2 { old_position_y[n] = position_y[n]; old_position_z[n] = position_z[n]; } + + if (verbose) { + for (int n = 0; n < num_centres; ++ n) { + CCTK_VInfo (CCTK_THORNSTRING, + "Initialising position of centre %d to [%g,%g,%g]", + n, + static_cast <double> (position_x[n]), + static_cast <double> (position_y[n]), + static_cast <double> (position_z[n])); + } + } } } // namespace CarpetRegrid2 diff --git a/Carpet/CarpetRegrid2/src/regrid.cc b/Carpet/CarpetRegrid2/src/regrid.cc index 5fe4ac8df..6d885f5cc 100644 --- a/Carpet/CarpetRegrid2/src/regrid.cc +++ b/Carpet/CarpetRegrid2/src/regrid.cc @@ -662,7 +662,20 @@ namespace CarpetRegrid2 { } } - if (do_recompose and cctk_iteration != 0) { + if (verbose) { + if (do_recompose) { + for (int n = 0; n < num_centres; ++ n) { + CCTK_VInfo (CCTK_THORNSTRING, + "Centre %d is at position [%g,%g,%g]", + n, + static_cast <double> (position_x[n]), + static_cast <double> (position_y[n]), + static_cast <double> (position_z[n])); + } + } + } + + if (do_recompose and * last_iteration != -1) { // Regrid only if the positions have changed sufficiently do_recompose = false; for (int n = 0; n < num_centres; ++ n) { @@ -687,6 +700,12 @@ namespace CarpetRegrid2 { do_recompose = dist2 >= pow (mindist, 2); if (do_recompose) break; } // for n + if (verbose) { + if (not do_recompose) { + CCTK_INFO + ("Centres have not moved sufficiently; skipping regridding"); + } + } } if (do_recompose) { @@ -757,7 +776,20 @@ namespace CarpetRegrid2 { } } - if (do_recompose and cctk_iteration != 0) { + if (verbose) { + if (do_recompose) { + for (int n = 0; n < num_centres; ++ n) { + CCTK_VInfo (CCTK_THORNSTRING, + "Centre %d is at position [%g,%g,%g]", + n, + static_cast <double> (position_x[n]), + static_cast <double> (position_y[n]), + static_cast <double> (position_z[n])); + } + } + } + + if (do_recompose and * last_iteration != -1) { // Regrid only if the positions have changed sufficiently do_recompose = false; for (int n = 0; n < num_centres; ++ n) { @@ -782,6 +814,12 @@ namespace CarpetRegrid2 { do_recompose = dist2 >= pow (mindist, 2); if (do_recompose) break; } // for n + if (verbose) { + if (not do_recompose) { + CCTK_INFO + ("Centres have not moved sufficiently; skipping regridding"); + } + } } if (do_recompose) { |