aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843>2011-01-03 18:50:31 +0000
committerhinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843>2011-01-03 18:50:31 +0000
commit8a261b82b40e89d433499fd8ac82a1050c02bbce (patch)
treedc0450cd50e8304aed1d43de9530871c38cc4cfc
parentd0669ecb4192707473d9f47526541a4d3b3d6146 (diff)
Use IO::out_dir parameter by sharing from implementation rather than via CCTK_ParameterGet
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/Multipole/trunk@73 4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843
-rw-r--r--param.ccl4
-rw-r--r--src/utils.cc9
2 files changed, 5 insertions, 8 deletions
diff --git a/param.ccl b/param.ccl
index 2d192ff..2f089dc 100644
--- a/param.ccl
+++ b/param.ccl
@@ -1,5 +1,9 @@
#param.ccl for thorn Multipole
+shares: IO
+
+USES STRING out_dir
+
restricted:
#Interpolator params:
CCTK_STRING interpolator_name "Which interpolator should I use"
diff --git a/src/utils.cc b/src/utils.cc
index 01a6b15..168acc2 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -24,15 +24,8 @@ FILE *Multipole_OpenOutputFile(CCTK_ARGUMENTS, const string &name)
bool first_time = cctk_iteration == 0;
const char *mode = first_time ? "w" : "a";
- CCTK_STRING *out_dir = (CCTK_STRING *) CCTK_ParameterGet("out_dir", "IOUtil", NULL);
- if (*out_dir == 0)
- {
- CCTK_WARN(1,"Parameter IOUtil::out_dir not found");
- return 0;
- }
-
- string output_name(string(*out_dir) + "/" + name);
+ string output_name(string(out_dir) + "/" + name);
FILE *fp = fopen(output_name.c_str(), mode);