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
a8d6de9e
Commit
a8d6de9e
authored
3 years ago
by
ralfulrich
Committed by
Ralf Ulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
workaround for minor backwards tracks
parent
56092264
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
corsika/detail/modules/tracking/Intersect.inl
+15
-8
15 additions, 8 deletions
corsika/detail/modules/tracking/Intersect.inl
with
15 additions
and
8 deletions
corsika/detail/modules/tracking/Intersect.inl
+
15
−
8
View file @
a8d6de9e
...
@@ -60,15 +60,11 @@ namespace corsika {
...
@@ -60,15 +60,11 @@ namespace corsika {
for
(
auto
const
&
node
:
volumeNode
.
getChildNodes
())
{
for
(
auto
const
&
node
:
volumeNode
.
getChildNodes
())
{
Intersections
const
time_intersections
=
TDerived
::
intersect
(
particle
,
*
node
);
Intersections
const
time_intersections
=
TDerived
::
intersect
(
particle
,
*
node
);
CORSIKA_LOG_
TRACE
(
"intersection times with child volume {}"
,
fmt
::
ptr
(
node
));
CORSIKA_LOG_
DEBUG
(
"intersection times with child volume {}"
,
fmt
::
ptr
(
node
));
if
(
!
time_intersections
.
hasIntersections
())
{
continue
;
}
if
(
!
time_intersections
.
hasIntersections
())
{
continue
;
}
CORSIKA_LOG_TRACE
(
" : enter {} s, exit {} s"
,
time_intersections
.
getEntry
()
/
1
_s
,
time_intersections
.
getExit
()
/
1
_s
);
auto
const
t_entry
=
time_intersections
.
getEntry
();
auto
const
t_entry
=
time_intersections
.
getEntry
();
auto
const
t_exit
=
time_intersections
.
getExit
();
auto
const
t_exit
=
time_intersections
.
getExit
();
CORSIKA_LOG_
TRACE
(
"children t-entry: {}, t-exit: {}, smaller? {} "
,
t_entry
,
t_exit
,
CORSIKA_LOG_
DEBUG
(
"children t-entry: {}, t-exit: {}, smaller? {} "
,
t_entry
,
t_exit
,
t_entry
<=
minTime
);
t_entry
<=
minTime
);
// note, theoretically t can even be smaller than 0 since we
// note, theoretically t can even be smaller than 0 since we
// KNOW we can't yet be in this volume yet, so we HAVE TO
// KNOW we can't yet be in this volume yet, so we HAVE TO
...
@@ -96,7 +92,7 @@ namespace corsika {
...
@@ -96,7 +92,7 @@ namespace corsika {
time_intersections
.
getExit
()
/
1
_s
);
time_intersections
.
getExit
()
/
1
_s
);
auto
const
t_entry
=
time_intersections
.
getEntry
();
auto
const
t_entry
=
time_intersections
.
getEntry
();
auto
const
t_exit
=
time_intersections
.
getExit
();
auto
const
t_exit
=
time_intersections
.
getExit
();
CORSIKA_LOG_
TRACE
(
"children t-entry: {}, t-exit: {}, smaller? {} "
,
t_entry
,
t_exit
,
CORSIKA_LOG_
DEBUG
(
"children t-entry: {}, t-exit: {}, smaller? {} "
,
t_entry
,
t_exit
,
t_entry
<=
minTime
);
t_entry
<=
minTime
);
// note, theoretically t can even be smaller than 0 since we
// note, theoretically t can even be smaller than 0 since we
// KNOW we can't yet be in this volume yet, so we HAVE TO
// KNOW we can't yet be in this volume yet, so we HAVE TO
...
@@ -106,7 +102,18 @@ namespace corsika {
...
@@ -106,7 +102,18 @@ namespace corsika {
minNode
=
node
;
minNode
=
node
;
}
}
}
}
CORSIKA_LOG_TRACE
(
"t-intersect: {}, node {} "
,
minTime
,
fmt
::
ptr
(
minNode
));
CORSIKA_LOG_DEBUG
(
"next time-intersect: {}, node {} "
,
minTime
,
fmt
::
ptr
(
minNode
));
// this branch cannot be unit-testes. This is malfunction: LCOV_EXCL_START
if
(
minTime
<
0
_s
)
{
if
(
minTime
<
1e-8
_s
)
{
CORSIKA_LOG_ERROR
(
"There is a very negative time step detected: {}. This is not physical and "
"may "
"easily crash subsequent modules. Set to 0_s, but CHECK AND FIX."
,
minTime
);
}
minTime
=
0
_s
;
// LCOV_EXCL_STOP
}
return
std
::
make_tuple
(
minTime
,
minNode
);
return
std
::
make_tuple
(
minTime
,
minNode
);
}
}
...
...
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