<html>#2641: ML_BSSN macro usage bypasses personalized read/write macros
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Samuel Cupp</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>development version</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>trivial</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Kranc</td></tr>
</table>

<p>The new macros are designed to only give access to the variables listed by read/write declarations, but ML_BSSN bypasses this sanity check with its *_Body internal functions. As an example, in ML_BSSN/src/ML_BSSN_ADMBaseInterior.cc is the scheduled function</p>
<div class="codehilite"><pre><span></span><span class="k">extern</span> <span class="s">&quot;C&quot;</span> <span class="kt">void</span> <span class="n">ML_BSSN_ADMBaseInterior</span><span class="p">(</span><span class="n">CCTK_ARGUMENTS</span><span class="p">)</span>
<span class="p">{</span>
  <span class="cp">#ifdef DECLARE_CCTK_ARGUMENTS_ML_BSSN_ADMBaseInterior</span>
  <span class="n">DECLARE_CCTK_ARGUMENTS_CHECKED</span><span class="p">(</span><span class="n">ML_BSSN_ADMBaseInterior</span><span class="p">);</span>
  <span class="cp">#else</span>
  <span class="n">DECLARE_CCTK_ARGUMENTS</span><span class="p">;</span>
  <span class="cp">#endif</span>
  <span class="n">DECLARE_CCTK_PARAMETERS</span><span class="p">;</span>
</pre></div>


<p>which then calls</p>
<div class="codehilite"><pre><span></span><span>static void ML_BSSN_ADMBaseInterior_Body(const cGH* restrict const cctkGH, const int dir, const int face, const CCTK_REAL normal[3], const CCTK_REAL tangentA[3], const CCTK_REAL tangentB[3], const int imin[3], const int imax[3], const int n_subblock_gfs, CCTK_REAL* restrict const subblock_gfs[])        </span>
<span>{</span>
<span>  DECLARE_CCTK_ARGUMENTS;</span>
<span>  DECLARE_CCTK_PARAMETERS;</span>
</pre></div>


<p>The various *_Body should (ideally) either have their required variables passed explicitly or use the macro of the parent function. While the two macros don’t produce different numerical results, the personalized macros help validate the code’s behavior. It is admittedly a pretty low-priority task, but using the new macro is preferred when possible.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2641/ml_bssn-macro-usage-bypasses-personalized'>https://bitbucket.org/einsteintoolkit/tickets/issues/2641/ml_bssn-macro-usage-bypasses-personalized</a></p>
</html>