Commit 5a835a9e authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Add the new command-line option to the README

parent eb301de5
......@@ -40,6 +40,7 @@ Parameters:
-u, --fof Run Friends-of-Friends algorithm and
black holes seeding.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
......
......@@ -127,6 +127,7 @@ Parameters:
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
......
......@@ -37,6 +37,7 @@ can be found by typing ``./swift -h``:
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
......
......@@ -226,6 +226,8 @@ int main(int argc, char *argv[]) {
NULL, 0, 0),
OPT_BOOLEAN('x', "velociraptor", &with_structure_finding,
"Run with structure finding.", NULL, 0, 0),
OPT_BOOLEAN(0, "line-of-sight", &with_line_of_sight,
"Run with line-of-sight outputs.", NULL, 0, 0),
OPT_BOOLEAN(0, "limiter", &with_timestep_limiter,
"Run with time-step limiter.", NULL, 0, 0),
OPT_BOOLEAN(0, "sync", &with_timestep_sync,
......@@ -234,8 +236,6 @@ int main(int argc, char *argv[]) {
NULL, 0, 0),
OPT_BOOLEAN(0, "logger", &with_logger, "Run with the particle logger.",
NULL, 0, 0),
OPT_BOOLEAN(0, "line-of-sight", &with_line_of_sight,
"Run with line of sight.", NULL, 0, 0),
OPT_GROUP(" Simulation meta-options:\n"),
OPT_BOOLEAN(0, "quick-lyman-alpha", &with_qla,
......@@ -518,6 +518,16 @@ int main(int argc, char *argv[]) {
return 1;
}
if (!with_hydro && with_line_of_sight) {
if (myrank == 0) {
argparse_usage(&argparse);
printf(
"\nError: Cannot use line-of-sight outputs without gas, --hydro must "
"be chosen.\n");
}
return 1;
}
/* Let's pin the main thread, now we know if affinity will be used. */
#if defined(HAVE_SETAFFINITY) && defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE)
if (with_aff &&
......
......@@ -588,8 +588,8 @@ int main(int argc, char *argv[]) {
/*hydro_properties=*/NULL, /*entropy_floor=*/NULL, &gravity_properties,
/*stars_properties=*/NULL, /*black_holes_properties=*/NULL,
/*feedback_properties=*/NULL, &mesh, /*potential=*/NULL,
/*cooling_func=*/NULL,
/*starform=*/NULL, /*chemistry=*/NULL, &fof_properties);
/*cooling_func=*/NULL, /*starform=*/NULL, /*chemistry=*/NULL,
&fof_properties, /*los_properties=*/NULL);
engine_config(/*restart=*/0, /*fof=*/1, &e, params, nr_nodes, myrank,
nr_threads, with_aff, talking, NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment