IAP GITLAB
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
corsika
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
123
Issues
123
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Air Shower Physics
corsika
Commits
2c0c4c24
Commit
2c0c4c24
authored
Feb 18, 2021
by
Ralf Ulrich
☄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for usstd atm.
parent
be76ac6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
0 deletions
+102
-0
tests/media/testEnvironment.cpp
tests/media/testEnvironment.cpp
+102
-0
No files found.
tests/media/testEnvironment.cpp
View file @
2c0c4c24
...
...
@@ -301,3 +301,105 @@ TEST_CASE("LayeredSphericalAtmosphereBuilder w/ magnetic field") {
.
getMagneticField
(
pTest2
)
.
getComponents
(
gCS
));
}
TEST_CASE
(
"media"
,
"LayeredSphericalAtmosphereBuilder USStd"
)
{
// setup environment, geometry
Point
const
center
{
gCS
,
0
_m
,
0
_m
,
0
_m
};
// setup our interface types
auto
builder
=
make_layered_spherical_atmosphere_builder
<>::
create
(
center
,
constants
::
EarthRadius
::
Mean
);
builder
.
setNuclearComposition
(
{{
Code
::
Nitrogen
,
Code
::
Oxygen
},
{
0.7847
f
,
1.
f
-
0.7847
f
}});
// values taken from AIRES manual, Ar removed for now
builder
.
addExponentialLayer
(
1222.6562
_g
/
(
1
_cm
*
1
_cm
),
994186.38
_cm
,
4
_km
);
builder
.
addExponentialLayer
(
1144.9069
_g
/
(
1
_cm
*
1
_cm
),
878153.55
_cm
,
10
_km
);
builder
.
addExponentialLayer
(
1305.5948
_g
/
(
1
_cm
*
1
_cm
),
636143.04
_cm
,
40
_km
);
builder
.
addExponentialLayer
(
540.1778
_g
/
(
1
_cm
*
1
_cm
),
772170.16
_cm
,
100
_km
);
builder
.
addLinearLayer
(
1e9
_cm
,
112.8
_km
);
Environment
<
IMediumModel
>
env
;
builder
.
assemble
(
env
);
typedef
typename
Environment
<
IMediumModel
>::
BaseNodeType
::
VTN_type
node_type
;
node_type
const
*
universe
=
env
.
getUniverse
().
get
();
// far out ther is the universe
CHECK
(
universe
->
getContainingNode
(
Point
(
gCS
,
{
10000
_km
,
0
_m
,
0
_m
}))
==
universe
);
CHECK
(
universe
->
getContainingNode
(
Point
(
gCS
,
{
0
_m
,
10000
_km
,
0
_m
}))
==
universe
);
// at 112.8km there is transition to atmosphere
CHECK
(
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
112.8
_km
+
1
_cm
,
0
_m
,
0
_m
}))
==
universe
);
CHECK
(
universe
->
getContainingNode
(
Point
(
gCS
,
{
0
_m
,
constants
::
EarthRadius
::
Mean
+
112.8
_km
+
1
_cm
,
0
_m
}))
==
universe
);
// check layer transition at 112.8km
node_type
const
*
layer1_not_yet
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
112.8
_km
+
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer1
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
112.8
_km
-
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer1_also
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
0
_m
,
constants
::
EarthRadius
::
Mean
+
112.8
_km
-
1
_cm
,
0
_m
}));
CHECK
(
layer1_not_yet
==
universe
);
CHECK
(
layer1
!=
universe
);
CHECK
(
layer1
==
layer1_also
);
// check layer transition at 100km
node_type
const
*
layer2_not_yet
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
100
_km
+
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer2
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
100
_km
-
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer2_also
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
0
_m
,
constants
::
EarthRadius
::
Mean
+
100
_km
-
1
_cm
,
0
_m
}));
CHECK
(
layer2_not_yet
==
layer1
);
CHECK
(
layer2
!=
layer1
);
CHECK
(
layer2
==
layer2_also
);
// check layer transition at 40km
node_type
const
*
layer3_not_yet
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
40
_km
+
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer3
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
40
_km
-
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer3_also
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
0
_m
,
constants
::
EarthRadius
::
Mean
+
40
_km
-
1
_cm
,
0
_m
}));
CHECK
(
layer3_not_yet
==
layer2
);
CHECK
(
layer3
!=
layer2
);
CHECK
(
layer3
==
layer3_also
);
// check layer transition at 10km
node_type
const
*
layer4_not_yet
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
10
_km
+
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer4
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
10
_km
-
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer4_also
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
0
_m
,
constants
::
EarthRadius
::
Mean
+
10
_km
-
1
_cm
,
0
_m
}));
CHECK
(
layer4_not_yet
==
layer3
);
CHECK
(
layer4
!=
layer3
);
CHECK
(
layer4
==
layer4_also
);
// check layer transition at 4km
node_type
const
*
layer5_not_yet
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
4
_km
+
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer5
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
constants
::
EarthRadius
::
Mean
+
4
_km
-
1
_cm
,
0
_m
,
0
_m
}));
node_type
const
*
layer5_also
=
universe
->
getContainingNode
(
Point
(
gCS
,
{
0
_m
,
constants
::
EarthRadius
::
Mean
+
4
_km
-
1
_cm
,
0
_m
}));
CHECK
(
layer5_not_yet
==
layer4
);
CHECK
(
layer5
!=
layer4
);
CHECK
(
layer5
==
layer5_also
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment