Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ screening #290

Merged
merged 49 commits into from
Mar 26, 2020
Merged

C++ screening #290

merged 49 commits into from
Mar 26, 2020

Conversation

zingale
Copy link
Member

@zingale zingale commented Mar 25, 2020

This ports screen5 to C++. It also makes the number of screenings known at build time (as NSCREEN in C++) -- this greatly simplifies the initialization logic.

@zingale
Copy link
Member Author

zingale commented Mar 26, 2020

diffs between F90 and C++ (using the test_screening{_C} unit tests


            variable name            absolute error            relative error
                                        (||A - B||)         (||A - B||/||A||)
 ----------------------------------------------------------------------------
 level = 0
 density                                          0                         0
 temperature                                      0                         0
 X_hydrogen-1                                     0                         0
 X_helium-3                                       0                         0
 X_helium-4                                       0                         0
 X_carbon-12                                      0                         0
 X_nitrogen-14                                    0                         0
 X_oxygen-16                                      0                         0
 X_neon-20                                        0                         0
 X_magnesium-24                                   0                         0
 X_silicon-28                                     0                         0
 X_sulfur-32                                      0                         0
 X_argon-36                                       0                         0
 X_calcium-40                                     0                         0
 X_titanium-44                                    0                         0
 X_chromium-48                                    0                         0
 X_chromium-56                                    0                         0
 X_iron-52                                        0                         0
 X_iron-54                                        0                         0
 X_iron-56                                        0                         0
 X_nickel-56                                      0                         0
 X_neutron                                        0                         0
 X_proton                                         0                         0
 scn_he4_he4                                3342336           2.533737209e-19
 scn_he4_be8                        1.918461384e+22           2.031274287e-22
 scn_c12_he4                        4.880759047e+35           1.983157552e-25
 scn_c12_c12                                  1e+98           1.346427863e-17
 scn_c12_o16                        1.064175617e+82           5.478589148e-49
 scn_o16_o16                                  1e+98           3.943668288e-23
 scn_o16_he4                        1.375866776e+48            6.66642117e-28
 scn_ne20_he4                       2.589304466e+59           1.697347984e-30
 scn_mg24_he4                        1.05143792e+70           5.942028057e-33
 scn_al27_p                         2.723468086e+29           2.844301281e-17
 scn_si28_he4                       7.622325019e+41           1.633170668e-73
 scn_p31_p                          1.152040865e+34           1.583077536e-17
 scn_s32_he4                        5.450662671e+89            1.50624283e-37
 scn_cl35_p                         1.254791228e+39           3.620525265e-17
 scn_ar36_he4                                 1e+98             2.0871336e-31
 scn_k39_p                          2.568967367e+25           2.316948484e-35
 scn_ca40_he4                        1.81447472e+58           9.341279159e-73
 scn_sc43_p                         1.548563747e+47           6.162290306e-18
 scn_ti44_he4                                 1e+98           4.348584378e-14
 scn_v47_p                          1.555037742e+51           3.696057417e-18
 scn_cr48_he4                       1.979871083e+68           1.019277275e-62
 scn_mn51_p                          1.20205119e+55           2.233643649e-18
 scn_fe52_he4                       1.432290921e+89           7.373720437e-42
 scn_co55_p                         1.479042096e+59           2.735798982e-18
 scn_fe54_p                          9.74667164e+56           1.721844496e-18
 scn_fe54_he4                       2.661313391e+73           1.370097419e-57
 scn_fe56_p                         9.869271283e+56           1.679979674e-18
 scn_d_p                            3.259629011e-09           3.615137393e-16
 scn_p_p                            1.862645149e-09           9.022327079e-16
 scn_he3_he3                                1572864           2.248652584e-17
 scn_he3_he4                                1572864           2.101221055e-18
 scn_c12_p                                    11.25           3.865470379e-26
 scn_n14_p                          7.586630232e+13             2.0455301e-16
 scn_o16_p                                    75776           2.185560651e-28
 scn_n14_he4                        1.557132111e+42           1.536313276e-26
 scn_he4_he4_dt                                 132           5.242022723e-19
 scn_he4_be8_dt                     1.279022294e+18           4.051469139e-22
 scn_c12_he4_dt                     4.373394571e+31           3.867230519e-25
 scn_c12_c12_dt                               1e+98           8.161881244e-15
 scn_c12_o16_dt                     1.303703025e+92           4.422433475e-34
 scn_o16_o16_dt                               1e+98           5.921923526e-15
 scn_o16_he4_dt                     1.561052164e+44           1.318749469e-27
 scn_ne20_he4_dt                    3.428958773e+55           3.307287119e-30
 scn_mg24_he4_dt                    1.619176484e+66           1.173687005e-32
 scn_al27_p_dt                      1.964504457e+25           5.847053038e-17
 scn_si28_he4_dt                    4.718759385e+37           1.155806537e-73
 scn_p31_p_dt                       9.309309095e+29           3.294821295e-17
 scn_s32_he4_dt                     1.049041202e+86           3.001489371e-37
 scn_cl35_p_dt                      1.122834196e+35           7.639474896e-17
 scn_ar36_he4_dt                    8.468854849e+95           1.937948196e-14
 scn_k39_p_dt                       5.316911983e+36           1.045649903e-19
 scn_ca40_he4_dt                              1e+98           4.617122893e-17
 scn_sc43_p_dt                       1.61157729e+43           1.303545647e-17
 scn_ti44_he4_dt                              1e+98           5.687235212e-14
 scn_v47_p_dt                       1.691288516e+47           7.666603024e-18
 scn_cr48_he4_dt                    1.157920892e+77           1.854723745e-36
 scn_mn51_p_dt                      1.397195565e+51           4.671060595e-18
 scn_fe52_he4_dt                    7.831383972e+84           1.463403363e-35
 scn_co55_p_dt                      1.815049406e+55           5.724360786e-18
 scn_fe54_p_dt                      1.167330588e+53           3.609559659e-18
 scn_fe54_he4_dt                    1.214168058e+83           2.102788275e-37
 scn_fe56_p_dt                      1.182296365e+53            3.52187883e-18
 scn_d_p_dt                         3.552713679e-14           7.339598803e-16
 scn_p_p_dt                         1.598721155e-14           1.470810806e-15
 scn_he3_he3_dt                                56.5           4.651780568e-17
 scn_he3_he4_dt                                  59           4.343964563e-18
 scn_c12_p_dt                                 98304           1.674750123e-17
 scn_n14_p_dt                            3456106496           4.134422272e-16
 scn_o16_p_dt                                     4           4.650497836e-28
 scn_n14_he4_dt                     1.608365875e+38           3.065344013e-26

@zingale zingale marked this pull request as ready for review March 26, 2020 14:58
Copy link
Member

@dwillcox dwillcox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good, thanks!

@dwillcox dwillcox merged commit d8ffa66 into development Mar 26, 2020
@dwillcox dwillcox deleted the cxx-screening branch March 26, 2020 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants