ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/io/Globals.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/io/Globals.cpp (file contents):
Revision 2279 by chrisfen, Tue Aug 30 18:23:50 2005 UTC vs.
Revision 2285 by gezelter, Wed Sep 7 20:46:46 2005 UTC

# Line 120 | Line 120
120   #define G_PRINTPREESURETENSOR   58
121   #define G_USE_UNDAMPED_WOLF 59
122   #define G_USE_DAMPED_WOLF   60
123 + #define G_CUTOFFPOLICY      61
124  
125   Globals::Globals(){
126    initalize();
# Line 198 | Line 199 | void Globals::initalize(){
199    command_table.insert(CommandMapType::value_type("printPressureTensor", G_PRINTPREESURETENSOR));
200    command_table.insert(CommandMapType::value_type("useUndampedWolf", G_USE_UNDAMPED_WOLF));
201    command_table.insert(CommandMapType::value_type("useDampedWolf", G_USE_DAMPED_WOLF));
202 +  command_table.insert(CommandMapType::value_type("cutoffPolicy", G_CUTOFFPOLICY));
203  
204    strcpy( mixingRule,"standard");  //default mixing rules to standard.
205    usePBC = 1; //default  periodic boundry conditions to on
# Line 261 | Line 263 | void Globals::initalize(){
263    have_omega_spring_constant = 0;
264    have_surface_tension = 0;
265    have_print_pressure_tensor = 0;
266 +  have_cutoff_policy = 0;
267   }
268  
269   int Globals::newComponent( event* the_event ){
# Line 1935 | Line 1938 | int Globals::globalAssign( event* the_event ){
1938        return 0;
1939        break;
1940        
1941 +    case G_CUTOFFPOLICY:
1942 +      switch( the_type ){
1943 +        
1944 +      case STRING:
1945 +        strcpy(cutoffPolicy, the_event->evt.asmt.rhs.sval);
1946 +
1947 +        for(int i = 0; cutoffPolicy[i] != '\0'; i++)
1948 +          {
1949 +            cutoffPolicy[i] = toupper(cutoffPolicy[i]);
1950 +          }
1951 +        have_cutoff_policy = 1;
1952 +        return 1;
1953 +        break;
1954 +        
1955 +      case DOUBLE:
1956 +        the_event->err_msg =
1957 +          strdup( "Error in parsing meta-data file!\n\tcutoffPolicy should be a string!\n" );
1958 +        return 0;
1959 +        break;
1960 +        
1961 +      case INT:
1962 +        the_event->err_msg =
1963 +          strdup( "Error in parsing meta-data file!\n\tcutoffPolicy should be a string!\n" );
1964 +        return 0;
1965 +        break;
1966 +        
1967 +      default:
1968 +        the_event->err_msg =
1969 +          strdup( "Error in parsing meta-data file!\n\tcutoffPolicy unrecognized.\n" );
1970 +        return 0;
1971 +        break;
1972 +      }
1973 +      break;
1974 +
1975        
1976        // add more token cases here.      
1977      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines