Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
SWIFT
SWIFTsim
Commits
6cbc97fb
Commit
6cbc97fb
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Allow the stars to move a bit in their cells in the debugging checks after star formation.
parent
14662c0c
No related branches found
No related tags found
2 merge requests
!688
Star formation (non-MPI)
,
!684
Add star particles on-the-fly
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cell.c
+7
-8
7 additions, 8 deletions
src/cell.c
with
7 additions
and
8 deletions
src/cell.c
+
7
−
8
View file @
6cbc97fb
...
...
@@ -3664,12 +3664,12 @@ void cell_check_spart_pos(const struct cell* c, const struct spart *global_spart
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
const
struct
spart
*
sp
=
&
sparts
[
i
];
if
(
(
sp
->
x
[
0
]
<
c
->
loc
[
0
])
||
(
sp
->
x
[
1
]
<
c
->
loc
[
1
])
||
(
sp
->
x
[
2
]
<
c
->
loc
[
2
])
||
(
sp
->
x
[
0
]
>=
c
->
loc
[
0
]
+
c
->
width
[
0
])
||
(
sp
->
x
[
1
]
>=
c
->
loc
[
1
]
+
c
->
width
[
1
])
||
(
sp
->
x
[
2
]
>=
c
->
loc
[
2
]
+
c
->
width
[
2
]))
if
(
(
sp
->
x
[
0
]
<
c
->
loc
[
0
]
/
space_stretch
)
||
(
sp
->
x
[
1
]
<
c
->
loc
[
1
]
/
space_stretch
)
||
(
sp
->
x
[
2
]
<
c
->
loc
[
2
]
/
space_stretch
)
||
(
sp
->
x
[
0
]
>=
(
c
->
loc
[
0
]
+
c
->
width
[
0
])
*
space_stretch
)
||
(
sp
->
x
[
1
]
>=
(
c
->
loc
[
1
]
+
c
->
width
[
1
])
*
space_stretch
)
||
(
sp
->
x
[
2
]
>=
(
c
->
loc
[
2
]
+
c
->
width
[
2
])
*
space_stretch
)
)
error
(
"spart not in its cell!"
);
if
(
sp
->
time_bin
!=
time_bin_not_created
&&
sp
->
time_bin
!=
time_bin_inhibited
)
{
...
...
@@ -3697,11 +3697,10 @@ void cell_check_spart_pos(const struct cell* c, const struct spart *global_spart
*/
void
cell_recursively_shift_sparts
(
struct
cell
*
c
,
const
int
progeny_list
[
space_cell_maxdepth
],
const
int
main_branch
)
{
if
(
c
->
split
)
{
/* No need to recurse in progenies located before the insestion point */
const
int
first_progeny
=
main_branch
?
progeny_list
[
c
->
depth
]
:
0
;
const
int
first_progeny
=
main_branch
?
progeny_list
[
(
int
)
c
->
depth
]
:
0
;
for
(
int
k
=
first_progeny
;
k
<
8
;
++
k
)
{
...
...
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