ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/sequentialProps/SequentialPropsCmd.cpp
(Generate patch)

Comparing trunk/src/applications/sequentialProps/SequentialPropsCmd.cpp (file contents):
Revision 2038 by gezelter, Tue Nov 4 15:31:51 2014 UTC vs.
Revision 2039 by gezelter, Thu Nov 6 14:31:32 2014 UTC

# Line 47 | Line 47 | const char *gengetopt_args_info_help[] = {
47    "  -z, --referenceZ=DOUBLE       Reference z-height of solid surface",
48    "  -r, --dropletR=DOUBLE         Droplet radius in angstroms",
49    "      --threshDens=DOUBLE       Threshold Density in g/cm^3",
50 +  "      --bufferLength=DOUBLE     Buffer length in angstroms",
51    "\n Group: sequentialProps\n   an option of this group is required",
52    "  -c, --com                     selection center of mass",
53    "      --ca1                     contact angle of selection (using center of \n                                  mass)",
# Line 89 | Line 90 | void clear_given (struct gengetopt_args_info *args_inf
90    args_info->referenceZ_given = 0 ;
91    args_info->dropletR_given = 0 ;
92    args_info->threshDens_given = 0 ;
93 +  args_info->bufferLength_given = 0 ;
94    args_info->com_given = 0 ;
95    args_info->ca1_given = 0 ;
96    args_info->ca2_given = 0 ;
# Line 114 | Line 116 | void clear_args (struct gengetopt_args_info *args_info
116    args_info->referenceZ_orig = NULL;
117    args_info->dropletR_orig = NULL;
118    args_info->threshDens_orig = NULL;
119 +  args_info->bufferLength_orig = NULL;
120    
121   }
122  
# Line 133 | Line 136 | void init_args_info(struct gengetopt_args_info *args_i
136    args_info->referenceZ_help = gengetopt_args_info_help[8] ;
137    args_info->dropletR_help = gengetopt_args_info_help[9] ;
138    args_info->threshDens_help = gengetopt_args_info_help[10] ;
139 <  args_info->com_help = gengetopt_args_info_help[12] ;
140 <  args_info->ca1_help = gengetopt_args_info_help[13] ;
141 <  args_info->ca2_help = gengetopt_args_info_help[14] ;
139 >  args_info->bufferLength_help = gengetopt_args_info_help[11] ;
140 >  args_info->com_help = gengetopt_args_info_help[13] ;
141 >  args_info->ca1_help = gengetopt_args_info_help[14] ;
142 >  args_info->ca2_help = gengetopt_args_info_help[15] ;
143    
144   }
145  
# Line 232 | Line 236 | cmdline_parser_release (struct gengetopt_args_info *ar
236    free_string_field (&(args_info->referenceZ_orig));
237    free_string_field (&(args_info->dropletR_orig));
238    free_string_field (&(args_info->threshDens_orig));
239 +  free_string_field (&(args_info->bufferLength_orig));
240    
241    
242    for (i = 0; i < args_info->inputs_num; ++i)
# Line 289 | Line 294 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
294      write_into_file(outfile, "dropletR", args_info->dropletR_orig, 0);
295    if (args_info->threshDens_given)
296      write_into_file(outfile, "threshDens", args_info->threshDens_orig, 0);
297 +  if (args_info->bufferLength_given)
298 +    write_into_file(outfile, "bufferLength", args_info->bufferLength_orig, 0);
299    if (args_info->com_given)
300      write_into_file(outfile, "com", 0, 0 );
301    if (args_info->ca1_given)
# Line 607 | Line 614 | cmdline_parser_internal (
614          { "referenceZ", 1, NULL, 'z' },
615          { "dropletR",   1, NULL, 'r' },
616          { "threshDens", 1, NULL, 0 },
617 +        { "bufferLength",       1, NULL, 0 },
618          { "com",        0, NULL, 'c' },
619          { "ca1",        0, NULL, 0 },
620          { "ca2",        0, NULL, 0 },
# Line 762 | Line 770 | cmdline_parser_internal (
770                goto failure;
771            
772            }
773 +          /* Buffer length in angstroms.  */
774 +          else if (strcmp (long_options[option_index].name, "bufferLength") == 0)
775 +          {
776 +          
777 +          
778 +            if (update_arg( (void *)&(args_info->bufferLength_arg),
779 +                 &(args_info->bufferLength_orig), &(args_info->bufferLength_given),
780 +                &(local_args_info.bufferLength_given), optarg, 0, 0, ARG_DOUBLE,
781 +                check_ambiguity, override, 0, 0,
782 +                "bufferLength", '-',
783 +                additional_error))
784 +              goto failure;
785 +          
786 +          }
787            /* contact angle of selection (using center of mass).  */
788            else if (strcmp (long_options[option_index].name, "ca1") == 0)
789            {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines