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
cb6878b6
Commit
cb6878b6
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Only check lack of time-step assignment for local particles
parent
08d40fbd
No related branches found
No related tags found
2 merge requests
!304
Star particle infrastructure
,
!303
MPI send/recv fixes for inactive cells
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/active.h
+9
-7
9 additions, 7 deletions
src/active.h
src/cell.c
+6
-6
6 additions, 6 deletions
src/cell.c
src/space.h
+0
-1
0 additions, 1 deletion
src/space.h
with
15 additions
and
14 deletions
src/active.h
+
9
−
7
View file @
cb6878b6
...
...
@@ -41,9 +41,10 @@ __attribute__((always_inline)) INLINE static int cell_is_drifted(
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
ti_old
>
e
->
ti_current
)
error
(
"Cell has been drifted too far forward in time! c->ti_old=%lld "
"e->ti_current=%lld"
,
c
->
ti_old
,
e
->
ti_current
);
"Cell has been drifted too far forward in time! c->ti_old=%lld (t=%e) "
"and e->ti_current=%lld (t=%e)"
,
c
->
ti_old
,
c
->
ti_old
*
e
->
timeBase
,
e
->
ti_current
,
e
->
ti_current
*
e
->
timeBase
);
#endif
return
(
c
->
ti_old
==
e
->
ti_current
);
...
...
@@ -60,11 +61,12 @@ __attribute__((always_inline)) INLINE static int cell_is_active(
const
struct
cell
*
c
,
const
struct
engine
*
e
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
ti_end_min
<
e
->
ti_current
)
if
(
c
->
ti_end_min
<
e
->
ti_current
&&
c
->
nodeID
!=
e
->
nodeID
)
error
(
"cell in an impossible time-zone! c->ti_end_min=%lld "
"e->ti_current=%lld"
,
c
->
ti_end_min
,
e
->
ti_current
);
"cell in an impossible time-zone! c->ti_end_min=%lld (t=%e) and "
"e->ti_current=%lld (t=%e)"
,
c
->
ti_end_min
,
c
->
ti_end_min
*
e
->
timeBase
,
e
->
ti_current
,
e
->
ti_current
*
e
->
timeBase
);
#endif
return
(
c
->
ti_end_min
==
e
->
ti_current
);
...
...
This diff is collapsed.
Click to expand it.
src/cell.c
+
6
−
6
View file @
cb6878b6
...
...
@@ -1140,18 +1140,18 @@ void cell_drift(struct cell *c, const struct engine *e) {
void
cell_check_timesteps
(
struct
cell
*
c
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
nodeID
!=
engine_rank
)
return
;
if
(
c
->
ti_end_min
==
0
)
error
(
"Cell without assigned time-step"
);
if
(
c
->
ti_end_min
==
0
&&
c
->
nr_tasks
>
0
)
error
(
"Cell without assigned time-step"
);
if
(
c
->
split
)
{
for
(
int
k
=
0
;
k
<
8
;
++
k
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
cell_check_timesteps
(
c
->
progeny
[
k
]);
}
else
{
for
(
int
i
=
0
;
i
<
c
->
count
;
++
i
)
if
(
c
->
parts
[
i
].
time_bin
==
0
)
error
(
"Particle without assigned time-bin"
);
if
(
c
->
nodeID
==
engine_rank
)
for
(
int
i
=
0
;
i
<
c
->
count
;
++
i
)
if
(
c
->
parts
[
i
].
time_bin
==
0
)
error
(
"Particle without assigned time-bin"
);
}
#endif
...
...
This diff is collapsed.
Click to expand it.
src/space.h
+
0
−
1
View file @
cb6878b6
...
...
@@ -189,5 +189,4 @@ void space_check_drift_point(struct space *s, integertime_t ti_current);
void
space_check_timesteps
(
struct
space
*
s
);
void
space_clean
(
struct
space
*
s
);
#endif
/* SWIFT_SPACE_H */
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