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
558894f6
Commit
558894f6
authored
3 years ago
by
Nikos Karastathis
Committed by
Ralf Ulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Exponential refractive index does not use the getZ() method anymore.
parent
fcb0ff45
No related branches found
Branches containing commit
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
+5
-3
5 additions, 3 deletions
corsika/detail/media/ExponentialRefractiveIndex.inl
corsika/media/ExponentialRefractiveIndex.hpp
+4
-2
4 additions, 2 deletions
corsika/media/ExponentialRefractiveIndex.hpp
with
9 additions
and
5 deletions
corsika/detail/media/ExponentialRefractiveIndex.inl
+
5
−
3
View file @
558894f6
...
@@ -15,14 +15,16 @@ namespace corsika {
...
@@ -15,14 +15,16 @@ namespace corsika {
template
<
typename
T
>
template
<
typename
T
>
template
<
typename
...
Args
>
template
<
typename
...
Args
>
ExponentialRefractiveIndex
<
T
>::
ExponentialRefractiveIndex
(
ExponentialRefractiveIndex
<
T
>::
ExponentialRefractiveIndex
(
double
const
n0
,
InverseLengthType
const
lambda
,
Args
&&
...
args
)
double
const
n0
,
InverseLengthType
const
lambda
_
,
Point
const
center_
,
LengthType
const
planetRadius_
,
Args
&&
...
args
)
:
T
(
std
::
forward
<
Args
>
(
args
)...)
:
T
(
std
::
forward
<
Args
>
(
args
)...)
,
n_0
(
n0
)
,
n_0
(
n0
)
,
lambda_
(
lambda
)
{}
,
lambda
(
lambda_
)
,
center
(
center_
)
,
planetRadius
(
planetRadius_
)
{}
template
<
typename
T
>
template
<
typename
T
>
double
ExponentialRefractiveIndex
<
T
>::
getRefractiveIndex
(
Point
const
&
point
)
const
{
double
ExponentialRefractiveIndex
<
T
>::
getRefractiveIndex
(
Point
const
&
point
)
const
{
return
n_0
*
exp
((
-
lambda
_
)
*
point
.
getCoordinates
().
getZ
(
));
return
n_0
*
exp
((
-
lambda
)
*
(
distance
(
point
,
center
)
-
planetRadius
));
}
}
}
// namespace corsika
}
// namespace corsika
This diff is collapsed.
Click to expand it.
corsika/media/ExponentialRefractiveIndex.hpp
+
4
−
2
View file @
558894f6
...
@@ -23,7 +23,9 @@ namespace corsika {
...
@@ -23,7 +23,9 @@ namespace corsika {
class
ExponentialRefractiveIndex
:
public
T
{
class
ExponentialRefractiveIndex
:
public
T
{
double
n_0
;
///< n0 constant.
double
n_0
;
///< n0 constant.
InverseLengthType
lambda_
;
///< lambda parameter.
InverseLengthType
lambda
;
///< lambda parameter.
LengthType
planetRadius
;
///< the planet radius.
Point
center
;
///< center of the planet.
public:
public:
/**
/**
...
@@ -36,7 +38,7 @@ namespace corsika {
...
@@ -36,7 +38,7 @@ namespace corsika {
* @param field The refractive index to return to a given point.
* @param field The refractive index to return to a given point.
*/
*/
template
<
typename
...
Args
>
template
<
typename
...
Args
>
ExponentialRefractiveIndex
(
double
const
n0
,
InverseLengthType
const
lambda
,
ExponentialRefractiveIndex
(
double
const
n0
,
InverseLengthType
const
lambda
_
,
Point
const
center_
,
LengthType
const
planetRadius_
,
Args
&&
...
args
);
Args
&&
...
args
);
/**
/**
...
...
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