IAP GITLAB

Skip to content
Snippets Groups Projects
Commit d283b39c authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

CMake

parent 54e31409
No related branches found
No related tags found
1 merge request!468Resolve "Add FLUKA"
...@@ -258,6 +258,7 @@ add_subdirectory (modules/qgsjetII) ...@@ -258,6 +258,7 @@ add_subdirectory (modules/qgsjetII)
add_subdirectory (modules/urqmd) add_subdirectory (modules/urqmd)
add_subdirectory (modules/conex) add_subdirectory (modules/conex)
add_subdirectory (modules/epos) add_subdirectory (modules/epos)
add_subdirectory (modules/fluka)
#+++++++++++++++++++++++++++++++ #+++++++++++++++++++++++++++++++
# unit testing # unit testing
......
set(C8_FLUKALIB CACHE STRING "path to libflukahp.a")
if (DEFINED C8_FLUKALIB)
add_library(flukahp STATIC IMPORTED)
set_property(TARGET flukahp PROPERTY IMPORTED_LOCATION ${C8_FLUKALIB})
find_library(MATH_LIBRARY m)
target_link_libraries(flukahp INTERFACE gfortran ${MATH_LIBRARY})
target_include_directories (flukahp INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/corsika_modules/fluka>
)
# add fluka to corsika8 build
add_dependencies (CORSIKA8 flukahp)
target_link_libraries (CORSIKA8 INTERFACE flukahp)
endif()
/*
* (c) Copyright 2022 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
namespace fluka {
extern "C" {
/*----------------------------------------------------------------------*
* *
* Copyright (C) 2022-2022 by Alfredo Ferrari & Paola Sala *
* All Rights Reserved. *
* *
* *
* SeTuP for X/Y/Z interaction types: *
* *
* Authors: Alfredo Ferrari & Paola Sala *
* *
* *
* Created on 24 October 2022 by Alfredo Ferrari & Paola Sala *
* Private Private *
* *
* Last change on 01-Nov-22 by Alfredo Ferrari *
* Private *
* *
* Input variables: *
* *
* Nmatfl = Number of requested Fluka materials *
* Nelmfl(m) = Number of elements in the m_th requested Fluka *
* material, Nelmfl(m)=1 means simple element, no *
* compound *
* Izelfl(n) = Cumulative array of the Z of the elements con- *
* stituting the requested Fluka materials *
* (the Z for the elements of the m_th materials *
* start at n = Sum_i=1^m-1 [Nelmfl(i)] + 1) *
* Wfelml(n) = Cumulative array of the weight fractions of the*
* elements constituting the requested Fluka *
* materials (the weight fractions for the elem- *
* ents of the m_th materials start at *
* n = Sum_i=1^m-1 [Nelmfl(i)] + 1) *
* Mxelfl = Dimension of the Iz/Wfelml arrays, it must be *
* Mxelfl >= Sum_i=1^nmatfl [Nelmfl(i)] *
* Pptmax = Maximum momentum (GeV/c) to be used in initia- *
* lization (optional) *
* Ef2dp3 = Transition energy (GeV) from Fluka (Peanut) to *
* Dpmjet3 for hA interactions (optional) *
* Df2dp3 = Smearing (+/-Df2dp3) (GeV) of the transition *
* energy from Fluka (Peanut) to Dpmjet3 for hA *
* interactions (optional) *
* Lprint = Material printout flag *
* *
* Output variables: *
* *
* Mtflka(m) = Fluka material number corresponding to the m_th*
* requested material *
* *
*----------------------------------------------------------------------*
*/
void stpxyz_(int const* NMATFL,
int const NELMFL[],
int const IZELFL[],
double const WFELFL[],
int const* MXELFL,
double const* PPTMAX,
double const* EF2DP3,
double const* DF2DP3,
int const* IFLXYZ,
bool const* LPRINT,
int* MTFLKA,
char CRVRCK[8]);
}
}
...@@ -15,7 +15,11 @@ set (test_modules_sources ...@@ -15,7 +15,11 @@ set (test_modules_sources
testRadio.cpp testRadio.cpp
testEMThinning.cpp testEMThinning.cpp
testSophia.cpp testSophia.cpp
) )
if (DEFINED C8_FLUKALIB)
list(APPEND test_modules_sources "testFluka.cpp")
endif()
CORSIKA_ADD_TEST (testModules SOURCES ${test_modules_sources}) CORSIKA_ADD_TEST (testModules SOURCES ${test_modules_sources})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment