[Users] Adding gridfunction output mid-subroutine?

Scott Hawley scott.hawley at belmont.edu
Tue May 8 18:41:22 CDT 2012


Hey guys,
  Frank recommended CCTK_OutputVarAsByMethod, but gave code for
CCTK_OutputVarAsBy.
When I use the latter, the code segmentation faults.

Ian, I couldn't find where you set the variable output_method in your
example.  Where does that definition go?

  CCTK_OutputVarAsByMethod(cctkGH, fullvarname, output_method, alias_name);


Thanks,
Scott




On 5/1/12 10:25 AM, "Frank Loeffler" <knarf at cct.lsu.edu> wrote:

>On Tue, May 01, 2012 at 08:16:03AM -0700, Scott Hawley wrote:
>> Is there a way to, e.g. call CarpetIOHDF5, from the middle of a
>>subroutine
>> -- apart from "scheduling" the output?
>
>That should be possible using CCTK_OutputVarAsByMethod, see below.
>
>Frank
>
>int istat = CCTK_OutputVarAs (const cGH *cctkGH,
>                              const char *variable,
>                              const char *alias);
>
>Parameters
>
>istat    return status
>cctkGH   pointer to CCTK grid hierarchy
>variable full name of variable to output, with an optional options stri
>alias    alias name to base the output filename on
>
>Discussion
>           The output should take place if at all possible. If the
>           appropriate file exists the data
>           is appended, otherwise a new file is created. Uses alias as
>           the name of the variable
>           for the purpose of constructing a filename.
>
>
>Errors
>positive the number of IO methods which did output of variable
>0        for success
>negative if no IO methods were registered
>



More information about the Users mailing list