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
0a053c45
Commit
0a053c45
authored
Jan 19, 2017
by
Matthieu Schaller
Browse files
No x_diff for the stars. Documentation. Use time_bin for the stars.
parent
80f9ed1c
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
0a053c45
...
...
@@ -555,8 +555,12 @@ void cell_sunlocktree(struct cell *c) {
* @param c The #cell array to be sorted.
* @param parts_offset Offset of the cell parts array relative to the
* space's parts array, i.e. c->parts - s->parts.
* @param sparts_offset Offset of the cell sparts array relative to the
* space's sparts array, i.e. c->sparts - s->sparts.
* @param buff A buffer with at least max(c->count, c->gcount) entries,
* used for sorting indices.
* @param sbuff A buffer with at least max(c->scount, c->gcount) entries,
* used for sorting indices for the sparts.
* @param gbuff A buffer with at least max(c->count, c->gcount) entries,
* used for sorting indices for the gparts.
*/
...
...
src/space.c
View file @
0a053c45
...
...
@@ -1924,10 +1924,8 @@ void space_split_recursive(struct space *s, struct cell *c,
}
for
(
int
k
=
0
;
k
<
scount
;
k
++
)
{
struct
spart
*
sp
=
&
sparts
[
k
];
const
int
ti_end
=
sp
->
ti_end
;
sp
->
x_diff
[
0
]
=
0
.
f
;
sp
->
x_diff
[
1
]
=
0
.
f
;
sp
->
x_diff
[
2
]
=
0
.
f
;
const
integertime_t
ti_end
=
get_integer_time_end
(
e
->
ti_current
,
sp
->
time_bin
);
if
(
ti_end
<
ti_end_min
)
ti_end_min
=
ti_end
;
if
(
ti_end
>
ti_end_max
)
ti_end_max
=
ti_end
;
}
...
...
@@ -2214,8 +2212,10 @@ void space_init_sparts(struct space *s) {
* @param dim Spatial dimensions of the domain.
* @param parts Array of Gas particles.
* @param gparts Array of Gravity particles.
* @param sparts Array of star particles.
* @param Npart The number of Gas particles in the space.
* @param Ngpart The number of Gravity particles in the space.
* @param Nspart The number of star particles in the space.
* @param periodic flag whether the domain is periodic or not.
* @param gravity flag whether we are doing gravity or not.
* @param verbose Print messages to stdout or not.
...
...
src/stars/Default/star.h
View file @
0a053c45
...
...
@@ -44,8 +44,7 @@ __attribute__((always_inline)) INLINE static float star_compute_timestep_self(
__attribute__
((
always_inline
))
INLINE
static
void
star_first_init_spart
(
struct
spart
*
sp
)
{
sp
->
ti_begin
=
0
;
sp
->
ti_end
=
0
;
sp
->
time_bin
=
0
;
}
/**
...
...
src/stars/Default/star_part.h
View file @
0a053c45
...
...
@@ -34,20 +34,14 @@ struct spart {
/* Particle position. */
double
x
[
3
];
/* Offset between current position and position at last tree rebuild. */
float
x_diff
[
3
];
/* Particle velocity. */
float
v
[
3
];
/* Star mass */
float
mass
;
/* Particle time of beginning of time-step. */
int
ti_begin
;
/* Particle time of end of time-step. */
int
ti_end
;
/* Particle time bin */
timebin_t
time_bin
;
}
SWIFT_STRUCT_ALIGN
;
...
...
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