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
8d3bf0c4
Commit
8d3bf0c4
authored
Jun 30, 2016
by
Matthieu Schaller
Browse files
Post-merge fixes
parent
d78c5419
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
8d3bf0c4
...
...
@@ -2504,11 +2504,11 @@ void engine_step(struct engine *e) {
FILE
*
file
=
fopen
(
"grav_swift.dat"
,
"w"
);
for
(
size_t
k
=
0
;
k
<
s
->
nr_gparts
;
++
k
)
{
fprintf
(
file
,
"%lld %f %f %f %e %e %e
\n
"
,
s
->
gparts
[
k
].
id
,
fprintf
(
file
,
"%lld %f %f %f %e %e %e
\n
"
,
s
->
gparts
[
k
].
id
_or_neg_offset
,
s
->
gparts
[
k
].
x
[
0
],
s
->
gparts
[
k
].
x
[
1
],
s
->
gparts
[
k
].
x
[
2
],
s
->
gparts
[
k
].
a_grav
[
0
],
s
->
gparts
[
k
].
a_grav
[
1
],
s
->
gparts
[
k
].
a_grav
[
2
]);
if
(
s
->
gparts
[
k
].
id
==
-
1
)
if
(
s
->
gparts
[
k
].
id
_or_neg_offset
==
1
)
message
(
"interacting mass= %f (%f)"
,
s
->
gparts
[
k
].
mass_interacted
,
s
->
gparts
[
k
].
mass_interacted
+
s
->
gparts
[
k
].
mass
);
}
...
...
@@ -2521,9 +2521,9 @@ void engine_step(struct engine *e) {
gravity_n2
(
temp
,
s
->
nr_gparts
,
e
->
physical_constants
,
rlr
);
file
=
fopen
(
"grav_brute.dat"
,
"w"
);
for
(
size_t
k
=
0
;
k
<
s
->
nr_gparts
;
++
k
)
{
fprintf
(
file
,
"%lld %f %f %f %e %e %e
\n
"
,
temp
[
k
].
id
,
temp
[
k
].
x
[
0
]
,
temp
[
k
].
x
[
1
],
temp
[
k
].
x
[
2
],
temp
[
k
].
a_grav
[
0
],
temp
[
k
].
a_grav
[
1
],
temp
[
k
].
a_grav
[
2
]);
fprintf
(
file
,
"%lld %f %f %f %e %e %e
\n
"
,
temp
[
k
].
id
_or_neg_offset
,
temp
[
k
].
x
[
0
],
temp
[
k
].
x
[
1
],
temp
[
k
].
x
[
2
],
temp
[
k
].
a_grav
[
0
],
temp
[
k
].
a_grav
[
1
],
temp
[
k
].
a_grav
[
2
]);
}
fclose
(
file
);
...
...
src/runner.c
View file @
8d3bf0c4
...
...
@@ -414,8 +414,8 @@ void runner_do_init(struct runner *r, struct cell *c, int timer) {
/* Get ready for a density calculation */
gravity_init_part
(
gp
);
if
(
gp
->
id
==
-
ICHECK
)
message
(
"id=%lld a=[%f %f %f]
\n
"
,
gp
->
id
,
gp
->
a_grav
[
0
],
if
(
gp
->
id
_or_neg_offset
==
ICHECK
)
message
(
"id=%lld a=[%f %f %f]
\n
"
,
gp
->
id
_or_neg_offset
,
gp
->
a_grav
[
0
],
gp
->
a_grav
[
1
],
gp
->
a_grav
[
2
]);
}
}
...
...
src/space.c
View file @
8d3bf0c4
...
...
@@ -1427,7 +1427,8 @@ struct cell *space_getcell(struct space *s) {
* @param Npart The number of Gas particles in the space.
* @param Ngpart The number of Gravity particles in the space.
* @param periodic flag whether the domain is periodic or not.
* @param verbose Print messages to stdout or not
* @param gravity flag whether we are doing gravity or not.
* @param verbose Print messages to stdout or not.
* @param dry_run If 1, just initialise stuff, don't do anything with the parts.
*
* Makes a grid of edge length > r_max and fills the particles
...
...
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