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

Comparing trunk/OOPSE-4/src/io/Globals.cpp (file contents):
Revision 2238 by tim, Sun May 22 21:05:15 2005 UTC vs.
Revision 2279 by chrisfen, Tue Aug 30 18:23:50 2005 UTC

# Line 118 | Line 118
118   #define G_THERM_INT_OMEGA_SPRING 56
119   #define G_SURFACETENSION 57
120   #define G_PRINTPREESURETENSOR   58
121 + #define G_USE_UNDAMPED_WOLF 59
122 + #define G_USE_DAMPED_WOLF   60
123  
124   Globals::Globals(){
125    initalize();
# Line 194 | Line 196 | void Globals::initalize(){
196    command_table.insert(CommandMapType::value_type("thermIntOmegaSpringConst", G_THERM_INT_OMEGA_SPRING));
197    command_table.insert(CommandMapType::value_type("surfaceTension", G_SURFACETENSION));
198    command_table.insert(CommandMapType::value_type("printPressureTensor", G_PRINTPREESURETENSOR));
199 <
199 >  command_table.insert(CommandMapType::value_type("useUndampedWolf", G_USE_UNDAMPED_WOLF));
200 >  command_table.insert(CommandMapType::value_type("useDampedWolf", G_USE_DAMPED_WOLF));
201  
202    strcpy( mixingRule,"standard");  //default mixing rules to standard.
203    usePBC = 1; //default  periodic boundry conditions to on
# Line 1896 | Line 1899 | int Globals::globalAssign( event* the_event ){
1899            return 0;
1900            break;
1901  
1902 +    case G_USE_UNDAMPED_WOLF:
1903 +      if( the_type == STRING ){
1904          
1905 <
1905 >        if( !strcasecmp( "true", the_event->evt.asmt.rhs.sval )) useUndampedWolf = 1;
1906 >        else if( !strcasecmp( "false", the_event->evt.asmt.rhs.sval )) useUndampedWolf = 0;
1907 >        else{
1908 >          the_event->err_msg =
1909 >          strdup( "Error in parsing meta-data file!\n\tuseUndampedWolf was not \"true\" or \"false\".\n" );
1910 >          return 0;
1911 >        }
1912 >        return 1;
1913 >      }
1914        
1915 +      the_event->err_msg =
1916 +      strdup( "Error in parsing meta-data file!\n\tuseUndampedWolf was not \"true\" or \"false\".\n" );
1917 +      return 0;
1918 +      break;
1919 +      
1920 +    case G_USE_DAMPED_WOLF:
1921 +      if( the_type == STRING ){
1922 +        
1923 +        if( !strcasecmp( "true", the_event->evt.asmt.rhs.sval )) useDampedWolf = 1;
1924 +        else if( !strcasecmp( "false", the_event->evt.asmt.rhs.sval )) useDampedWolf = 0;
1925 +        else{
1926 +          the_event->err_msg =
1927 +          strdup( "Error in parsing meta-data file!\n\tuseDampedWolf was not \"true\" or \"false\".\n" );
1928 +          return 0;
1929 +        }
1930 +        return 1;
1931 +      }
1932 +      
1933 +      the_event->err_msg =
1934 +      strdup( "Error in parsing meta-data file!\n\tuseDampedWolf was not \"true\" or \"false\".\n" );
1935 +      return 0;
1936 +      break;
1937 +      
1938 +      
1939        // add more token cases here.      
1940      }
1941    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines