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

Make sure we run with gravity or SPH.

parent b90bd94b
Branches
Tags
1 merge request!140First version of main() using a parameter file to get constants.
...@@ -200,11 +200,17 @@ int main(int argc, char *argv[]) { ...@@ -200,11 +200,17 @@ int main(int argc, char *argv[]) {
} else if (optind > argc - 1) { } else if (optind > argc - 1) {
if (myrank == 0) printf("Error: A parameter file name must be provided\n"); if (myrank == 0) printf("Error: A parameter file name must be provided\n");
if (myrank == 0) print_help_message(); if (myrank == 0) print_help_message();
exit(1); return 1;
} else { } else {
if (myrank == 0) printf("Error: Too many parameters given\n"); if (myrank == 0) printf("Error: Too many parameters given\n");
if (myrank == 0) print_help_message(); if (myrank == 0) print_help_message();
exit(1); return 1;
}
if (!with_self_gravity && !with_hydro && !with_external_gravity) {
if (myrank == 0)
printf("Error: At least one of -s, -g or -G must be chosen.\n");
if (myrank == 0) print_help_message();
return 1;
} }
/* Genesis 1.1: And then, there was time ! */ /* Genesis 1.1: And then, there was time ! */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment