mirror of
https://github.com/gwm17/catima.git
synced 2024-11-22 18:28:51 -05:00
nothing
This commit is contained in:
parent
846ad516da
commit
f01cb88ddd
|
@ -55,6 +55,7 @@ find_package(nurex QUIET)
|
|||
if(nurex_FOUND)
|
||||
message(STATUS "nurex library found")
|
||||
set(NUREX ON)
|
||||
list(APPEND EXTRA_LIBS nurex::nurex)
|
||||
endif(nurex_FOUND)
|
||||
|
||||
|
||||
|
|
|
@ -1,21 +1,29 @@
|
|||
#include "catima/reactions.h"
|
||||
#ifdef NUREX
|
||||
#include "catima/catima.h"
|
||||
#include "catima/abundance_database.h"
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
namespace catima{
|
||||
|
||||
double reaction_rate(Projectile &projectile, const Material &target, const Config &c){
|
||||
double reaction_rate1(Projectile &projectile, const Material &target, const Config &c){
|
||||
|
||||
int num_elements = target.ncomponents();
|
||||
int ap = lround(projectile.A);
|
||||
int zp = lround(projectile.Z);
|
||||
nurex::Nucleus nurex_projectile = get_default_nucleus(ap,zp);
|
||||
nurex::Nucleus nurex_projectile = nurex::get_default_nucleus(ap,zp);
|
||||
|
||||
int zt = lround(target.get_element(0).Z;
|
||||
int zt = target.get_element(0).Z;
|
||||
int at = abundance::get_isotope_a(zt,0);
|
||||
nurex::Nucleus nurex_target = get_default_nucleus(at,zt);
|
||||
nurex::Nucleus nurex_target = nurex::get_default_nucleus(at,zt);
|
||||
|
||||
double eout = energy_out(projectile,projectile.T, target,c);
|
||||
std::cout<<eout<<"\n";
|
||||
nurex::GlauberModelOLA_ZeroRange gm(nurex_projectile, nurex_target);
|
||||
double cs = nurex::SigmaR(gm, projectile.T);
|
||||
|
||||
double rr = reaction_rate(cs,target.number_density_cm2(0));
|
||||
std::cout<<rr<<"\n";
|
||||
|
||||
return 1.0;
|
||||
}
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
|
||||
#ifndef REACTIONS_H
|
||||
#define REACTIONS_H
|
||||
|
||||
#include "catima/build_config.h"
|
||||
#ifdef NUREX
|
||||
|
||||
#include "nurex/nurex.h"
|
||||
#include "catima/structures.h"
|
||||
#include "catima/config.h"
|
||||
|
@ -52,7 +51,7 @@ namespace catima{
|
|||
return 1.0 - std::exp(-i*0.0001);
|
||||
}
|
||||
|
||||
double reaction_rate(Projectile &projectile, const Material &target, const Config &c=default_config);
|
||||
double reaction_rate1(Projectile &projectile, const Material &target, const Config &c=default_config);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ endforeach(entry in ${CATIMA_TESTS})
|
|||
|
||||
if(NUREX)
|
||||
add_executable(test_reaction test_reaction.cpp)
|
||||
target_link_libraries(test_reaction nurex::nurex catima)
|
||||
target_link_libraries(test_reaction catima)
|
||||
add_test(test_reaction ${PROJECT_BINARY_DIR}/tests/test_reaction)
|
||||
endif(NUREX)
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ using catima::nonreaction_rate;
|
|||
const lest::test specification[] =
|
||||
{
|
||||
CASE("reaction"){
|
||||
catima::Projectile proj{12,6,6,1000};
|
||||
auto c = catima::get_material(6);
|
||||
c.thickness(4.0);
|
||||
double r = reaction_rate(1000,c.number_density_cm2());
|
||||
|
@ -24,6 +25,8 @@ const lest::test specification[] =
|
|||
auto fcc = [](double x){return 1000.0;};
|
||||
r = reaction_rate(fcc, c.number_density_cm2());
|
||||
std::cout<<r<<"\n";
|
||||
|
||||
catima::reaction_rate1(proj, c);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user