IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Pranav Sampathkumar
corsika
Commits
6887ddf4
Commit
6887ddf4
authored
3 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
updates and fixes
parent
d7aa7265
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl
+1
-1
1 addition, 1 deletion
corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl
examples/corsika.cpp
+20
-13
20 additions, 13 deletions
examples/corsika.cpp
with
21 additions
and
14 deletions
corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl
+
1
−
1
View file @
6887ddf4
...
@@ -167,7 +167,7 @@ namespace corsika {
...
@@ -167,7 +167,7 @@ namespace corsika {
template
<
typename
TMediumInterface
,
template
<
typename
>
typename
MExtraEnvirnoment
>
template
<
typename
TMediumInterface
,
template
<
typename
>
typename
MExtraEnvirnoment
>
struct
make_layered_spherical_atmosphere_builder
{
struct
make_layered_spherical_atmosphere_builder
{
template
<
typename
...
TArgs
>
template
<
typename
...
TArgs
>
static
auto
create
(
Point
const
&
center
,
LengthType
const
earth
Radius
,
TArgs
...
args
)
{
static
auto
create
(
Point
const
&
center
,
LengthType
const
planet
Radius
,
TArgs
...
args
)
{
return
LayeredSphericalAtmosphereBuilder
<
TMediumInterface
,
MExtraEnvirnoment
,
return
LayeredSphericalAtmosphereBuilder
<
TMediumInterface
,
MExtraEnvirnoment
,
TArgs
...
>
{
std
::
forward
<
TArgs
>
(
args
)...,
TArgs
...
>
{
std
::
forward
<
TArgs
>
(
args
)...,
center
,
planetRadius
};
center
,
planetRadius
};
...
...
This diff is collapsed.
Click to expand it.
examples/corsika.cpp
+
20
−
13
View file @
6887ddf4
...
@@ -158,24 +158,29 @@ int main(int argc, char** argv) {
...
@@ -158,24 +158,29 @@ int main(int argc, char** argv) {
->
default_str
(
"info"
)
->
default_str
(
"info"
)
->
check
(
CLI
::
IsMember
({
"warn"
,
"info"
,
"debug"
,
"trace"
}))
->
check
(
CLI
::
IsMember
({
"warn"
,
"info"
,
"debug"
,
"trace"
}))
->
group
(
"Misc."
);
->
group
(
"Misc."
);
app
.
add_option
(
"-v,--verbosity"
,
"Verbosity level: warn, info, debug, trace."
)
->
default_val
(
"info"
)
->
check
(
CLI
::
IsMember
({
"warn"
,
"info"
,
"debug"
,
"trace"
}))
->
group
(
"Misc."
);
// parse the command line options into the variables
// parse the command line options into the variables
CLI11_PARSE
(
app
,
argc
,
argv
);
CLI11_PARSE
(
app
,
argc
,
argv
);
string
const
loglevel
=
if
(
app
.
count
(
"--verbosity"
))
{
(
app
.
count
(
"--verbosity"
)
?
app
[
"
--
verbosity"
]
->
as
<
string
>
()
:
"info"
)
;
string
const
loglevel
=
app
[
"verbosity"
]
->
as
<
string
>
();
if
(
loglevel
==
"warn"
)
{
if
(
loglevel
==
"warn"
)
{
logging
::
set_level
(
logging
::
level
::
warn
);
logging
::
set_level
(
logging
::
level
::
warn
);
}
else
if
(
loglevel
==
"info"
)
{
}
else
if
(
loglevel
==
"info"
)
{
logging
::
set_level
(
logging
::
level
::
info
);
logging
::
set_level
(
logging
::
level
::
info
);
}
else
if
(
loglevel
==
"debug"
)
{
}
else
if
(
loglevel
==
"debug"
)
{
logging
::
set_level
(
logging
::
level
::
debug
);
logging
::
set_level
(
logging
::
level
::
debug
);
}
else
if
(
loglevel
==
"trace"
)
{
}
else
if
(
loglevel
==
"trace"
)
{
#ifndef DEBUG
#ifndef DEBUG
CORSIKA_LOG_ERROR
(
"trace log level requires a Debug build."
);
CORSIKA_LOG_ERROR
(
"trace log level requires a Debug build."
);
return
1
;
return
1
;
#endif
#endif
logging
::
set_level
(
logging
::
level
::
trace
);
logging
::
set_level
(
logging
::
level
::
trace
);
}
}
}
// check that we got either PDG or A/Z
// check that we got either PDG or A/Z
...
@@ -217,7 +222,7 @@ int main(int argc, char** argv) {
...
@@ -217,7 +222,7 @@ int main(int argc, char** argv) {
/* === END: SETUP ENVIRONMENT AND ROOT COORDINATE SYSTEM === */
/* === END: SETUP ENVIRONMENT AND ROOT COORDINATE SYSTEM === */
ofstream
atmout
(
"earth.dat"
);
ofstream
atmout
(
"earth.dat"
);
for
(
LengthType
h
=
0
_m
;
h
<
110
_km
;
h
+=
10
_m
)
{
for
(
LengthType
h
=
0
_m
;
h
<
110
_km
;
h
+=
10
0
_m
)
{
Point
const
ptest
{
rootCS
,
0
_m
,
0
_m
,
builder
.
getPlanetRadius
()
+
h
};
Point
const
ptest
{
rootCS
,
0
_m
,
0
_m
,
builder
.
getPlanetRadius
()
+
h
};
auto
rho
=
auto
rho
=
env
.
getUniverse
()
->
getContainingNode
(
ptest
)
->
getModelProperties
().
getMassDensity
(
env
.
getUniverse
()
->
getContainingNode
(
ptest
)
->
getModelProperties
().
getMassDensity
(
...
@@ -228,6 +233,8 @@ int main(int argc, char** argv) {
...
@@ -228,6 +233,8 @@ int main(int argc, char** argv) {
/* === START: CONSTRUCT PRIMARY PARTICLE === */
/* === START: CONSTRUCT PRIMARY PARTICLE === */
/* === START: CONSTRUCT PRIMARY PARTICLE === */
// parse the primary ID as a PDG or A/Z code
// parse the primary ID as a PDG or A/Z code
Code
beamCode
;
Code
beamCode
;
...
...
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