Hi, I've discovered a small bug in Multipole_experimental. In a couple places in gr_mpolePot* and gr_mpoleMom* there is the following set of lines:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
rscaled = r * dr_inner_zone_inv <br>dr_unit = int (ceiling (rscaled * inner_zone_grid_inv) * inner_zone_grid)<br>Q_lower = inner_zone_Qlower (dr_unit) <br clear="all">
</blockquote><div><br>Occasionally, if r is small enough, dr_unit will be 0, which causes an out of bounds error when referencing inner_zone_Qlower. The fix is to replace the dr_unit assignments with the following:<br><br>
<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">dr_unit = max(int (ceiling (rscaled * inner_zone_grid_inv) * inner_zone_grid), 1)<br></blockquote>
</div><br>Cheers,<br>- James<br><br>-- <br>James Guillochon<br>Department of Astronomy & Astrophysics<br>University of California, Santa Cruz<br><a href="mailto:jfg@ucolick.org" target="_blank">jfg@ucolick.org</a><br>