Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
6e879d49
Commit
6e879d49
authored
Nov 23, 2017
by
James Willis
Browse files
Only log particles up to array length.
parent
a44a0d81
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/Gadget2/hydro_iact.h
View file @
6e879d49
...
...
@@ -106,10 +106,14 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
#ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */
pi
->
ids_ngbs_density
[
pi
->
num_ngb_density
]
=
pj
->
id
;
++
pi
->
num_ngb_density
;
pj
->
ids_ngbs_density
[
pj
->
num_ngb_density
]
=
pi
->
id
;
++
pj
->
num_ngb_density
;
if
(
pi
->
num_ngb_density
<
NUM_OF_NEIGHBOURS
)
{
pi
->
ids_ngbs_density
[
pi
->
num_ngb_density
]
=
pj
->
id
;
++
pi
->
num_ngb_density
;
}
if
(
pj
->
num_ngb_density
<
NUM_OF_NEIGHBOURS
)
{
pj
->
ids_ngbs_density
[
pj
->
num_ngb_density
]
=
pi
->
id
;
++
pj
->
num_ngb_density
;
}
#endif
}
...
...
@@ -163,8 +167,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
#ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */
pi
->
ids_ngbs_density
[
pi
->
num_ngb_density
]
=
pj
->
id
;
++
pi
->
num_ngb_density
;
if
(
pi
->
num_ngb_density
<
NUM_OF_NEIGHBOURS
)
{
pi
->
ids_ngbs_density
[
pi
->
num_ngb_density
]
=
pj
->
id
;
++
pi
->
num_ngb_density
;
}
#endif
}
...
...
@@ -493,10 +499,14 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
#ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */
pi
->
ids_ngbs_force
[
pi
->
num_ngb_force
]
=
pj
->
id
;
++
pi
->
num_ngb_force
;
pj
->
ids_ngbs_force
[
pj
->
num_ngb_force
]
=
pi
->
id
;
++
pj
->
num_ngb_force
;
if
(
pi
->
num_ngb_force
<
NUM_OF_NEIGHBOURS
)
{
pi
->
ids_ngbs_force
[
pi
->
num_ngb_force
]
=
pj
->
id
;
++
pi
->
num_ngb_force
;
}
if
(
pj
->
num_ngb_force
<
NUM_OF_NEIGHBOURS
)
{
pj
->
ids_ngbs_force
[
pj
->
num_ngb_force
]
=
pi
->
id
;
++
pj
->
num_ngb_force
;
}
#endif
}
...
...
@@ -591,8 +601,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
#ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */
pi
->
ids_ngbs_force
[
pi
->
num_ngb_force
]
=
pj
->
id
;
++
pi
->
num_ngb_force
;
if
(
pi
->
num_ngb_force
<
NUM_OF_NEIGHBOURS
)
{
pi
->
ids_ngbs_force
[
pi
->
num_ngb_force
]
=
pj
->
id
;
++
pi
->
num_ngb_force
;
}
#endif
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment