Yes, this is the way to do it.

-erik

On Sat, May 5, 2018 at 03:30 Chris Stevens <c.stevens@ru.ac.za> wrote:

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

_______________________________________________
Users mailing list
Users@einsteintoolkit.org
http://lists.einsteintoolkit.org/mailman/listinfo/users
--
Erik Schnetter <schnetter@cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/