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
aba7dbf7
Commit
aba7dbf7
authored
Apr 04, 2016
by
Matthieu Schaller
Browse files
Early check that the maximal smoothing length is not larger than 1/3 the box size.
parent
8ecb5f59
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
aba7dbf7
...
...
@@ -1339,6 +1339,14 @@ void space_init(struct space *s, const struct swift_params *params,
space_subsize
=
parser_get_param_int
(
params
,
"Scheduler:cell_sub_size"
);
space_splitsize
=
parser_get_param_int
(
params
,
"Scheduler:cell_split_size"
);
/* Check that we have enough cells */
if
(
s
->
cell_min
*
3
>
dim
[
0
]
||
s
->
cell_min
*
3
>
dim
[
1
]
||
s
->
cell_min
*
3
>
dim
[
2
])
error
(
"Maximal smoothing length (%e) too large. Needs to be "
"smaller than 1/3 the simulation box size [%e %e %e]"
,
s
->
cell_min
,
dim
[
0
],
dim
[
1
],
dim
[
2
]);
/* Apply h scaling */
const
double
scaling
=
parser_get_param_double
(
params
,
"InitialConditions:h_scaling"
);
...
...
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