21#define FIX_UNUSED(X) (void) (X)
27const char *gengetopt_args_info_purpose =
"Generates resistance tensor (.hydro) files which are required when\nusing the Langevin integrator with complex rigid bodies. Hydro\nsupports three approximate models: AtomicBead, RoughShell, and\nBoundaryElement. Additionally, Hydro can generate resistance tensor\nfiles using analytic solutions for simple shapes. \n\nTo generate a .hydro file, one form of an input file must be\nspecified. This can either be a MetaData (omd) file, or xyz, stl, or\nMSMS output files. For stl and MSMS files which both describe triangulated\nsurfaces, the hydrodynamics model must be BoundaryElement. \n\nSince the resistance tensor depends on viscosity of the solvent, and\ndiffusion tensors depend on temperature, these must either be\nspecified as arguments or listed in the MetaData (omd) file with the\nkeywords viscosity and targetTemp. If the approximate model in use is\nthe RoughShell model the beadSize (the diameter of the small beads\nused to approximate the surface of the body) must also be specified.";
29const char *gengetopt_args_info_usage =
"Usage: Hydro [OPTION]... [FILE]...";
31const char *gengetopt_args_info_versiontext =
"";
33const char *gengetopt_args_info_description =
"";
35const char *gengetopt_args_info_help[] = {
36 " -h, --help Print help and exit",
37 " -V, --version Print version and exit",
38 "\n Group: input file\n an input file is required",
39 " -i, --input=filename input MetaData (omd) file",
40 " -x, --xyz=filename xyz file for AtomicBead model",
41 " --stl=filename stl file for BoundaryElement model",
42 " --msms=filename filename root for MSMS .vert and .face files",
43 " -o, --output=STRING output file prefix",
44 " --model=ENUM hydrodynamics model (possible\n values=\"AtomicBead\", \"RoughShell\",\n \"BoundaryElement\") (mandatory)",
45 " -s, --beadSize=DOUBLE bead size (diameter) for RoughShell model (in\n angstroms) (default=`0.2')",
46 " -e, --elements output the hydrodynamic elements (beads or\n triangles) only, hydrodynamics calculation will\n not be performed (default=off)",
47 " -v, --viscosity=DOUBLE viscosity (in poise) (default=`0.01')",
48 " -t, --temperature=DOUBLE temperature (in Kelvin (default=`300')",
57} cmdline_parser_arg_type;
69cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error);
71const char *cmdline_parser_model_values[] = {
"AtomicBead",
"RoughShell",
"BoundaryElement", 0};
74gengetopt_strdup (
const char *s);
97 FIX_UNUSED (args_info);
125 args_info->
help_help = gengetopt_args_info_help[0] ;
127 args_info->
input_help = gengetopt_args_info_help[3] ;
128 args_info->
xyz_help = gengetopt_args_info_help[4] ;
129 args_info->
stl_help = gengetopt_args_info_help[5] ;
130 args_info->
msms_help = gengetopt_args_info_help[6] ;
131 args_info->
output_help = gengetopt_args_info_help[7] ;
132 args_info->
model_help = gengetopt_args_info_help[8] ;
141cmdline_parser_print_version (
void)
147 if (strlen(gengetopt_args_info_versiontext) > 0)
148 printf(
"\n%s\n", gengetopt_args_info_versiontext);
151static void print_help_common(
void)
153 size_t len_purpose = strlen(gengetopt_args_info_purpose);
154 size_t len_usage = strlen(gengetopt_args_info_usage);
157 printf(
"%s\n", gengetopt_args_info_usage);
159 if (len_purpose > 0) {
160 printf(
"%s\n", gengetopt_args_info_purpose);
163 if (len_usage || len_purpose) {
167 if (strlen(gengetopt_args_info_description) > 0) {
168 printf(
"%s\n\n", gengetopt_args_info_description);
173cmdline_parser_print_help (
void)
177 while (gengetopt_args_info_help[i])
178 printf(
"%s\n", gengetopt_args_info_help[i++]);
184 clear_given (args_info);
185 clear_args (args_info);
186 init_args_info (args_info);
215free_string_field (
char **s)
229 free_string_field (&(args_info->
input_arg));
231 free_string_field (&(args_info->
xyz_arg));
232 free_string_field (&(args_info->
xyz_orig));
233 free_string_field (&(args_info->
stl_arg));
234 free_string_field (&(args_info->
stl_orig));
235 free_string_field (&(args_info->
msms_arg));
236 free_string_field (&(args_info->
msms_orig));
246 free (args_info->
inputs [i]);
251 clear_given (args_info);
262check_possible_values(
const char *val,
const char *values[])
272 for (i = 0, len = strlen(val); values[i]; ++i)
274 if (strncmp(val, values[i], len) == 0)
278 if (strlen(values[i]) == len)
286 return (found ? -2 : -1);
291write_into_file(FILE *outfile,
const char *opt,
const char *arg,
const char *values[])
296 found = check_possible_values(arg, values);
299 fprintf(outfile,
"%s=\"%s\" # %s\n", opt, arg, values[found]);
301 fprintf(outfile,
"%s=\"%s\"\n", opt, arg);
303 fprintf(outfile,
"%s\n", opt);
320 write_into_file(outfile,
"help", 0, 0 );
322 write_into_file(outfile,
"version", 0, 0 );
324 write_into_file(outfile,
"input", args_info->
input_orig, 0);
326 write_into_file(outfile,
"xyz", args_info->
xyz_orig, 0);
328 write_into_file(outfile,
"stl", args_info->
stl_orig, 0);
330 write_into_file(outfile,
"msms", args_info->
msms_orig, 0);
332 write_into_file(outfile,
"output", args_info->
output_orig, 0);
334 write_into_file(outfile,
"model", args_info->
model_orig, cmdline_parser_model_values);
336 write_into_file(outfile,
"beadSize", args_info->
beadSize_orig, 0);
338 write_into_file(outfile,
"elements", 0, 0 );
340 write_into_file(outfile,
"viscosity", args_info->
viscosity_orig, 0);
355 outfile = fopen(filename,
"w");
372 cmdline_parser_release (args_info);
377gengetopt_strdup (
const char *s)
383 result = (
char*)malloc(strlen(s) + 1);
384 if (result == (
char*)0)
397 free_string_field (&(args_info->
input_arg));
400 free_string_field (&(args_info->
xyz_arg));
401 free_string_field (&(args_info->
xyz_orig));
403 free_string_field (&(args_info->
stl_arg));
404 free_string_field (&(args_info->
stl_orig));
406 free_string_field (&(args_info->
msms_arg));
407 free_string_field (&(args_info->
msms_orig));
423 result = cmdline_parser_internal (argc, argv, args_info, params, 0);
440 result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0);
448 int result = EXIT_SUCCESS;
450 if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
451 result = EXIT_FAILURE;
457cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error)
459 int error_occurred = 0;
460 FIX_UNUSED (additional_error);
465 fprintf (stderr,
"%s: '--model' option required%s\n", prog_name, (additional_error ? additional_error :
""));
471 fprintf (stderr,
"%s: %d options of group input file were given. One is required%s.\n", prog_name, args_info->
input_file_group_counter, (additional_error ? additional_error :
""));
478 return error_occurred;
536#ifndef required_argument
537#define required_argument 1
540#ifndef optional_argument
541#define optional_argument 2
544struct custom_getopt_data {
586static char *custom_optarg;
603static int custom_optind = 1;
609static int custom_opterr = 1;
615static int custom_optopt =
'?';
625static void exchange(
char **argv,
struct custom_getopt_data *d)
627 int bottom = d->first_nonopt;
628 int middle = d->last_nonopt;
629 int top = d->custom_optind;
638 while (top > middle && middle > bottom) {
639 if (top - middle > middle - bottom) {
641 int len = middle - bottom;
645 for (i = 0; i < len; i++) {
646 tem = argv[bottom + i];
648 argv[top - (middle - bottom) + i];
649 argv[top - (middle - bottom) + i] = tem;
655 int len = top - middle;
659 for (i = 0; i < len; i++) {
660 tem = argv[bottom + i];
661 argv[bottom + i] = argv[middle + i];
662 argv[middle + i] = tem;
669 d->first_nonopt += (d->custom_optind - d->last_nonopt);
670 d->last_nonopt = d->custom_optind;
674static void custom_getopt_initialize(
struct custom_getopt_data *d)
681 d->first_nonopt = d->last_nonopt = d->custom_optind;
686#define NONOPTION_P (argv[d->custom_optind][0] != '-' || argv[d->custom_optind][1] == '\0')
689static int shuffle_argv(
int argc,
char *
const *argv,
const struct option *longopts,
690 struct custom_getopt_data *d)
696 if (d->last_nonopt > d->custom_optind)
697 d->last_nonopt = d->custom_optind;
698 if (d->first_nonopt > d->custom_optind)
699 d->first_nonopt = d->custom_optind;
704 if (d->first_nonopt != d->last_nonopt &&
705 d->last_nonopt != d->custom_optind)
706 exchange((
char **) argv, d);
707 else if (d->last_nonopt != d->custom_optind)
708 d->first_nonopt = d->custom_optind;
713 while (d->custom_optind < argc && NONOPTION_P)
715 d->last_nonopt = d->custom_optind;
721 if (d->custom_optind != argc && !strcmp(argv[d->custom_optind],
"--")) {
723 if (d->first_nonopt != d->last_nonopt
724 && d->last_nonopt != d->custom_optind)
725 exchange((
char **) argv, d);
726 else if (d->first_nonopt == d->last_nonopt)
727 d->first_nonopt = d->custom_optind;
728 d->last_nonopt = argc;
729 d->custom_optind = argc;
735 if (d->custom_optind == argc) {
740 if (d->first_nonopt != d->last_nonopt)
741 d->custom_optind = d->first_nonopt;
749 d->custom_optarg = argv[d->custom_optind++];
756 d->nextchar = (argv[d->custom_optind] + 1 + (longopts != NULL && argv[d->custom_optind][1] ==
'-'));
770static int check_long_opt(
int argc,
char *
const *argv,
const char *optstring,
771 const struct option *longopts,
int *longind,
772 int print_errors,
struct custom_getopt_data *d)
775 const struct option *p;
776 const struct option *pfound = NULL;
782 for (nameend = d->nextchar; *nameend && *nameend !=
'='; nameend++)
786 for (p = longopts, option_index = 0; p->name; p++, option_index++)
787 if (!strncmp(p->name, d->nextchar, nameend - d->nextchar)) {
788 if ((
unsigned int) (nameend - d->nextchar)
789 == (
unsigned int) strlen(p->name)) {
792 indfound = option_index;
795 }
else if (pfound == NULL) {
798 indfound = option_index;
799 }
else if (pfound->has_arg != p->has_arg
800 || pfound->flag != p->flag
801 || pfound->val != p->val)
805 if (ambig && !exact) {
808 "%s: option `%s' is ambiguous\n",
809 argv[0], argv[d->custom_optind]);
811 d->nextchar += strlen(d->nextchar);
813 d->custom_optopt = 0;
817 option_index = indfound;
820 if (pfound->has_arg != no_argument)
821 d->custom_optarg = nameend + 1;
824 if (argv[d->custom_optind - 1][1] ==
'-') {
826 fprintf(stderr,
"%s: option `--%s' doesn't allow an argument\n",
827 argv[0], pfound->name);
830 fprintf(stderr,
"%s: option `%c%s' doesn't allow an argument\n",
831 argv[0], argv[d->custom_optind - 1][0], pfound->name);
835 d->nextchar += strlen(d->nextchar);
836 d->custom_optopt = pfound->val;
839 }
else if (pfound->has_arg == required_argument) {
840 if (d->custom_optind < argc)
841 d->custom_optarg = argv[d->custom_optind++];
845 "%s: option `%s' requires an argument\n",
847 argv[d->custom_optind - 1]);
849 d->nextchar += strlen(d->nextchar);
850 d->custom_optopt = pfound->val;
851 return optstring[0] ==
':' ?
':' :
'?';
854 d->nextchar += strlen(d->nextchar);
856 *longind = option_index;
858 *(pfound->flag) = pfound->val;
869 if (argv[d->custom_optind][1] ==
'-') {
872 "%s: unrecognized option `--%s'\n",
873 argv[0], d->nextchar);
877 "%s: unrecognized option `%c%s'\n",
878 argv[0], argv[d->custom_optind][0],
882 d->nextchar = (
char *)
"";
884 d->custom_optopt = 0;
888static int check_short_opt(
int argc,
char *
const *argv,
const char *optstring,
889 int print_errors,
struct custom_getopt_data *d)
891 char c = *d->nextchar++;
892 const char *temp = strchr(optstring, c);
895 if (*d->nextchar ==
'\0')
897 if (!temp || c ==
':') {
899 fprintf(stderr,
"%s: invalid option -- %c\n", argv[0], c);
901 d->custom_optopt = c;
904 if (temp[1] ==
':') {
905 if (temp[2] ==
':') {
907 if (*d->nextchar !=
'\0') {
908 d->custom_optarg = d->nextchar;
911 d->custom_optarg = NULL;
915 if (*d->nextchar !=
'\0') {
916 d->custom_optarg = d->nextchar;
923 }
else if (d->custom_optind == argc) {
926 "%s: option requires an argument -- %c\n",
929 d->custom_optopt = c;
930 if (optstring[0] ==
':')
940 d->custom_optarg = argv[d->custom_optind++];
1017static int getopt_internal_r(
int argc,
char *
const *argv,
const char *optstring,
1018 const struct option *longopts,
int *longind,
1019 struct custom_getopt_data *d)
1021 int ret, print_errors = d->custom_opterr;
1023 if (optstring[0] ==
':')
1027 d->custom_optarg = NULL;
1033 if (d->custom_optind == 0 || !d->initialized) {
1034 if (d->custom_optind == 0)
1035 d->custom_optind = 1;
1036 custom_getopt_initialize(d);
1038 if (d->nextchar == NULL || *d->nextchar ==
'\0') {
1039 ret = shuffle_argv(argc, argv, longopts, d);
1043 if (longopts && (argv[d->custom_optind][1] ==
'-' ))
1044 return check_long_opt(argc, argv, optstring, longopts,
1045 longind, print_errors, d);
1046 return check_short_opt(argc, argv, optstring, print_errors, d);
1049static int custom_getopt_internal(
int argc,
char *
const *argv,
const char *optstring,
1050 const struct option *longopts,
int *longind)
1054 static struct custom_getopt_data d;
1056 d.custom_optind = custom_optind;
1057 d.custom_opterr = custom_opterr;
1058 result = getopt_internal_r(argc, argv, optstring, longopts,
1060 custom_optind = d.custom_optind;
1061 custom_optarg = d.custom_optarg;
1062 custom_optopt = d.custom_optopt;
1066static int custom_getopt_long (
int argc,
char *
const *argv,
const char *options,
1067 const struct option *long_options,
int *opt_index)
1069 return custom_getopt_internal(argc, argv, options, long_options,
1074static char *package_name = 0;
1095int update_arg(
void *field,
char **orig_field,
1096 unsigned int *field_given,
unsigned int *prev_given,
1097 char *value,
const char *possible_values[],
1098 const char *default_value,
1099 cmdline_parser_arg_type arg_type,
1100 int check_ambiguity,
int override,
1101 int no_free,
int multiple_option,
1102 const char *long_opt,
char short_opt,
1103 const char *additional_error)
1105 char *stop_char = 0;
1106 const char *val = value;
1108 char **string_field;
1114 if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
1116 if (short_opt !=
'-')
1117 fprintf (stderr,
"%s: `--%s' (`-%c') option given more than once%s\n",
1118 package_name, long_opt, short_opt,
1119 (additional_error ? additional_error :
""));
1121 fprintf (stderr,
"%s: `--%s' option given more than once%s\n",
1122 package_name, long_opt,
1123 (additional_error ? additional_error :
""));
1127 if (possible_values && (found = check_possible_values((value ? value : default_value), possible_values)) < 0)
1129 if (short_opt !=
'-')
1130 fprintf (stderr,
"%s: %s argument, \"%s\", for option `--%s' (`-%c')%s\n",
1131 package_name, (found == -2) ?
"ambiguous" :
"invalid", value, long_opt, short_opt,
1132 (additional_error ? additional_error :
""));
1134 fprintf (stderr,
"%s: %s argument, \"%s\", for option `--%s'%s\n",
1135 package_name, (found == -2) ?
"ambiguous" :
"invalid", value, long_opt,
1136 (additional_error ? additional_error :
""));
1140 if (field_given && *field_given && !
override)
1146 if (possible_values)
1147 val = possible_values[found];
1151 *((
int *)field) = !*((
int *)field);
1154 if (val) *((
double *)field) = strtod (val, &stop_char);
1157 if (val) *((
int *)field) = found;
1161 string_field = (
char **)field;
1162 if (!no_free && *string_field)
1163 free (*string_field);
1164 *string_field = gengetopt_strdup (val);
1174 if (val && !(stop_char && *stop_char ==
'\0')) {
1175 fprintf(stderr,
"%s: invalid numeric value: %s\n", package_name, val);
1189 if (value && orig_field) {
1191 *orig_field = value;
1195 *orig_field = gengetopt_strdup (value);
1205cmdline_parser_internal (
1211 int error_occurred = 0;
1217 int check_ambiguity;
1224 package_name = argv[0];
1228 FIX_UNUSED(
override);
1235 FIX_UNUSED(check_ambiguity);
1249 int option_index = 0;
1251 static struct option long_options[] = {
1252 {
"help", 0, NULL,
'h' },
1253 {
"version", 0, NULL,
'V' },
1254 {
"input", 1, NULL,
'i' },
1255 {
"xyz", 1, NULL,
'x' },
1256 {
"stl", 1, NULL, 0 },
1257 {
"msms", 1, NULL, 0 },
1258 {
"output", 1, NULL,
'o' },
1259 {
"model", 1, NULL, 0 },
1260 {
"beadSize", 1, NULL,
's' },
1261 {
"elements", 0, NULL,
'e' },
1262 {
"viscosity", 1, NULL,
'v' },
1263 {
"temperature", 1, NULL,
't' },
1267 custom_optarg = optarg;
1268 custom_optind = optind;
1269 custom_opterr = opterr;
1270 custom_optopt = optopt;
1272 c = custom_getopt_long (argc, argv,
"hVi:x:o:s:ev:t:", long_options, &option_index);
1274 optarg = custom_optarg;
1275 optind = custom_optind;
1276 opterr = custom_opterr;
1277 optopt = custom_optopt;
1284 cmdline_parser_print_help ();
1285 cmdline_parser_free (&local_args_info);
1286 exit (EXIT_SUCCESS);
1289 cmdline_parser_print_version ();
1290 cmdline_parser_free (&local_args_info);
1291 exit (EXIT_SUCCESS);
1296 reset_group_input_file (args_info);
1299 if (update_arg( (
void *)&(args_info->
input_arg),
1301 &(local_args_info.input_given), optarg, 0, 0, ARG_STRING,
1302 check_ambiguity,
override, 0, 0,
1311 reset_group_input_file (args_info);
1314 if (update_arg( (
void *)&(args_info->
xyz_arg),
1316 &(local_args_info.xyz_given), optarg, 0, 0, ARG_STRING,
1317 check_ambiguity,
override, 0, 0,
1326 if (update_arg( (
void *)&(args_info->
output_arg),
1328 &(local_args_info.output_given), optarg, 0, 0, ARG_STRING,
1329 check_ambiguity,
override, 0, 0,
1340 &(local_args_info.beadSize_given), optarg, 0,
"0.2", ARG_DOUBLE,
1341 check_ambiguity,
override, 0, 0,
1351 &(local_args_info.elements_given), optarg, 0, 0, ARG_FLAG,
1352 check_ambiguity,
override, 1, 0,
"elements",
'e',
1362 &(local_args_info.viscosity_given), optarg, 0,
"0.01", ARG_DOUBLE,
1363 check_ambiguity,
override, 0, 0,
1374 &(local_args_info.temperature_given), optarg, 0,
"300", ARG_DOUBLE,
1375 check_ambiguity,
override, 0, 0,
1384 if (strcmp (long_options[option_index].name,
"stl") == 0)
1388 reset_group_input_file (args_info);
1391 if (update_arg( (
void *)&(args_info->
stl_arg),
1393 &(local_args_info.stl_given), optarg, 0, 0, ARG_STRING,
1394 check_ambiguity,
override, 0, 0,
1401 else if (strcmp (long_options[option_index].name,
"msms") == 0)
1405 reset_group_input_file (args_info);
1408 if (update_arg( (
void *)&(args_info->
msms_arg),
1410 &(local_args_info.msms_given), optarg, 0, 0, ARG_STRING,
1411 check_ambiguity,
override, 0, 0,
1418 else if (strcmp (long_options[option_index].name,
"model") == 0)
1422 if (update_arg( (
void *)&(args_info->
model_arg),
1424 &(local_args_info.model_given), optarg, cmdline_parser_model_values, 0, ARG_ENUM,
1425 check_ambiguity,
override, 0, 0,
1438 fprintf (stderr,
"%s: option unknown: %c%s\n",
CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error :
""));
1445 fprintf (stderr,
"%s: %d options of group input file were given. One is required%s.\n", argv[0], args_info->
input_file_group_counter, (additional_error ? additional_error :
""));
1453 error_occurred += cmdline_parser_required2 (args_info, argv[0], additional_error);
1456 cmdline_parser_release (&local_args_info);
1458 if ( error_occurred )
1459 return (EXIT_FAILURE);
1464 int found_prog_name = 0;
1470 args_info->
inputs_num = argc - optind - found_prog_name;
1472 (
char **)(malloc ((args_info->
inputs_num)*
sizeof(
char *))) ;
1473 while (optind < argc)
1474 args_info->
inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;
1481 cmdline_parser_release (&local_args_info);
1482 return (EXIT_FAILURE);
#define CMDLINE_PARSER_VERSION
the program version
#define CMDLINE_PARSER_PACKAGE_NAME
the complete program name (used for help and version)
#define CMDLINE_PARSER_PACKAGE
the program name (used for printing errors)
The header file for the command line option parser generated by GNU Gengetopt version 2....
The additional parameters to pass to parser functions.
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
int check_required
whether to check that all required options were provided (default 1)
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
int override
whether to override possibly already present options (default 0)
Where the command line options are stored.
double viscosity_arg
viscosity (in poise) (default='0.01').
unsigned int output_given
Whether output was given.
char * beadSize_orig
bead size (diameter) for RoughShell model (in angstroms) original value given at command line.
char * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
char * temperature_orig
temperature (in Kelvin original value given at command line.
enum enum_model model_arg
hydrodynamics model.
unsigned int msms_given
Whether msms was given.
unsigned int xyz_given
Whether xyz was given.
unsigned inputs_num
unamed options number
double beadSize_arg
bead size (diameter) for RoughShell model (in angstroms) (default='0.2').
const char * xyz_help
xyz file for AtomicBead model help description.
const char * stl_help
stl file for BoundaryElement model help description.
const char * help_help
Print help and exit help description.
int input_file_group_counter
Counter for group input_file.
const char * model_help
hydrodynamics model help description.
char * output_arg
output file name.
char ** inputs
unamed options (options without names)
const char * temperature_help
temperature (in Kelvin help description.
char * input_arg
input dump file.
unsigned int beadSize_given
Whether beadSize was given.
char * msms_orig
filename root for MSMS .vert and .face files original value given at command line.
char * xyz_orig
xyz file for AtomicBead model original value given at command line.
const char * elements_help
output the hydrodynamic elements (beads or triangles) only, hydrodynamics calculation will not be per...
double temperature_arg
temperature (in Kelvin (default='300').
const char * beadSize_help
bead size (diameter) for RoughShell model (in angstroms) help description.
unsigned int elements_given
Whether elements was given.
const char * viscosity_help
viscosity (in poise) help description.
char * stl_orig
stl file for BoundaryElement model original value given at command line.
unsigned int temperature_given
Whether temperature was given.
unsigned int stl_given
Whether stl was given.
unsigned int help_given
Whether help was given.
char * xyz_arg
xyz file for AtomicBead model.
int elements_flag
output the hydrodynamic elements (beads or triangles) only, hydrodynamics calculation will not be per...
unsigned int input_given
Whether input was given.
char * model_orig
hydrodynamics model original value given at command line.
unsigned int version_given
Whether version was given.
char * viscosity_orig
viscosity (in poise) original value given at command line.
unsigned int viscosity_given
Whether viscosity was given.
const char * version_help
Print version and exit help description.
char * input_orig
input dump file original value given at command line.
char * stl_arg
stl file for BoundaryElement model.
const char * input_help
input dump file help description.
unsigned int model_given
Whether model was given.
char * msms_arg
filename root for MSMS .vert and .face files.
const char * msms_help
filename root for MSMS .vert and .face files help description.
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Save the contents of the option struct into an already open FILE stream.
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
The command line parser.
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
Save the contents of the option struct into a (text) file.
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
The command line parser (version with additional parameters - deprecated)
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Checks that all the required options were specified.
struct cmdline_parser_params * cmdline_parser_params_create(void)
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their defau...
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
The command line parser (version with additional parameters)
void cmdline_parser_init(struct gengetopt_args_info *args_info)
Initializes the passed gengetopt_args_info structure's fields (also set default values for options th...
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the struc...
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Initializes all the fields a cmdline_parser_params structure to their default values.