Microphysics icon indicating copy to clipboard operation
Microphysics copied to clipboard

For aprox13, rate tabulation should be the default

Open maximumcats opened this issue 9 years ago • 6 comments

This gives fairly accurate results relative to the direct rate evaluation method, but is much faster on CPUs and essentially necessary for GPUs.

This can be done by setting use_tables to .true. in the aprox13/_parameters file.

maximumcats avatar Sep 16 '16 13:09 maximumcats

do we want to just change this?

zingale avatar Oct 12 '17 20:10 zingale

Yes.

maximumcats avatar Oct 12 '17 20:10 maximumcats

interestingly, with tables, aprox13 integration with test_react does more RHS evals:

no table:

 Execution time:    30.443917989730835     
 RHS stats:
   min:            6
   avg:         1522
   max:        23965

tables:

 Execution time:    26.683586120605469     
 RHS stats:
   min:            6
   avg:         1916
   max:        46530

zingale avatar Oct 12 '17 23:10 zingale

Here's the comparison for the test:

            variable name            absolute error            relative error
                                        (||A - B||)         (||A - B||/||A||)
 ----------------------------------------------------------------------
 level =  1
 density                            0.000000000               0.000000000    
 temperature                        0.000000000               0.000000000    
 Xnew_helium-4                     0.7446594393E-06          0.7446594402E-06
 Xnew_carbon-12                    0.1807416444E-06          0.5839670568E-06
 Xnew_oxygen-16                    0.4457918293E-06          0.7767817760E-06
 Xnew_neon-20                      0.1002733683E-06          0.3127164189E-06
 Xnew_magnesium-24                 0.7251977366E-07          0.2474042924E-06
 Xnew_silicon-28                   0.5241993420E-06          0.8563144416E-06
 Xnew_sulfur-32                    0.3410176564E-06          0.1028486974E-05
 Xnew_argon-36                     0.1558357633E-06          0.4576690622E-06
 Xnew_calcium-40                   0.6082129856E-06          0.8300185222E-06
 Xnew_titanium-44                  0.7081178333E-06          0.1377724014E-05
 Xnew_chromium-48                  0.2046546471E-06          0.5383569083E-06
 Xnew_iron-52                      0.5256162670E-06          0.1038257153E-05
 Xnew_nickel-56                    0.6329660721E-06          0.6577058145E-06
 Xold_helium-4                      0.000000000               0.000000000    
 Xold_carbon-12                     0.000000000               0.000000000    
 Xold_oxygen-16                     0.000000000               0.000000000    
 Xold_neon-20                       0.000000000               0.000000000    
 Xold_magnesium-24                  0.000000000               0.000000000    
 Xold_silicon-28                    0.000000000               0.000000000    
 Xold_sulfur-32                     0.000000000               0.000000000    
 Xold_argon-36                      0.000000000               0.000000000    
 Xold_calcium-40                    0.000000000               0.000000000    
 Xold_titanium-44                   0.000000000               0.000000000    
 Xold_chromium-48                   0.000000000               0.000000000    
 Xold_iron-52                       0.000000000               0.000000000    
 Xold_nickel-56                     0.000000000               0.000000000    
 wdot_helium-4                     0.7446594393E-03          0.8290511421E-06
 wdot_carbon-12                    0.1807416444E-03          0.6024918215E-06
 wdot_oxygen-16                    0.4457918293E-03          0.1486088692E-05
 wdot_neon-20                      0.1002733683E-03          0.3342445927E-06
 wdot_magnesium-24                 0.7251977365E-04          0.2474042925E-06
 wdot_silicon-28                   0.5241993421E-03          0.8563144418E-06
 wdot_sulfur-32                    0.3410176564E-03          0.1028486975E-05
 wdot_argon-36                     0.1558357633E-03          0.4576690623E-06
 wdot_calcium-40                   0.6082129856E-03          0.8300185223E-06
 wdot_titanium-44                  0.7081178333E-03          0.1377724014E-05
 wdot_chromium-48                  0.2046546471E-03          0.5383569084E-06
 wdot_iron-52                      0.5256162670E-03          0.1038257153E-05
 wdot_nickel-56                    0.6329660721E-03          0.6577058146E-06
 rho_Hnuc                          0.3877592594E+22          0.8471309253E-07

zingale avatar Oct 13 '17 01:10 zingale

is there a reason to do aprox13, but not aprox19 and aprox21?

Also, are the tables compatible with #56?

zingale avatar Oct 13 '17 01:10 zingale

is there a reason to do aprox13, but not aprox19 and aprox21?

Tabulation hasn't been implemented yet in those networks.

Also, are the tables compatible with #56?

Yes.

maximumcats avatar Oct 13 '17 01:10 maximumcats

Closing as resolved -- whether or not to use rate tabulation for the aprox networks is now a Microphysics-wide parameter.

maximumcats avatar Nov 12 '22 05:11 maximumcats