IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 6c5bd950 authored by Ralf Ulrich's avatar Ralf Ulrich
Browse files

Merge branch 'atmosphere_builder' into 'master'

Potential update of LayeredSphericalAtmosphereBuilder

See merge request !383
parents d4d16712 114a650f
No related branches found
No related tags found
No related merge requests found
......@@ -37,10 +37,10 @@ namespace corsika {
template <typename TMediumInterface, template <typename> typename TMediumModelExtra,
typename... TModelArgs>
inline void LayeredSphericalAtmosphereBuilder<
TMediumInterface, TMediumModelExtra,
TModelArgs...>::addExponentialLayer(GrammageType b, LengthType c,
LengthType upperBoundary) {
inline typename LayeredSphericalAtmosphereBuilder<TMediumInterface, TMediumModelExtra,
TModelArgs...>::volume_tree_node*
LayeredSphericalAtmosphereBuilder<TMediumInterface, TMediumModelExtra, TModelArgs...>::
addExponentialLayer(GrammageType b, LengthType c, LengthType upperBoundary) {
auto const radius = planetRadius_ + upperBoundary;
checkRadius(radius);
......@@ -68,6 +68,7 @@ namespace corsika {
}
layers_.push(std::move(node));
return layers_.top().get();
}
template <typename TMediumInterface, template <typename> typename TMediumModelExtra,
......
......@@ -75,8 +75,12 @@ namespace corsika {
, additionalModelArgs_{args...} {}
public:
typedef typename VolumeTreeNode<TMediumInterface>::VTN_type volume_tree_node;
typedef typename VolumeTreeNode<TMediumInterface>::VTNUPtr volume_tree_node_uptr;
void setNuclearComposition(NuclearComposition const& composition);
void addExponentialLayer(GrammageType b, LengthType c, LengthType upperBoundary);
volume_tree_node* addExponentialLayer(GrammageType b, LengthType c,
LengthType upperBoundary);
void addLinearLayer(LengthType c, LengthType upperBoundary);
void addTabularLayer(std::function<MassDensityType(LengthType)> const& funcRho,
......@@ -102,8 +106,7 @@ namespace corsika {
LengthType planetRadius_;
std::tuple<TModelArgs...> const additionalModelArgs_;
std::stack<typename VolumeTreeNode<TMediumInterface>::VTNUPtr>
layers_; // innermost layer first
std::stack<volume_tree_node_uptr> layers_; // innermost layer first
}; // end class LayeredSphericalAtmosphereBuilder
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment