<div><div dir="auto">Yes, this is the way to do it.</div><div dir="auto"><br></div><div dir="auto">-erik</div><br><div class="gmail_quote"><div>On Sat, May 5, 2018 at 03:30 Chris Stevens <<a href="mailto:c.stevens@ru.ac.za">c.stevens@ru.ac.za</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi everyone,</p>
<p>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:</p>
<p>-- 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?<br>
</p>
<p>-- I can call functions with argument CCTK_ARGUMENTS within the
same thorn by using CCTK_PASS_CTOC.</p>
<p>As a current fix (copied from CTGamma code), I can write the
function like</p>
<p>void test(CCTK_POINTER_TO_CONST _cctkGH)<br>
{<br>
const cGH* const cctkGH = _cctkGH; <br>
DECLARE_CCTK_ARGUMENTS;<br>
DECLARE_CCTK_PARAMETERS;<br>
<br>
}<br>
</p>
<p>where this argument can now be passed through the interface file
and seems to do a similar thing to CCTK_ARGUMENTS.</p>
<p>Any help to figure out the best way to do this would be much
appreciated!</p>
<p>Thanks,</p>
<p>Chris<br>
</p>
<div class="m_1948631366082092769moz-signature">-- <br>
<font color="#666666" size="-1" face="Cantarell">Dr Chris Stevens<br>
<br>
Claude Leon Postdoctoral Fellow<br>
</font>
<div class="m_1948631366082092769moz-signature">
<div class="m_1948631366082092769moz-signature">
<div class="m_1948631366082092769moz-signature"> <font color="#666666" size="-1" face="Cantarell"> </font>
<p><font color="#666666" size="-1" face="Cantarell">Department
of Mathematics</font></p>
<font color="#666666" size="-1" face="Cantarell"> </font>
<p><font color="#666666" size="-1" face="Cantarell">Rhodes
University</font></p>
<p><font color="#666666"><font size="-1"><font face="Cantarell">Room 5</font></font></font></p>
<p><font color="#666666"><font size="-1"><font face="Cantarell"> Ph: +27 46 603 8932</font></font></font></p>
<p><font color="#666666"><font size="-1"><font face="Cantarell">Web: <a href="http://www.chrisdoesmaths.com" target="_blank">www.chrisdoesmaths.com</a></font></font></font></p>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@einsteintoolkit.org" target="_blank">Users@einsteintoolkit.org</a><br>
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.einsteintoolkit.org/mailman/listinfo/users</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a></div><div><br></div></div></div>