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
a9926208
Commit
a9926208
authored
7 years ago
by
Matthieu Schaller
Committed by
Matthieu Schaller
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
More debugging items removed.
parent
6ce135b5
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!566
Periodic gravity calculation
,
!565
Mesh force task
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/runner_doiact_grav.h
+11
-8
11 additions, 8 deletions
src/runner_doiact_grav.h
src/space.c
+1
-6
1 addition, 6 deletions
src/space.c
with
12 additions
and
14 deletions
src/runner_doiact_grav.h
+
11
−
8
View file @
a9926208
...
@@ -59,7 +59,9 @@ static INLINE void runner_do_grav_down(struct runner *r, struct cell *c,
...
@@ -59,7 +59,9 @@ static INLINE void runner_do_grav_down(struct runner *r, struct cell *c,
error
(
"c->field tensor not initialised"
);
error
(
"c->field tensor not initialised"
);
#endif
#endif
if
(
c
->
split
)
{
/* Node case */
if
(
c
->
split
)
{
/* Node case */
/* Add the field-tensor to all the 8 progenitors */
/* Add the field-tensor to all the 8 progenitors */
for
(
int
k
=
0
;
k
<
8
;
++
k
)
{
for
(
int
k
=
0
;
k
<
8
;
++
k
)
{
...
@@ -92,7 +94,9 @@ static INLINE void runner_do_grav_down(struct runner *r, struct cell *c,
...
@@ -92,7 +94,9 @@ static INLINE void runner_do_grav_down(struct runner *r, struct cell *c,
}
}
}
}
}
else
{
/* Leaf case */
}
else
{
/* Leaf case */
/* We can abort early if no interactions via multipole happened */
/* We can abort early if no interactions via multipole happened */
if
(
!
c
->
multipole
->
pot
.
interacted
)
return
;
if
(
!
c
->
multipole
->
pot
.
interacted
)
return
;
...
@@ -166,14 +170,12 @@ static INLINE void runner_dopair_grav_mm(struct runner *r,
...
@@ -166,14 +170,12 @@ static INLINE void runner_dopair_grav_mm(struct runner *r,
if
(
cj
->
ti_old_multipole
!=
e
->
ti_current
)
if
(
cj
->
ti_old_multipole
!=
e
->
ti_current
)
error
(
error
(
"Undrifted multipole cj->ti_old_multipole=%lld cj->nodeID=%d "
"Undrifted multipole cj->ti_old_multipole=%lld cj->nodeID=%d "
"ci->nodeID=%d "
"ci->nodeID=%d e->ti_current=%lld"
,
"e->ti_current=%lld"
,
cj
->
ti_old_multipole
,
cj
->
nodeID
,
ci
->
nodeID
,
e
->
ti_current
);
cj
->
ti_old_multipole
,
cj
->
nodeID
,
ci
->
nodeID
,
e
->
ti_current
);
/* Let's interact at this level */
/* Let's interact at this level */
if
(
0
)
gravity_M2L
(
&
ci
->
multipole
->
pot
,
multi_j
,
ci
->
multipole
->
CoM
,
gravity_M2L
(
&
ci
->
multipole
->
pot
,
multi_j
,
ci
->
multipole
->
CoM
,
cj
->
multipole
->
CoM
,
props
,
periodic
,
dim
,
r_s_inv
);
cj
->
multipole
->
CoM
,
props
,
periodic
,
dim
,
r_s_inv
);
runner_dopair_grav_pp
(
r
,
ci
,
cj
,
0
);
runner_dopair_grav_pp
(
r
,
ci
,
cj
,
0
);
...
@@ -874,7 +876,8 @@ static INLINE void runner_dopair_grav_pp(struct runner *r, struct cell *ci,
...
@@ -874,7 +876,8 @@ static INLINE void runner_dopair_grav_pp(struct runner *r, struct cell *ci,
*
*
* @param e The #engine (for debugging checks only).
* @param e The #engine (for debugging checks only).
* @param gparts The #gpart in the cell (for debugging checks only).
* @param gparts The #gpart in the cell (for debugging checks only).
*/
static
INLINE
void
runner_doself_grav_pp_full
(
*/
static
INLINE
void
runner_doself_grav_pp_full
(
struct
gravity_cache
*
restrict
ci_cache
,
const
int
gcount
,
struct
gravity_cache
*
restrict
ci_cache
,
const
int
gcount
,
const
int
gcount_padded
,
const
struct
engine
*
e
,
struct
gpart
*
gparts
)
{
const
int
gcount_padded
,
const
struct
engine
*
e
,
struct
gpart
*
gparts
)
{
/* Loop over all particles in ci... */
/* Loop over all particles in ci... */
...
...
This diff is collapsed.
Click to expand it.
src/space.c
+
1
−
6
View file @
a9926208
...
@@ -2591,14 +2591,9 @@ void space_convert_quantities_mapper(void *restrict map_data, int count,
...
@@ -2591,14 +2591,9 @@ void space_convert_quantities_mapper(void *restrict map_data, int count,
struct
part
*
restrict
parts
=
(
struct
part
*
)
map_data
;
struct
part
*
restrict
parts
=
(
struct
part
*
)
map_data
;
const
ptrdiff_t
index
=
parts
-
s
->
parts
;
const
ptrdiff_t
index
=
parts
-
s
->
parts
;
struct
xpart
*
restrict
xparts
=
s
->
xparts
+
index
;
struct
xpart
*
restrict
xparts
=
s
->
xparts
+
index
;
for
(
int
k
=
0
;
k
<
count
;
k
++
)
{
if
(
parts
[
k
].
id
==
1000
)
message
(
"S (u) = %e"
,
parts
[
k
].
entropy
);
for
(
int
k
=
0
;
k
<
count
;
k
++
)
hydro_convert_quantities
(
&
parts
[
k
],
&
xparts
[
k
],
cosmo
);
hydro_convert_quantities
(
&
parts
[
k
],
&
xparts
[
k
],
cosmo
);
if
(
parts
[
k
].
id
==
1000
)
message
(
"S = %e"
,
parts
[
k
].
entropy
);
}
}
}
/**
/**
...
...
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