piernik-dev / piernik

Piernik MHD Code
GNU General Public License v3.0
15 stars 15 forks source link

CRESP: active bins fixes, option to allow negatives #486

Closed mogrodnik closed 2 years ago

mogrodnik commented 2 years ago

After the list of active bins is constructed and lists of distribution function f with slope q are computed, assume zero where the bins are inactive in order to avoid flux problems. Additionally add 'cresp_disallow_negatives' switch (by default .true. - CFL checks and actions performed); if set to .false. it triggers tolerance of negative values of number density n and energy density e, appearing within CRESP and preventing part of CFL violation actions to be taken in that case; these errors are normally fixed via use_smallecr.