ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/dynamicProps/DynamicPropsCmd.c
(Generate patch)

Comparing trunk/src/applications/dynamicProps/DynamicPropsCmd.c (file contents):
Revision 1596 by gezelter, Mon Jul 25 17:30:53 2011 UTC vs.
Revision 1615 by gezelter, Fri Aug 26 17:55:44 2011 UTC

# Line 45 | Line 45 | const char *gengetopt_args_info_help[] = {
45    "  -v, --vcorr                   velocity correlation function",
46    "  -d, --dcorr                   dipole correlation function",
47    "  -l, --lcorr                   Lengendre correlation function",
48 +  "  -s, --sdcorr                  System dipole correlation function",
49    "      --r_rcorr                 Radial rmsd",
50    "      --thetacorr               Angular rmsd",
51    "      --drcorr                  Directional rmsd for particles with unit \n                                  vectors",
52    "      --helfandEcorr            Helfand moment for thermal conductvity",
53 +  "  -p, --momentum                Helfand momentum for viscosity",
54    "      --stresscorr              Stress tensor correlation function",
55      0
56   };
# Line 88 | Line 90 | void clear_given (struct gengetopt_args_info *args_inf
90    args_info->vcorr_given = 0 ;
91    args_info->dcorr_given = 0 ;
92    args_info->lcorr_given = 0 ;
93 +  args_info->sdcorr_given = 0 ;
94    args_info->r_rcorr_given = 0 ;
95    args_info->thetacorr_given = 0 ;
96    args_info->drcorr_given = 0 ;
97    args_info->helfandEcorr_given = 0 ;
98 +  args_info->momentum_given = 0 ;
99    args_info->stresscorr_given = 0 ;
100    args_info->dynamicProps_group_counter = 0 ;
101   }
# Line 131 | Line 135 | void init_args_info(struct gengetopt_args_info *args_i
135    args_info->vcorr_help = gengetopt_args_info_help[10] ;
136    args_info->dcorr_help = gengetopt_args_info_help[11] ;
137    args_info->lcorr_help = gengetopt_args_info_help[12] ;
138 <  args_info->r_rcorr_help = gengetopt_args_info_help[13] ;
139 <  args_info->thetacorr_help = gengetopt_args_info_help[14] ;
140 <  args_info->drcorr_help = gengetopt_args_info_help[15] ;
141 <  args_info->helfandEcorr_help = gengetopt_args_info_help[16] ;
142 <  args_info->stresscorr_help = gengetopt_args_info_help[17] ;
138 >  args_info->sdcorr_help = gengetopt_args_info_help[13] ;
139 >  args_info->r_rcorr_help = gengetopt_args_info_help[14] ;
140 >  args_info->thetacorr_help = gengetopt_args_info_help[15] ;
141 >  args_info->drcorr_help = gengetopt_args_info_help[16] ;
142 >  args_info->helfandEcorr_help = gengetopt_args_info_help[17] ;
143 >  args_info->momentum_help = gengetopt_args_info_help[18] ;
144 >  args_info->stresscorr_help = gengetopt_args_info_help[19] ;
145    
146   }
147  
# Line 289 | Line 295 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
295      write_into_file(outfile, "dcorr", 0, 0 );
296    if (args_info->lcorr_given)
297      write_into_file(outfile, "lcorr", 0, 0 );
298 +  if (args_info->sdcorr_given)
299 +    write_into_file(outfile, "sdcorr", 0, 0 );
300    if (args_info->r_rcorr_given)
301      write_into_file(outfile, "r_rcorr", 0, 0 );
302    if (args_info->thetacorr_given)
# Line 297 | Line 305 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
305      write_into_file(outfile, "drcorr", 0, 0 );
306    if (args_info->helfandEcorr_given)
307      write_into_file(outfile, "helfandEcorr", 0, 0 );
308 +  if (args_info->momentum_given)
309 +    write_into_file(outfile, "momentum", 0, 0 );
310    if (args_info->stresscorr_given)
311      write_into_file(outfile, "stresscorr", 0, 0 );
312    
# Line 356 | Line 366 | reset_group_dynamicProps(struct gengetopt_args_info *a
366    args_info->vcorr_given = 0 ;
367    args_info->dcorr_given = 0 ;
368    args_info->lcorr_given = 0 ;
369 +  args_info->sdcorr_given = 0 ;
370    args_info->r_rcorr_given = 0 ;
371    args_info->thetacorr_given = 0 ;
372    args_info->drcorr_given = 0 ;
373    args_info->helfandEcorr_given = 0 ;
374 +  args_info->momentum_given = 0 ;
375    args_info->stresscorr_given = 0 ;
376  
377    args_info->dynamicProps_group_counter = 0;
# Line 614 | Line 626 | cmdline_parser_internal (
626          { "vcorr",      0, NULL, 'v' },
627          { "dcorr",      0, NULL, 'd' },
628          { "lcorr",      0, NULL, 'l' },
629 +        { "sdcorr",     0, NULL, 's' },
630          { "r_rcorr",    0, NULL, 0 },
631          { "thetacorr",  0, NULL, 0 },
632          { "drcorr",     0, NULL, 0 },
633          { "helfandEcorr",       0, NULL, 0 },
634 +        { "momentum",   0, NULL, 'p' },
635          { "stresscorr", 0, NULL, 0 },
636          { 0,  0, 0, 0 }
637        };
638  
639 <      c = getopt_long (argc, argv, "hVi:o:m:rvdl", long_options, &option_index);
639 >      c = getopt_long (argc, argv, "hVi:o:m:rvdlsp", long_options, &option_index);
640  
641        if (c == -1) break;       /* Exit from `while (1)' loop.  */
642  
# Line 730 | Line 744 | cmdline_parser_internal (
744                &(local_args_info.lcorr_given), optarg, 0, 0, ARG_NO,
745                check_ambiguity, override, 0, 0,
746                "lcorr", 'l',
747 +              additional_error))
748 +            goto failure;
749 +        
750 +          break;
751 +        case 's':       /* System dipole correlation function.  */
752 +        
753 +          if (args_info->dynamicProps_group_counter && override)
754 +            reset_group_dynamicProps (args_info);
755 +          args_info->dynamicProps_group_counter += 1;
756 +        
757 +          if (update_arg( 0 ,
758 +               0 , &(args_info->sdcorr_given),
759 +              &(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO,
760 +              check_ambiguity, override, 0, 0,
761 +              "sdcorr", 's',
762                additional_error))
763              goto failure;
764          
765            break;
766 +        case 'p':       /* Helfand momentum for viscosity.  */
767 +        
768 +          if (args_info->dynamicProps_group_counter && override)
769 +            reset_group_dynamicProps (args_info);
770 +          args_info->dynamicProps_group_counter += 1;
771 +        
772 +          if (update_arg( 0 ,
773 +               0 , &(args_info->momentum_given),
774 +              &(local_args_info.momentum_given), optarg, 0, 0, ARG_NO,
775 +              check_ambiguity, override, 0, 0,
776 +              "momentum", 'p',
777 +              additional_error))
778 +            goto failure;
779 +        
780 +          break;
781  
782          case 0: /* Long option with no short option */
783            /* select first stuntdouble set.  */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines