<html>#2653: Carpet PreSync triggering syncs for all refinement levels unnecessarily
<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></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>Carpet</td></tr>
</table>
<p>In Carpet, the function <code>PreSyncGroups</code> calls <code>SyncProlongateGroups</code> to automatically sync variables based on the reads and writes. I include the function below.</p>
<div class="codehilite"><pre><span></span><span class="n">void</span> <span class="n">PreSyncGroups</span><span class="p">(</span><span class="n">cFunctionData</span> <span class="o">*</span><span class="n">attribute</span><span class="p">,</span> <span class="n">cGH</span> <span class="o">*</span><span class="n">cctkGH</span><span class="p">,</span>
<span class="n">const</span> <span class="n">std</span><span class="p">::</span><span class="n">vector</span><span class="o"><</span><span class="nb">int</span><span class="o">></span> <span class="o">&</span><span class="n">pre_groups</span><span class="p">)</span> <span>{</span>
<span class="n">DECLARE_CCTK_PARAMETERS</span><span class="p">;</span>
<span class="n">assert</span><span class="p">(</span><span class="k">not</span> <span class="n">CCTK_EQUALS</span><span class="p">(</span><span class="n">presync_mode</span><span class="p">,</span> <span class="ss">"off"</span><span class="p">)</span> <span class="k">and</span>
<span class="k">not</span> <span class="n">CCTK_EQUALS</span><span class="p">(</span><span class="n">presync_mode</span><span class="p">,</span> <span class="ss">"warn-only"</span><span class="p">));</span>
<span class="k">if</span> <span class="p">(</span><span class="n">pre_groups</span><span class="p">.</span><span class="n">empty</span><span class="p">())</span>
<span class="k">return</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="n">reflevel</span> <span class="o">></span> <span class="mi">0</span><span class="p">)</span> <span>{</span>
<span class="o">//</span> <span class="n">recurse</span> <span class="k">to</span> <span class="k">check</span> <span class="n">that</span> <span class="k">all</span> <span class="n">coarsers</span
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2653/carpet-presync-triggering-syncs-for-all'>https://bitbucket.org/einsteintoolkit/tickets/issues/2653/carpet-presync-triggering-syncs-for-all</a></p>
</html>