<html>#2582: WVUThorns use CCTK_GFINDEX4D when they should be using CCTK_VECTGFINDEX#D
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td></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>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td></td></tr>
</table>

<p>Eg in Seed_Magnetic_Field:</p>
<div class="codehilite"><pre><span></span><span> Avec[CCTK_GFINDEX4D(cctkGH,i,j,k,0)] = -(yL + 0.5*dY)*A_b*pow(MAX(Pressure_at_</span>
</pre></div>


<p>this causes test failures when compiled with <code>DEBUG=yes</code> or when enabling grid function eidex checking via other means.</p>
<p>Affected thorns seem to be:</p>
<ul>
<li>magnetizedTOV-Baikal (from Baikal)</li>
<li>GiRaFFE_tests_FFEBreak (from GiRaFFE)</li>
<li>GiRaFFE_tests_FastWave (from GiRaFFE)</li>
<li>GiRaFFE_tests_ThreeWave (from GiRaFFE)</li>
<li>magnetizedTOV (from IllinoisGRMHD)</li>
<li>magnetized_explosionTOV (from VolumeIntegrals_GRMHD)</li>
<li>magnetized_explosionTOV (from VolumeIntegrals_vacuum)</li>
<li>magnetized_explosionTOV (from particle_tracerET)</li>
</ul>
<p>Errors in the log file look like this:</p>
<div class="codehilite"><pre><span></span><span>INFO (Seed_Magnetic_Fields): Seeding magnetic fields</span>
<span>ERROR from host ekohaes8 process 0</span>
<span>  while executing schedule bin CCTK_INITIAL, routine Seed_Magnetic_Fields::Seed_Magnetic_Fields</span>
<span>  in thorn Cactus, file /data/rhaas/postdoc/gr/cactus/ET_trunk/configs/sim/build/Cactus/main/DebugDefines.c:105:</span>
<span>  -&gt; Grid function index out of bounds.  i=0 j=0 k=0 l=0 cctk_lsh=[29,29,18,0]</span>
<span>ERROR from host ekohaes8 process 0</span>
<span>  while executing schedule bin CCTK_INITIAL, routine Seed_Magnetic_Fields::Seed_Magnetic_Fields</span>
<span>  in thorn Cactus, file /data/rhaas/postdoc/gr/cactus/ET_trunk/configs/sim/build/Cactus/main/DebugDefines.c:105:</span>
<span>  -&gt; Grid function index out of bounds.  i=0 j=0 k=0 l=0 cctk_lsh=[29,29,18,0]</span>
<span class="c">cactus_sim: /data/rhaas/postdoc/gr/cactus/ET_trunk/configs/sim/build/Carpet/helpers.cc:275: int Carpet::Abort(const cGH*, int): Assertion `0&#39; failed.</span>
<span>Rank 0 with PID 648211 received signal 6</span>
<span>Writing backtrace to magnetizedTOV-Baikal/backtrace.0.txt</span>
</pre></div>


<p>```</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2582/wvuthorns-use-cctk_gfindex4d-when-they'>https://bitbucket.org/einsteintoolkit/tickets/issues/2582/wvuthorns-use-cctk_gfindex4d-when-they</a></p>
</html>