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
fbd3af53
Commit
fbd3af53
authored
5 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
added convenience function to build layered atmosphere as in C7
parent
e73d4821
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
Environment/Convenience.h
+49
-0
49 additions, 0 deletions
Environment/Convenience.h
with
49 additions
and
0 deletions
Environment/Convenience.h
0 → 100644
+
49
−
0
View file @
fbd3af53
/*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu
*
* See file AUTHORS for a list of contributors.
*
* 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/environment/NuclearComposition.h>
#include
<corsika/environment/FlatExponential.h>
#include
<corsika/environment/SlidingPlanarExponential.h>
#include
<corsika/environment/VolumeTreeNode.h>
#include
<corsika/particles/ParticleProperties.h>
#include
<corsika/units/PhysicalUnits.h>
#include
<memory>
namespace
corsika
::
environment
{
class
LayeredAtmosphereBuilder
{
std
::
unique_ptr
<
NuclearComposition
>
nuclearComposition_
;
geometry
::
Point
center_
;
units
::
si
::
LengthType
previousRadius_
{
LengthType
::
zero
()};
static
auto
constexpr
earthRadius_
=
6371
_km
;
public
:
LayeredAtmosphereBuilder
(
corsika
::
geometry
::
Point
center
)
:
center_
(
center
)
{}
void
setNuclearComposition
(
NuclearComposition
composition
)
{
nuclearComposition_
=
std
::
make_unique
<
NuclearComposition
>
(
composition
);
}
void
addLayer
(
units
::
si
::
GrammageType
a
,
units
::
si
::
GrammageType
b
,
units
::
si
::
LengthType
c
,
units
::
si
::
LengthType
thickness
)
{
auto
const
radius
=
previousRadius_
+
thickness
;
std
::
make_unique
<
BaseNodeType
>
(
std
::
make_unique
<
geometry
::
Sphere
>
(
center_
,
radius
);
previousRadius_
=
radiusl
}
auto
const
assemble
()
{
// get the outmost VolumeTreeNode
}
};
}
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