IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 49810a17 authored by Nikos Karastathis's avatar Nikos Karastathis :ocean:
Browse files

ExponentialRefractiveIndex class and inline file in correct format

parent be05f435
No related branches found
No related tags found
No related merge requests found
///* /*
// * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
// * *
// * This software is distributed under the terms of the GNU General Public * 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 * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
// * the license. * the license.
// */ */
//
//#pragma once #pragma once
//
//#include <bits/stdc++.h> #include <bits/stdc++.h>
//#include <corsika/media/IRefractiveIndexModel.hpp> #include <corsika/media/IRefractiveIndexModel.hpp>
//
//namespace corsika { namespace corsika {
//
// template <typename T> template <typename T>
// template <typename... Args> template <typename... Args>
// ExponentialRefractiveIndex<T>::ExponentialRefractiveIndex(double const n0, ExponentialRefractiveIndex<T>::ExponentialRefractiveIndex(double const n0,
// InverseLengthType const lambda, Args&&... args) InverseLengthType const lambda, Args&&... args)
// : T(std::forward<Args>(args)...) : T(std::forward<Args>(args)...)
// , n_0(n0) , n_0(n0)
// , lambda_(lambda) {} , lambda_(lambda) {}
//
// template <typename T> template <typename T>
// double ExponentialRefractiveIndex<T>::getRefractiveIndex(Point const& point) const { double ExponentialRefractiveIndex<T>::getRefractiveIndex(Point const& point) const {
// //TODO: THIS METHOD CURRENTLY ONLY USES THE Z-COORDINATE. //TODO: THIS METHOD CURRENTLY ONLY USES THE Z-COORDINATE.
// //NEED TO THINK IT FOR FUTURE WORK ON ARBITRARY GEOMETRIES. //NEED TO THINK IT FOR FUTURE WORK ON ARBITRARY GEOMETRIES.
// return n_0 * exp((-lambda_) * point.getCoordinates().getZ()); return n_0 * exp((-lambda_) * point.getCoordinates().getZ());
// } }
//
//} // namespace corsika } // namespace corsika
...@@ -38,23 +38,18 @@ namespace corsika { ...@@ -38,23 +38,18 @@ namespace corsika {
*/ */
template <typename... Args> template <typename... Args>
ExponentialRefractiveIndex(double const n0, ExponentialRefractiveIndex(double const n0,
InverseLengthType const lambda, Args&&... args) InverseLengthType const lambda, Args&&... args);
: T(std::forward<Args>(args)...)
, n_0(n0)
, lambda_(lambda) {}
/** /**
* Evaluate the refractive index at a given location. * Evaluate the refractive index at a given location.
* *
* @param point The location to evaluate at. * @param point The location to evaluate at.
* @returns The refractive index at this point. * @returns The refractive index at this point.
*/ */
double getRefractiveIndex(Point const& point) const final override double getRefractiveIndex(Point const& point) const final override;
{
//TODO: THIS METHOD CURRENTLY ONLY USES THE Z-COORDINATE.
//NEED TO THINK IT FOR FUTURE WORK ON ARBITRARY GEOMETRIES.
return n_0 * exp((-lambda_) * point.getCoordinates().getZ());
}
}; // END: class ExponentialRefractiveIndex }; // END: class ExponentialRefractiveIndex
} // namespace corsika } // namespace corsika
\ No newline at end of file
#include <corsika/detail/media/ExponentialRefractiveIndex.inl>
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