IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
Model registry
Operate
Environments
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
Air Shower Physics
corsika
Commits
5f3d1e54
Commit
5f3d1e54
authored
4 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
added so far empty dummy class for NoMagneticField
parent
ec899bf1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!278
Magnetic Tracking
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Environment/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Environment/CMakeLists.txt
Environment/NoMagneticField.h
+59
-0
59 additions, 0 deletions
Environment/NoMagneticField.h
with
60 additions
and
0 deletions
Environment/CMakeLists.txt
+
1
−
0
View file @
5f3d1e54
...
@@ -35,6 +35,7 @@ set (
...
@@ -35,6 +35,7 @@ set (
ShowerAxis.h
ShowerAxis.h
IMagneticFieldModel.h
IMagneticFieldModel.h
UniformMagneticField.h
UniformMagneticField.h
NoMagneticField.h
IRefractiveIndexModel.h
IRefractiveIndexModel.h
UniformRefractiveIndex.h
UniformRefractiveIndex.h
IMediumPropertyModel.h
IMediumPropertyModel.h
...
...
This diff is collapsed.
Click to expand it.
Environment/NoMagneticField.h
0 → 100644
+
59
−
0
View file @
5f3d1e54
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* 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
* the license.
*/
#pragma once
#include
<corsika/environment/IMagneticFieldModel.h>
#include
<corsika/geometry/RootCoordinateSystem.h>
namespace
corsika
::
environment
{
/**
* A uniform (constant) magnetic field.
*
* This class returns the same magnetic field vector
* for all evaluated locations.
*
*/
template
<
typename
T
>
class
NoMagneticField
:
public
T
{
// a type-alias for a magnetic field vector
using
MagneticFieldVector
=
corsika
::
geometry
::
Vector
<
corsika
::
units
::
si
::
magnetic_flux_density_d
>
;
public:
/**
* Construct a NoMagneticField.
*
* This is initialized with a fixed magnetic field
* and returns this magnetic field at all locations.
*
* @param field The fixed magnetic field to return.
*/
template
<
typename
...
Args
>
NoMagneticField
(
Args
&&
...
args
)
:
T
(
std
::
forward
<
Args
>
(
args
)...)
{}
/**
* Evaluate the magnetic field at a given location.
*
* @param point The location to evaluate the field at.
* @returns The magnetic field vector.
*/
MagneticFieldVector
GetMagneticField
(
corsika
::
geometry
::
Point
const
&
)
const
final
override
{
CoordinateSystem
const
&
gCS
=
RootCoordinateSystem
::
GetInstance
().
GetRootCoordinateSystem
();
return
MagneticFieldVector
(
gCS
,
{
0
_T
,
0
_T
,
0
_T
});
}
};
// END: class MagneticField
}
// namespace corsika::environment
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