AMReX-Astro/Microphysics

speed up chabrier1998 screening by adding `` entries

zingale opened this issue · 3 comments

Currently, in chabrier1998, we do:

  Real Gamma1 = Gamma_e * std::pow(scn_fac.z1, 5.0_rt/3.0_rt);                                                                                          
  Real Gamma2 = Gamma_e * std::pow(scn_fac.z2, 5.0_rt/3.0_rt);                                                                                          
  Real Gamma12 = Gamma_e * std::pow(zcomp, 5.0_rt/3.0_rt);   

we should move these pow's into screen_factors_t, perhaps only enabled if we are using this screening routine. This will save on a lot of expensive pows

yut23 commented

The quantum correction terms also use a lot of pows, which we should probably switch to nested evaluation like in screen5.

I'm actually debating on whether those terms are needed. These quantum correction terms were not in the original chabrier&potekhin paper. They were introduced in Calder's paper, so I added them. Removing them might give better convergence with NSE states too, although I never tested it.

I think that this has been addressed now