<div dir="ltr">Federico<div><br></div><div>The postregrid bin is run after regridding. All grid points on the new grid must be defined in some way -- either via interpolation (space and/or time) and boundary synchronization/prolongation, or they must be recalculated from other data. Typically, evolved quantities such as density and momentum are interpolated, and other quantities such as the pressure are defined based on the evolved quantities. This needs to happen on all time levels, hence this loop. This loop cannot be disabled, as it would leave past time levels undefined, which would lead to problems during the next boundary prolongation, as this might access past time levels for time interpolation.</div><div><br></div><div>Is your viscosity evolved, or can it be calculated from other quantities? How should its values be defined after regridding? This should probably be the same procedure as for setting up initial conditions.</div><div><br></div><div>-erik</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 8, 2017 at 8:07 AM, Federico Guercilena <span dir="ltr">&lt;<a href="mailto:guercilena@th.physik.uni-frankfurt.de" target="_blank">guercilena@th.physik.uni-frankfurt.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I have a viscosity grid function I want to evaluate (among other places) at CCTK_POSTREGRID, so that it&#39;s consistent and ready for use at CCTK_EVOL. Problem is, the viscosity depends on the past timelevels of another grid function (the entropy). It seems Carpet loops on the timelevels in CCTK_POSTREGRID, which means that when the loop is on the &quot;current&quot; timelevel everything works fine, but when the loop moves onto some past timelevel, the other timelevels, the ones further in the past so to speak, are undefined. In particular the code segfaults when trying to access something like entropy_p_p[ijk], since entropy_p_p does not point to a valid memory address.</div><div><br></div><div>I was able to fix this simply by checking if the pointers to past timelevels are valid, and breaking out of the function otherwise. This does the trick, but I was wondering if there&#39;s a more elegant, Cactus/Carpet native solution. My fix could maybe also slightly impact performance.</div><div><br></div><div>Is there a way to disable the loop on timelevels in CCTK_POSTREGRID (but only for a given scheduled routine)? Or to schedule something after POSTREGRID, but before timelevels are rotated? As far as I know neither is possible, but hopefully I&#39;m disregarding something.</div><div><br></div><div>Thanks,</div><div>Federico Guercilena</div></div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@einsteintoolkit.org">Users@einsteintoolkit.org</a><br>
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.einsteintoolkit.<wbr>org/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Erik Schnetter &lt;<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>&gt;<br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a></div><div><br></div></div></div>
</div>