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
4258cba1
Commit
4258cba1
authored
Nov 14, 2016
by
Matthieu Schaller
Browse files
Properly initialise the cells in test125cells.c
parent
def34d3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
4258cba1
...
...
@@ -226,7 +226,8 @@ int checkCellhdxmax(const struct cell *c, int *depth) {
/* Check. */
int
result
=
1
;
if
(
c
->
h_max
!=
h_max
)
{
message
(
"%d Inconsistent h_max: cell %f != parts %f"
,
*
depth
,
c
->
h_max
,
h_max
);
message
(
"%d Inconsistent h_max: cell %f != parts %f"
,
*
depth
,
c
->
h_max
,
h_max
);
message
(
"location: %f %f %f"
,
c
->
loc
[
0
],
c
->
loc
[
1
],
c
->
loc
[
2
]);
result
=
0
;
}
...
...
tests/test125cells.c
View file @
4258cba1
...
...
@@ -269,12 +269,12 @@ struct cell *make_cell(size_t n, const double offset[3], double size, double h,
set_velocity
(
part
,
vel
,
size
);
set_energy_state
(
part
,
press
,
size
,
density
);
hydro_first_init_part
(
part
,
xpart
);
part
->
id
=
++
(
*
partId
);
part
->
ti_begin
=
0
;
part
->
ti_end
=
1
;
hydro_first_init_part
(
part
,
xpart
);
#if defined(GIZMO_SPH)
part
->
geometry
.
volume
=
part
->
conserved
.
mass
/
density
;
part
->
primitives
.
rho
=
density
;
...
...
@@ -311,6 +311,7 @@ struct cell *make_cell(size_t n, const double offset[3], double size, double h,
cell
->
loc
[
1
]
=
offset
[
1
];
cell
->
loc
[
2
]
=
offset
[
2
];
cell
->
ti_old
=
1
;
cell
->
ti_end_min
=
1
;
cell
->
ti_end_max
=
1
;
...
...
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