From 70c40c254dab0dab511b956bfd102bc0f2ebc50b Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Fri, 26 Nov 2010 11:49:06 +0100 Subject: [PATCH 2/3] Use IO::out_dir parameter by sharing from implementation rather than via CCTK_ParameterGet --- param.ccl | 4 ++++ src/utils.cc | 9 +-------- 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); -- 1.7.3.3