<html>#2418: have DECLARE_CCTK_ARGUMENTS_CHECKED hide cctkGH members that do not exist in LEVEL mode etc.
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'> Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'> Version:</td><td></td></tr>
<tr><td style='text-align:right'> Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td></td></tr>
</table>
<p>Comment (by Roland Haas):</p>
<p>There may be some issues to consider. Eg one use of “options: GLOBAL” is if the scheduled function does its own looping over components etc. Something like (I cannot remember the exact syntax of the various mode changing macros): </p>
<div class="codehilite"><pre><span></span>schedule MyThorn_Func
{
options: global
READS: mygf
lang: C
} "do something with the data on the grid"
</pre></div>
<p>and then</p>
<div class="codehilite language-c"><pre><span></span><span class="kt">void</span> <span class="nf">MyTHorn_Func</span><span class="p">(</span><span class="n">CCTK_ARGUMENTS</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">BEGIN_REFLEVEL_LOOP</span><span class="p">(</span><span class="n">cctkGH</span><span class="p">)</span> <span class="p">{</span>
<span class="n">BEGIN_LOCAL_MAP_LOOP</span><span class="p">{(</span><span class="n">cctkGH</span><span class="p">,</span> <span class="n">reflevel</span><span class="p">)}</span>
<span class="n">BEGIN_LOCAL_COMPONENT_LOOP</span><span class="p">(</span><span class="n">cctkGH</span><span class="p">,</span> <span class="n">map</span><span class="p">)</span> <span class="p">{</span>
<span class="n">DECLARE_CCTK_ARGUTMENTS_MyThorn_Fun</span><span class="p">;</span>
<span class="kt">int</span> <span class="n">idx</span> <span class="o">=</span> <span class="n">CCTK_GFINDEX3D</span><span class="p">(</span><span class="n">cctkGH</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">);</span>
<span class="kt">double</span> <span class="n">value</span> <span class="o">=</span> <span class="n">mygf</span><span class="p">[</span><span class="n">idx</span><span class="p">];</span>
<span class="p">}</span> <span class="n">END_LOCAL_COMPONENT_LOOP</span><span class="p">;</span>
<span class="p">}</span> <span class="n">END_LOCAL_MAP_LOOP</span>
<span class="p">}</span> <span
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2418/have-declare_cctk_arguments_checked-hide'>https://bitbucket.org/einsteintoolkit/tickets/issues/2418/have-declare_cctk_arguments_checked-hide</a></p>
</html>