1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-23 02:38:51 -05:00
This commit is contained in:
hrosiak 2018-04-30 00:16:45 +02:00
parent fe7588804a
commit 501bd21c63
4 changed files with 65 additions and 0 deletions

View File

@ -51,6 +51,13 @@ if(PYTHONINTERP_FOUND)
message("-- Python found: ${PYTHON_EXECUTABLE}") message("-- Python found: ${PYTHON_EXECUTABLE}")
endif() endif()
find_package(nurex QUIET)
if(nurex_FOUND)
message(STATUS "nurex library found")
set(NUREX ON)
endif(nurex_FOUND)
configure_file( configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/build_config.in" "${CMAKE_CURRENT_SOURCE_DIR}/build_config.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/catima/build_config.h" "${CMAKE_CURRENT_BINARY_DIR}/include/catima/build_config.h"

View File

@ -5,5 +5,6 @@
#cmakedefine GSL_INTEGRATION #cmakedefine GSL_INTEGRATION
#cmakedefine GLOBAL #cmakedefine GLOBAL
#cmakedefine NUREX
#endif #endif

25
reactions.cpp Normal file
View File

@ -0,0 +1,25 @@
#include "catima/reactions.h"
#ifdef NUREX
#include <cmath>
namespace catima{
double reaction_rate(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);
int zt = lround(target.get_element(0).Z;
int at = abundance::get_isotope_a(zt,0);
nurex::Nucleus nurex_target = get_default_nucleus(at,zt);
nurex::GlauberModelOLA_ZeroRange gm(nurex_projectile, nurex_target);
double cs = nurex::SigmaR(gm, projectile.T);
return 1.0;
}
}
#endif

32
reactions.h Normal file
View File

@ -0,0 +1,32 @@
/*
* Author: Andrej Prochazka
* Copyright(C) 2017
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef REACTIONS_H
#define REACTIONS_H
#ifdef NUREX
#include "nurex/nurex.h"
#include "catima/structures.h"
namespace catima{
double reaction_rate(Projectile &projectile, const Material &target, const Config &c=default_config);
}
#endif //NUREX
#endif