<html>#2359: DECLARE_CCTK_ARGUMENTS_FunctionName does not handle private grid variables correctly
<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>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Changes (by Roland Haas):</p>
<p>For grid variables declared <code>PRIVATE</code> in <code>interface.ccl</code> the fully qualified variable name is <code>ThornName::VariableName</code> while for <code>PUBLIC</code> or <code>PROTECTED</code> variables the fully qualified variable name is <code>ImplementationName::VariableName</code> and those forms are what needs to be passed to eg <code>CCTK_VarIndex</code> or <code>CCTK_VarDataPtr</code>.</p>
<p><code>rdwr.pl</code> seems always use the thorn name, which fails if thorn name and implementation name differ and non-PRIVATE variables are used.</p>
<p>An example is <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactustest/src/master/TestReadWrite/interface.ccl" rel="nofollow">https://bitbucket.org/cactuscode/cactustest/src/master/TestReadWrite/interface.ccl</a> where <code>var1</code> is of that time since the implementation is <code>TestReadWriteImp</code>. The auto-generated <code>DECLARE_CCTK_ARGUMENTS_TestReadWrite_TestC_A</code> macro contains:</p>
<div class="codehilite language-c"><pre><span></span><span class="n">cctki_vi_Var1</span> <span class="o">=</span> <span class="n">CCTK_VarIndex</span><span class="p">(</span><span class="s">&quot;testreadwrite::var1&quot;</span><span class="p">);</span>
</pre></div>


<p>which uses the thorn name, leading to <code>NULL</code> pointer for <code>var1</code> even though <code>TestReadWrite_TestC_A</code> declares the variable as <code>WRITES</code>.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2359/declare_cctk_arguments_functionname-does'>https://bitbucket.org/einsteintoolkit/tickets/issues/2359/declare_cctk_arguments_functionname-does</a></p>
</html>