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
751bdcd1
Commit
751bdcd1
authored
3 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
missing file
parent
5b8f2ad9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/media/testCORSIKA7Atmospheres.cpp
+38
-0
38 additions, 0 deletions
tests/media/testCORSIKA7Atmospheres.cpp
with
38 additions
and
0 deletions
tests/media/testCORSIKA7Atmospheres.cpp
0 → 100644
+
38
−
0
View file @
751bdcd1
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#include
<corsika/framework/core/ParticleProperties.hpp>
#include
<corsika/framework/core/PhysicalUnits.hpp>
#include
<corsika/framework/geometry/RootCoordinateSystem.hpp>
#include
<corsika/media/CORSIKA7Atmospheres.hpp>
#include
<catch2/catch.hpp>
using
namespace
corsika
;
TEST_CASE
(
"CORSIKA7Atmospheres"
)
{
logging
::
set_level
(
logging
::
level
::
info
);
CoordinateSystemPtr
const
&
gCS
=
get_root_CoordinateSystem
();
Point
const
gOrigin
(
gCS
,
{
0
_m
,
0
_m
,
0
_m
});
Environment
<
IMediumModel
>
env
;
// build a Linsley US Standard atmosphere into `env`
create_5layer_atmosphere
<
IMediumModel
>
(
env
,
AtmosphereId
::
LinsleyUSStd
,
gOrigin
);
typedef
typename
Environment
<
IMediumModel
>::
BaseNodeType
::
VTN_type
node_type
;
node_type
const
*
universe
=
env
.
getUniverse
().
get
();
Point
const
p
(
gCS
,
{
constants
::
EarthRadius
::
Mean
,
0
_m
,
0
_m
});
CHECK
(
universe
->
getContainingNode
(
p
)
->
getModelProperties
().
getMassDensity
(
p
)
/
1
_g
*
static_pow
<
3
>
(
1
_cm
)
==
Approx
(
1222.6562
/
994186.38
));
}
\ No newline at end of file
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