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
c2414101
Commit
c2414101
authored
6 years ago
by
Felix Riehn
Committed by
ralfulrich
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
added gasdev routine
parent
b4929d1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/Cascade/gasdev.f
+27
-0
27 additions, 0 deletions
Framework/Cascade/gasdev.f
with
27 additions
and
0 deletions
Framework/Cascade/gasdev.f
0 → 100644
+
27
−
0
View file @
c2414101
DOUBLE PRECISION
FUNCTION
GASDEV
(
Idum
)
C
***********************************************************************
C
Gaussian
deviation
C
***********************************************************************
IMPLICIT
DOUBLE PRECISION
(
A
-
H
,
O
-
Z
)
IMPLICIT
INTEGER
(
I
-
N
)
COMMON
/
RNDMGAS
/
ISET
SAVE
DATA
ISET
/
0
/
gasdev
=
idum
IF
(
ISET
.EQ.
0
)
THEN
1
V1
=
2.D0
*
S_RNDM
(
0
)
-1.D0
V2
=
2.D0
*
S_RNDM
(
1
)
-1.D0
R
=
V1
**
2
+
V2
**
2
IF
(
R
.GE.
1.D0
)
GO TO
1
FAC
=
SQRT
(
-2.D0
*
LOG
(
R
)/
R
)
GSET
=
V1
*
FAC
GASDEV
=
V2
*
FAC
ISET
=
1
ELSE
GASDEV
=
GSET
ISET
=
0
ENDIF
RETURN
END
C
***********************************************************************
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