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
49810a17
Commit
49810a17
authored
4 years ago
by
Nikos Karastathis
Browse files
Options
Downloads
Patches
Plain Diff
ExponentialRefractiveIndex class and inline file in correct format
parent
be05f435
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/media/ExponentialRefractiveIndex.inl
+31
-31
31 additions, 31 deletions
corsika/detail/media/ExponentialRefractiveIndex.inl
corsika/media/ExponentialRefractiveIndex.hpp
+6
-11
6 additions, 11 deletions
corsika/media/ExponentialRefractiveIndex.hpp
with
37 additions
and
42 deletions
corsika/detail/media/ExponentialRefractiveIndex.inl
+
31
−
31
View file @
49810a17
//
/*
/*
//
* (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
This diff is collapsed.
Click to expand it.
corsika/media/ExponentialRefractiveIndex.hpp
+
6
−
11
View file @
49810a17
...
@@ -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>
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