Skip to content
Snippets Groups Projects
Commit e2e484b9 authored by Matthieu Schaller's avatar Matthieu Schaller Committed by Matthieu Schaller
Browse files

Make sure the gravity mesh side is an even number

parent fbe6171b
No related branches found
No related tags found
2 merge requests!566Periodic gravity calculation,!565Mesh force task
......@@ -57,6 +57,9 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params,
p->r_cut_min = parser_get_opt_param_float(params, "Gravity:r_cut_min",
gravity_props_default_r_cut_min);
if (p->mesh_size % 2 != 0)
error("The mesh side-length must be an even number.");
if (p->a_smooth <= 0.)
error("The mesh smoothing scale 'a_smooth' must be > 0.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment