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
8ae6261a
Commit
8ae6261a
authored
Jul 26, 2016
by
Pedro Gonnet
Browse files
clean up some things, remove potentially confusing space->h_max, which isn't used anywhere.
parent
c192e71a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
8ae6261a
...
...
@@ -162,7 +162,7 @@ void space_regrid(struct space *s, double cell_max, int verbose) {
struct
cell
*
restrict
c
;
ticks
tic
=
getticks
();
/* Run through the
part
s and get the current h_max. */
/* Run through the
cell
s and get the current h_max. */
// tic = getticks();
float
h_max
=
s
->
cell_min
/
kernel_gamma
/
space_stretch
;
if
(
nr_parts
>
0
)
{
...
...
@@ -174,7 +174,6 @@ void space_regrid(struct space *s, double cell_max, int verbose) {
for
(
size_t
k
=
0
;
k
<
nr_parts
;
k
++
)
{
if
(
s
->
parts
[
k
].
h
>
h_max
)
h_max
=
s
->
parts
[
k
].
h
;
}
s
->
h_max
=
h_max
;
}
}
...
...
@@ -1289,12 +1288,6 @@ void space_split_mapper(void *map_data, int num_elements, void *extra_data) {
maxdepth
=
c
->
progeny
[
k
]
->
maxdepth
;
}
/* Set the values for this cell. */
c
->
h_max
=
h_max
;
c
->
ti_end_min
=
ti_end_min
;
c
->
ti_end_max
=
ti_end_max
;
c
->
maxdepth
=
maxdepth
;
}
/* Otherwise, collect the data for this cell. */
...
...
@@ -1303,7 +1296,7 @@ void space_split_mapper(void *map_data, int num_elements, void *extra_data) {
/* Clear the progeny. */
bzero
(
c
->
progeny
,
sizeof
(
struct
cell
*
)
*
8
);
c
->
split
=
0
;
c
->
maxdepth
=
c
->
depth
;
maxdepth
=
c
->
depth
;
/* Get dt_min/dt_max. */
for
(
int
k
=
0
;
k
<
count
;
k
++
)
{
...
...
@@ -1327,11 +1320,14 @@ void space_split_mapper(void *map_data, int num_elements, void *extra_data) {
if
(
ti_end
<
ti_end_min
)
ti_end_min
=
ti_end
;
if
(
ti_end
>
ti_end_max
)
ti_end_max
=
ti_end
;
}
c
->
h_max
=
h_max
;
c
->
ti_end_min
=
ti_end_min
;
c
->
ti_end_max
=
ti_end_max
;
}
/* Set the values for this cell. */
c
->
h_max
=
h_max
;
c
->
ti_end_min
=
ti_end_min
;
c
->
ti_end_max
=
ti_end_max
;
c
->
maxdepth
=
maxdepth
;
/* Set ownership according to the start of the parts array. */
if
(
s
->
nr_parts
>
0
)
c
->
owner
=
...
...
src/space.h
View file @
8ae6261a
...
...
@@ -68,8 +68,8 @@ struct space {
/* Cell widths. */
double
h
[
3
],
ih
[
3
];
/* The minimum
and maximum cutoff radii
. */
double
h_max
,
cell_min
;
/* The minimum
cell width
. */
double
cell_min
;
/* Current maximum displacement for particles. */
float
dx_max
;
...
...
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