[Users] Loop on timelevels in POSTREGRID

Federico Guercilena guercilena at th.physik.uni-frankfurt.de
Thu Jun 8 07:07:42 CDT 2017


Hello,

I have a viscosity grid function I want to evaluate (among other places) at
CCTK_POSTREGRID, so that it'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 "current"
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.

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's a more elegant, Cactus/Carpet
native solution. My fix could maybe also slightly impact performance.

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'm disregarding something.

Thanks,
Federico Guercilena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20170608/9104c7f6/attachment.html 


More information about the Users mailing list