aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetTracker
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-01-12 23:36:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-01-12 23:36:00 +0000
commit0e48349660949bafdd5cc0fb2fd0e32969f6ddc9 (patch)
tree4ad7c766e1691dd0b18c4f8a3f41b98e3ca10b96 /Carpet/CarpetTracker
parent07ed6ded55dcc666d3ef5cf33a3abe25aa32b3bb (diff)
CarpetTracker: Adapt to checkpointing correction in CarpetRegrid2
darcs-hash:20070112233612-dae7b-44a10390f1d0a050e6911ae61c037d52d3fdaede.gz
Diffstat (limited to 'Carpet/CarpetTracker')
-rw-r--r--Carpet/CarpetTracker/param.ccl18
-rw-r--r--Carpet/CarpetTracker/src/SetPositions.cc30
2 files changed, 8 insertions, 40 deletions
diff --git a/Carpet/CarpetTracker/param.ccl b/Carpet/CarpetTracker/param.ccl
index 22c48c3a5..c3b27a74e 100644
--- a/Carpet/CarpetTracker/param.ccl
+++ b/Carpet/CarpetTracker/param.ccl
@@ -18,21 +18,3 @@ CCTK_INT surface[3] "Spherical surface index which is the source for the locatio
SHARES: SphericalSurface
USES CCTK_INT nsurfaces
-
-
-
-#SHARES: CarpetRegrid2
-#
-#USES CCTK_INT num_centres
-#
-#USES CCTK_REAL position_x_1
-#USES CCTK_REAL position_y_1
-#USES CCTK_REAL position_z_1
-#
-#USES CCTK_REAL position_x_2
-#USES CCTK_REAL position_y_2
-#USES CCTK_REAL position_z_2
-#
-#USES CCTK_REAL position_x_3
-#USES CCTK_REAL position_y_3
-#USES CCTK_REAL position_z_3
diff --git a/Carpet/CarpetTracker/src/SetPositions.cc b/Carpet/CarpetTracker/src/SetPositions.cc
index c16f1f61b..cf2292806 100644
--- a/Carpet/CarpetTracker/src/SetPositions.cc
+++ b/Carpet/CarpetTracker/src/SetPositions.cc
@@ -22,22 +22,6 @@ using namespace std;
void
- SetParameter (char const * const dir, int const n, CCTK_REAL const pos)
- {
- ostringstream name_buf;
- name_buf << "position_" << dir << "_" << n + 1;
- string const name (name_buf.str());
- ostringstream pos_buf;
- pos_buf << pos;
- string const pos_str (pos_buf.str());
- int const ierr =
- CCTK_ParameterSet (name.c_str(), "CarpetRegrid2", pos_str.c_str());
- assert (not ierr);
- }
-
-
-
- void
CarpetTracker_SetPositions (CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
@@ -58,9 +42,11 @@ using namespace std;
static_cast <double> (sf_centroid_y[sn]),
static_cast <double> (sf_centroid_z[sn]));
}
- SetParameter ("x", n, sf_centroid_x[sn]);
- SetParameter ("y", n, sf_centroid_y[sn]);
- SetParameter ("z", n, sf_centroid_z[sn]);
+
+ // Set position in CarpetRegrid2
+ position_x[n] = sf_centroid_x[sn];
+ position_y[n] = sf_centroid_y[sn];
+ position_z[n] = sf_centroid_z[sn];
} else {
@@ -70,10 +56,10 @@ using namespace std;
n + 1, sn);
}
- }
+ } // if valid
- } // if
- } // for
+ } // if sn > 0
+ } // for n
}
} // namespace CarpetTracker