ianhinder / Kranc

A Mathematica package for generating code for solving time dependent partial differential equations
http://kranccode.org
GNU General Public License v2.0
28 stars 10 forks source link

CodeGenCalculation.m: make calc_every work in both EVOL and POSTSTEP #140

Closed rhaas80 closed 1 year ago

rhaas80 commented 7 years ago

for a refinement level that evaluates every rl_every the routines are called in EVOL whenever (cctk_iteration-1) % rl_every is zero (ie the iteration after cctk_iteration % rl_every was valid). Thus calc_offset needs to be set to 1 and removed from the iteration number rather than checked for as a remaineder.