From a24b40818f5ebd4645e343105396913fb9b89e57 Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@tu-dortmund.de> Date: Mon, 11 Mar 2019 16:09:17 -0300 Subject: [PATCH] first steps --- Environment/BaseExponential.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Environment/BaseExponential.h b/Environment/BaseExponential.h index 663e5401..4a25e1e4 100644 --- a/Environment/BaseExponential.h +++ b/Environment/BaseExponential.h @@ -26,10 +26,11 @@ namespace corsika::environment { * This class provides the grammage/length conversion functionality for * (locally) flat exponential atmospheres. */ + template <class TDerived> class BaseExponential { protected: - corsika::units::si::MassDensityType const fRho0; + units::si::MassDensityType const fRho0; units::si::LengthType const fLambda; units::si::InverseLengthType const fInvLambda; geometry::Point const fP0; @@ -50,9 +51,9 @@ namespace corsika::environment { * \f] */ // clang-format on - corsika::units::si::GrammageType IntegratedGrammage( - corsika::geometry::Trajectory<corsika::geometry::Line> const& line, - corsika::units::si::LengthType pTo, + units::si::GrammageType IntegratedGrammage( + geometry::Trajectory<geometry::Line> const& line, + units::si::LengthType pTo, geometry::Vector<units::si::dimensionless_d> const& axis) const { auto const vDotA = line.NormalizedDirection().dot(axis).magnitude(); auto const rhoStart = GetImplementation().GetMassDensity(line.GetR0()); @@ -82,9 +83,9 @@ namespace corsika::environment { * \f] */ // clang-format on - corsika::units::si::LengthType ArclengthFromGrammage( - corsika::geometry::Trajectory<corsika::geometry::Line> const& line, - corsika::units::si::GrammageType pGrammage, + units::si::LengthType ArclengthFromGrammage( + geometry::Trajectory<corsika::geometry::Line> const& line, + units::si::GrammageType pGrammage, geometry::Vector<units::si::dimensionless_d> const& axis) const { auto const vDotA = line.NormalizedDirection().dot(axis).magnitude(); auto const rhoStart = GetImplementation().GetMassDensity(line.GetR0()); @@ -96,9 +97,8 @@ namespace corsika::environment { if (logArg > 0) { return fLambda / vDotA * log(logArg); } else { - return std::numeric_limits<typename decltype( - pGrammage)::value_type>::infinity() * - corsika::units::si::meter; + return std::numeric_limits<units::si::GrammageType::value_type>::infinity() * + units::si::meter; } } } -- GitLab