[Users] Calling a function in Thorn A from Thorn B

Chris Stevens c.stevens at ru.ac.za
Sat May 5 02:30:25 CDT 2018


Hi everyone,

I am in a situation where I want to call a function whose argument is 
just CCTK_ARGUMENTS from another thorn. I am aware of the following:

-- I can share functions defined between thorns through the 
interface.ccl of the thorns, but I do not know how to specify 
CCTK_ARGUMENTS in the interface file. I cannot seem to find the 
cctk_arguments.h header anywhere in the Cactus directory to see what the 
definition of this is?

-- I can call functions with argument CCTK_ARGUMENTS within the same 
thorn by using CCTK_PASS_CTOC.

As a current fix (copied from CTGamma code), I can write the function like

void test(CCTK_POINTER_TO_CONST _cctkGH)
{
   const cGH* const cctkGH = _cctkGH;
   DECLARE_CCTK_ARGUMENTS;
   DECLARE_CCTK_PARAMETERS;

}

where this argument can now be passed through the interface file and 
seems to do a similar thing to CCTK_ARGUMENTS.

Any help to figure out the best way to do this would be much appreciated!

Thanks,

Chris

-- 
Dr Chris Stevens

Claude Leon Postdoctoral Fellow

Department of Mathematics

Rhodes University

Room 5

Ph: +27 46 603 8932

Web: www.chrisdoesmaths.com <http://www.chrisdoesmaths.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20180505/bb229cbf/attachment.html 


More information about the Users mailing list