IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Air Shower Physics
corsika
Commits
bec50c51
Commit
bec50c51
authored
1 year ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
adapt QGSJet RNG
parent
e1ae4afc
No related branches found
No related tags found
1 merge request
!572
Resolve "Random number generators in modules: linkage, missing symbols, etc."
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/qgsjetII/CMakeLists.txt
+1
-0
1 addition, 0 deletions
modules/qgsjetII/CMakeLists.txt
modules/qgsjetII/qgsjet-II-04.cpp
+4
-1
4 additions, 1 deletion
modules/qgsjetII/qgsjet-II-04.cpp
modules/qgsjetII/qgsjet-II-04.hpp
+6
-11
6 additions, 11 deletions
modules/qgsjetII/qgsjet-II-04.hpp
with
11 additions
and
12 deletions
modules/qgsjetII/CMakeLists.txt
+
1
−
0
View file @
bec50c51
...
...
@@ -25,6 +25,7 @@ target_include_directories (
$<INSTALL_INTERFACE:include/corsika_modules/qgsjetII>
)
target_link_libraries
(
QGSJetII_static CorsikaData
)
target_link_libraries
(
QGSJetII_static modules_common
)
install
(
FILES
...
...
This diff is collapsed.
Click to expand it.
modules/qgsjetII/qgsjet-II-04.cpp
+
4
−
1
View file @
bec50c51
#include
<qgsjet-II-04.hpp>
#include
<rng_impl.hpp>
#include
<iostream>
...
...
@@ -13,9 +14,11 @@ datadir::datadir(std::string const& dir) {
data
[
i
+
1
]
=
'\0'
;
}
IMPLEMENT_RNG
(
qgsjetII
)
/**
@function qgran
link to random number generation
*/
double
qgran_
(
int
&
)
{
return
qgsjetII
::
rndm_interface
();
}
double
qgran_
(
int
&
)
{
return
draw_std_rnd
();
}
This diff is collapsed.
Click to expand it.
modules/qgsjetII/qgsjet-II-04.hpp
+
6
−
11
View file @
bec50c51
...
...
@@ -10,22 +10,15 @@
#include
<string>
#include
<rng_decl.hpp>
/**
* @file qgsjet-II.04.hpp
*
* The interface to the fortran code.
*/
namespace
qgsjetII
{
/**
* This is the random number hook to external packages.
*
* CORSIKA8, for example, has to provide an implementation of this.
*/
extern
double
rndm_interface
();
}
// namespace qgsjetII
DECLARE_RNG
(
qgsjetII
)
//----------------------------------------------
// C++ interface for the QGSJetII event generator
...
...
@@ -36,7 +29,9 @@ extern "C" {
// data memory layout
extern
struct
{
int
nsp
;
}
qgarr12_
;
extern
struct
{
int
nsp
;
}
qgarr12_
;
const
int
nptmax
=
95000
;
const
int
iapmax
=
208
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment