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
06fecd99
Commit
06fecd99
authored
3 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
kinetic energy
parent
2a6f8be0
No related branches found
No related tags found
1 merge request
!337
Resolve "Add kinetic energy getter for particles"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
corsika/framework/geometry/Point.hpp
+2
-45
2 additions, 45 deletions
corsika/framework/geometry/Point.hpp
with
2 additions
and
45 deletions
corsika/framework/geometry/Point.hpp
+
2
−
45
View file @
06fecd99
...
...
@@ -22,54 +22,11 @@ namespace corsika {
class
Point
:
public
BaseVector
<
length_d
>
{
public:
#ifdef TRACE
static
int
count_construct_
;
static
int
count_copy_construct_
;
static
int
count_move_
;
static
int
count_assign_
;
static
int
count_destruct_
;
Point
(
Point
const
&
v
)
:
BaseVector
<
length_d
>
(
v
)
{
count_copy_construct_
++
;
}
Point
(
Point
&&
v
)
:
BaseVector
<
length_d
>
(
v
)
{
count_move_
++
;
}
Point
&
operator
=
(
Point
const
&
v
)
{
count_assign_
++
;
BaseVector
<
length_d
>::
operator
=
(
v
);
return
*
this
;
}
~
Point
()
{
count_destruct_
++
;
}
static
void
trace
()
{
CORSIKA_LOG_INFO
(
"Point count_construct_={} count_copy_construct_={} count_move_={} "
"count_assign_={} "
"count_destruct_={}"
,
count_construct_
,
count_copy_construct_
,
count_move_
,
count_assign_
,
count_destruct_
);
}
#else
Point
(
Point
const
&
)
=
default
;
Point
(
Point
&&
)
=
default
;
Point
&
operator
=
(
Point
const
&
)
=
default
;
~
Point
()
=
default
;
#endif
Point
(
CoordinateSystemPtr
const
&
pCS
,
QuantityVector
<
length_d
>
const
&
pQVector
)
:
BaseVector
<
length_d
>
(
pCS
,
pQVector
)
{
#ifdef TRACE
count_construct_
++
;
#endif
}
:
BaseVector
<
length_d
>
(
pCS
,
pQVector
)
{}
Point
(
CoordinateSystemPtr
const
&
cs
,
LengthType
x
,
LengthType
y
,
LengthType
z
)
:
BaseVector
<
length_d
>
(
cs
,
{
x
,
y
,
z
})
{
#ifdef TRACE
count_construct_
++
;
#endif
}
:
BaseVector
<
length_d
>
(
cs
,
{
x
,
y
,
z
})
{}
/** \todo TODO: this should be private or protected, we don NOT want to expose numbers
* without reference to outside:
...
...
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