From 3ddc3205fb620dedfbef51a2c9f83856ebac36a3 Mon Sep 17 00:00:00 2001 From: hrocho Date: Tue, 31 Jul 2018 18:52:53 +0200 Subject: [PATCH] reactions2 --- reactions.cpp | 8 ++++---- tests/test_reaction.cpp | 11 ++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/reactions.cpp b/reactions.cpp index 2499f8f..74efb1d 100644 --- a/reactions.cpp +++ b/reactions.cpp @@ -22,16 +22,17 @@ double nonreaction_rate(Projectile &projectile, const Material &target, const Co int ap = lround(projectile.A); int zp = lround(projectile.Z); - int zt = target.get_element(0).Z; - int at = abundance::get_isotope_a(zt,0); // most abundand natural isotope mass auto data = _storage.Get(projectile,target,c); Interpolator range_spline(energy_table.values,data.range.data(),energy_table.num); if(energy_out(projectile.T, target.thickness(), range_spline) < emin_reaction)return -1.0; + auto sigma_r = [&](double th){ double stn_sum=0.0, sum=0.0; double e = energy_out(projectile.T, th, range_spline); for(unsigned int i = 0;i 0 && r<1.0) ); + EXPECT( (r2 > 0 && r2<1.0) ); + EXPECT( r2>r ); + } };