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
2731fd75
Commit
2731fd75
authored
Jul 12, 2017
by
Loikki
Browse files
Remove 8-cell limit in gravity + non periodic case
#323
parent
81269f6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
2731fd75
...
...
@@ -318,10 +318,18 @@ void space_regrid(struct space *s, int verbose) {
"box sizes per time-step.
\n
"
);
/* Check if we have enough cells for gravity. */
if
(
s
->
gravity
&&
(
cdim
[
0
]
<
8
||
cdim
[
1
]
<
8
||
cdim
[
2
]
<
8
))
if
(
s
->
gravity
&&
s
->
periodic
&&
(
cdim
[
0
]
<
8
||
cdim
[
1
]
<
8
||
cdim
[
2
]
<
8
))
error
(
"Must have at least 8 cells in each spatial dimension when gravity "
"is switched on."
);
"is switched on.
\n
This error is often caused by any of the "
"followings:
\n
"
" - too few particles to generate a sensible grid,
\n
"
" - the initial value of 'Scheduler:max_top_level_cells' is too "
"small,
\n
"
" - the (minimal) time-step is too large leading to particles with "
"predicted smoothing lengths too large for the box size,
\n
"
" - particle with velocities so large that they move by more than two "
"box sizes per time-step.
\n
"
);
/* In MPI-Land, changing the top-level cell size requires that the
* global partition is recomputed and the particles redistributed.
...
...
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