21 |
|
#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ |
22 |
|
#endif |
23 |
|
|
24 |
+ |
#ifdef WIN32 |
25 |
+ |
#include "utils/wingetopt.h" |
26 |
+ |
#else |
27 |
|
#include <getopt.h> |
28 |
+ |
#endif |
29 |
|
|
30 |
|
#include "DynamicPropsCmd.h" |
31 |
|
|
60 |
|
" --helfandEcorr Helfand moment for thermal conductvity", |
61 |
|
" -p, --momentum Helfand momentum for viscosity", |
62 |
|
" --stresscorr Stress tensor correlation function", |
63 |
+ |
" -b, --bondcorr Bond extension correlation function", |
64 |
+ |
" -f, --freqfluccorr Frequency Fluctuation correlation function", |
65 |
|
0 |
66 |
|
}; |
67 |
|
|
111 |
|
args_info->helfandEcorr_given = 0 ; |
112 |
|
args_info->momentum_given = 0 ; |
113 |
|
args_info->stresscorr_given = 0 ; |
114 |
+ |
args_info->bondcorr_given = 0 ; |
115 |
+ |
args_info->freqfluccorr_given = 0 ; |
116 |
|
args_info->dynamicProps_group_counter = 0 ; |
117 |
|
} |
118 |
|
|
164 |
|
args_info->helfandEcorr_help = gengetopt_args_info_help[21] ; |
165 |
|
args_info->momentum_help = gengetopt_args_info_help[22] ; |
166 |
|
args_info->stresscorr_help = gengetopt_args_info_help[23] ; |
167 |
+ |
args_info->bondcorr_help = gengetopt_args_info_help[24] ; |
168 |
+ |
args_info->freqfluccorr_help = gengetopt_args_info_help[25] ; |
169 |
|
|
170 |
|
} |
171 |
|
|
342 |
|
write_into_file(outfile, "momentum", 0, 0 ); |
343 |
|
if (args_info->stresscorr_given) |
344 |
|
write_into_file(outfile, "stresscorr", 0, 0 ); |
345 |
+ |
if (args_info->bondcorr_given) |
346 |
+ |
write_into_file(outfile, "bondcorr", 0, 0 ); |
347 |
+ |
if (args_info->freqfluccorr_given) |
348 |
+ |
write_into_file(outfile, "freqfluccorr", 0, 0 ); |
349 |
|
|
350 |
|
|
351 |
|
i = EXIT_SUCCESS; |
413 |
|
args_info->helfandEcorr_given = 0 ; |
414 |
|
args_info->momentum_given = 0 ; |
415 |
|
args_info->stresscorr_given = 0 ; |
416 |
+ |
args_info->bondcorr_given = 0 ; |
417 |
+ |
args_info->freqfluccorr_given = 0 ; |
418 |
|
|
419 |
|
args_info->dynamicProps_group_counter = 0; |
420 |
|
} |
679 |
|
{ "helfandEcorr", 0, NULL, 0 }, |
680 |
|
{ "momentum", 0, NULL, 'p' }, |
681 |
|
{ "stresscorr", 0, NULL, 0 }, |
682 |
+ |
{ "bondcorr", 0, NULL, 'b' }, |
683 |
+ |
{ "freqfluccorr", 0, NULL, 'f' }, |
684 |
|
{ 0, 0, 0, 0 } |
685 |
|
}; |
686 |
|
|
687 |
< |
c = getopt_long (argc, argv, "hVi:o:z:m:srvdlMp", long_options, &option_index); |
687 |
> |
c = getopt_long (argc, argv, "hVi:o:z:m:srvdlMpbf", long_options, &option_index); |
688 |
|
|
689 |
|
if (c == -1) break; /* Exit from `while (1)' loop. */ |
690 |
|
|
849 |
|
&(local_args_info.momentum_given), optarg, 0, 0, ARG_NO, |
850 |
|
check_ambiguity, override, 0, 0, |
851 |
|
"momentum", 'p', |
852 |
+ |
additional_error)) |
853 |
+ |
goto failure; |
854 |
+ |
|
855 |
+ |
break; |
856 |
+ |
case 'b': /* Bond extension correlation function. */ |
857 |
+ |
|
858 |
+ |
if (args_info->dynamicProps_group_counter && override) |
859 |
+ |
reset_group_dynamicProps (args_info); |
860 |
+ |
args_info->dynamicProps_group_counter += 1; |
861 |
+ |
|
862 |
+ |
if (update_arg( 0 , |
863 |
+ |
0 , &(args_info->bondcorr_given), |
864 |
+ |
&(local_args_info.bondcorr_given), optarg, 0, 0, ARG_NO, |
865 |
+ |
check_ambiguity, override, 0, 0, |
866 |
+ |
"bondcorr", 'b', |
867 |
|
additional_error)) |
868 |
|
goto failure; |
869 |
|
|
870 |
|
break; |
871 |
+ |
case 'f': /* Frequency Fluctuation correlation function. */ |
872 |
+ |
|
873 |
+ |
if (args_info->dynamicProps_group_counter && override) |
874 |
+ |
reset_group_dynamicProps (args_info); |
875 |
+ |
args_info->dynamicProps_group_counter += 1; |
876 |
+ |
|
877 |
+ |
if (update_arg( 0 , |
878 |
+ |
0 , &(args_info->freqfluccorr_given), |
879 |
+ |
&(local_args_info.freqfluccorr_given), optarg, 0, 0, ARG_NO, |
880 |
+ |
check_ambiguity, override, 0, 0, |
881 |
+ |
"freqfluccorr", 'f', |
882 |
+ |
additional_error)) |
883 |
+ |
goto failure; |
884 |
+ |
|
885 |
+ |
break; |
886 |
|
|
887 |
|
case 0: /* Long option with no short option */ |
888 |
|
/* select first stuntdouble set. */ |