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
b0e99bbc
Commit
b0e99bbc
authored
3 years ago
by
Felix Riehn
Committed by
ralfulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
double random
parent
761248fd
No related branches found
No related tags found
1 merge request
!318
Resolve "EPOS is missing"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
corsika/modules/epos/Random.hpp
+7
-0
7 additions, 0 deletions
corsika/modules/epos/Random.hpp
modules/epos/epos.cpp
+2
-1
2 additions, 1 deletion
modules/epos/epos.cpp
modules/epos/epos.hpp
+11
-0
11 additions, 0 deletions
modules/epos/epos.hpp
with
20 additions
and
1 deletion
corsika/modules/epos/Random.hpp
+
7
−
0
View file @
b0e99bbc
...
...
@@ -28,4 +28,11 @@ namespace epos {
return
dist
(
rng
);
}
double
double_rndm_interface
()
{
static
corsika
::
default_prng_type
&
rng
=
corsika
::
RNGManager
::
getInstance
().
getRandomStream
(
"epos"
);
std
::
uniform_real_distribution
<
double
>
dist
;
return
dist
(
rng
);
}
}
// namespace epos
This diff is collapsed.
Click to expand it.
modules/epos/epos.cpp
+
2
−
1
View file @
b0e99bbc
...
...
@@ -9,7 +9,8 @@ namespace epos {
// this is needed as linker object, but it is not needed to do anything
void
ranfcv_
(
double
&
)
{}
float
rangen_
()
{
return
::
epos
::
rndm_interface
();
}
float
rangen_
()
{
return
::
epos
::
rndm_interface
();
}
double
drangen_
()
{
return
::
epos
::
double_rndm_interface
();
}
datadir
::
datadir
(
const
std
::
string
&
dir
)
{
if
(
dir
.
length
()
>
500
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/epos/epos.hpp
+
11
−
0
View file @
b0e99bbc
...
...
@@ -27,6 +27,16 @@ namespace epos {
**/
extern
float
rndm_interface
();
/**
* \function epos::double_rndm_interface
*
* this is the random number hook to external packages.
*
* CORSIKA8, for example, has to provide an implementation of this.
**/
extern
double
double_rndm_interface
();
extern
"C"
{
void
aaset_
(
int
&
);
...
...
@@ -76,6 +86,7 @@ namespace epos {
void
ranfcv_
(
double
&
);
// void ranfgt(int&);
float
rangen_
();
double
drangen_
();
// common blocks as
// defined in epos.inc
...
...
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