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
Snippets
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
Antonio Augusto Alves Junior
corsika
Commits
edcb893b
Commit
edcb893b
authored
6 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
fixed testCascade crash by changing the Universe to infinite-radius Sphere
parent
7b2ee361
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Environment/Environment.h
+19
-9
19 additions, 9 deletions
Environment/Environment.h
Framework/Cascade/testCascade.cc
+1
-4
1 addition, 4 deletions
Framework/Cascade/testCascade.cc
Processes/TrackingLine/TrackingLine.h
+1
-1
1 addition, 1 deletion
Processes/TrackingLine/TrackingLine.h
with
21 additions
and
14 deletions
Environment/Environment.h
+
19
−
9
View file @
edcb893b
...
...
@@ -13,11 +13,21 @@
#include
<corsika/environment/IMediumModel.h>
#include
<corsika/environment/VolumeTreeNode.h>
#include
<corsika/geometry/Point.h>
#include
<corsika/geometry/Sphere.h>
#include
<corsika/geometry/RootCoordinateSystem.h>
#include
<corsika/setup/SetupEnvironment.h>
#include
<limits>
namespace
corsika
::
environment
{
struct
Universe
:
public
corsika
::
geometry
::
Volume
{
struct
Universe
:
public
corsika
::
geometry
::
Sphere
{
Universe
(
corsika
::
geometry
::
CoordinateSystem
const
&
pCS
)
:
corsika
::
geometry
::
Sphere
(
corsika
::
geometry
::
Point
{
pCS
,
0
*
corsika
::
units
::
si
::
meter
,
0
*
corsika
::
units
::
si
::
meter
,
0
*
corsika
::
units
::
si
::
meter
},
corsika
::
units
::
si
::
meter
*
std
::
numeric_limits
<
double
>::
max
())
{}
bool
Contains
(
corsika
::
geometry
::
Point
const
&
)
const
override
{
return
true
;
}
};
...
...
@@ -25,30 +35,30 @@ namespace corsika::environment {
class
Environment
{
public:
Environment
()
:
fUniverse
(
std
::
make_unique
<
VolumeTreeNode
<
IEnvironmentModel
>>
(
std
::
make_unique
<
Universe
>
()))
{}
:
fCoordinateSystem
{
corsika
::
geometry
::
RootCoordinateSystem
::
GetInstance
().
GetRootCS
()},
fUniverse
(
std
::
make_unique
<
VolumeTreeNode
<
IEnvironmentModel
>>
(
std
::
make_unique
<
Universe
>
(
fCoordinateSystem
)))
{}
using
IEnvironmentModel
=
corsika
::
setup
::
IEnvironmentModel
;
auto
&
GetUniverse
()
{
return
fUniverse
;
}
auto
const
&
GetUniverse
()
const
{
return
fUniverse
;
}
auto
const
&
GetCoordinateSystem
()
const
{
return
corsika
::
geometry
::
RootCoordinateSystem
::
GetInstance
().
GetRootCS
();
}
auto
const
&
GetCoordinateSystem
()
const
{
return
fCoordinateSystem
;
}
// factory method for creation of VolumeTreeNodes
template
<
class
VolumeType
,
typename
...
Args
>
static
auto
CreateNode
(
Args
&&
...
args
)
{
template
<
class
VolumeType
,
typename
...
Volume
Args
>
static
auto
CreateNode
(
Volume
Args
&&
...
args
)
{
static_assert
(
std
::
is_base_of_v
<
corsika
::
geometry
::
Volume
,
VolumeType
>
,
"unusable type provided, needs to be derived from "
"
\"
corsika::geometry::Volume
\"
"
);
return
std
::
make_unique
<
VolumeTreeNode
<
IEnvironmentModel
>>
(
std
::
make_unique
<
VolumeType
>
(
std
::
forward
<
Args
>
(
args
)...));
std
::
make_unique
<
VolumeType
>
(
std
::
forward
<
Volume
Args
>
(
args
)...));
}
private
:
corsika
::
geometry
::
CoordinateSystem
const
&
fCoordinateSystem
;
VolumeTreeNode
<
IEnvironmentModel
>::
VTNUPtr
fUniverse
;
};
...
...
This diff is collapsed.
Click to expand it.
Framework/Cascade/testCascade.cc
+
1
−
4
View file @
edcb893b
...
...
@@ -80,11 +80,8 @@ private:
};
TEST_CASE
(
"Cascade"
,
"[Cascade]"
)
{
corsika
::
random
::
RNGManager
&
rmng
=
corsika
::
random
::
RNGManager
::
GetInstance
();
;
const
std
::
string
str_name
=
"s_rndm"
;
rmng
.
RegisterRandomStream
(
str_name
);
rmng
.
RegisterRandomStream
(
"s_rndm"
);
corsika
::
environment
::
Environment
env
;
// dummy environment
auto
&
universe
=
*
(
env
.
GetUniverse
());
...
...
This diff is collapsed.
Click to expand it.
Processes/TrackingLine/TrackingLine.h
+
1
−
1
View file @
edcb893b
...
...
@@ -35,7 +35,7 @@ namespace corsika::process {
template
<
typename
Stack
>
class
TrackingLine
{
//
typedef
typename
Stack
::
ParticleType
Particle
;
using
Particle
=
typename
Stack
::
ParticleType
;
corsika
::
environment
::
Environment
const
&
fEnvironment
;
...
...
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