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 2236 by tim, Fri May 20 16:01:38 2005 UTC vs.
Revision 2238 by tim, Sun May 22 21:05:15 2005 UTC

# Line 117 | Line 117
117   #define G_THERM_INT_THETA_SPRING 55
118   #define G_THERM_INT_OMEGA_SPRING 56
119   #define G_SURFACETENSION 57
120 + #define G_PRINTPREESURETENSOR   58
121  
122   Globals::Globals(){
123    initalize();
# Line 192 | Line 193 | void Globals::initalize(){
193    command_table.insert(CommandMapType::value_type("thermIntThetaSpringConst", G_THERM_INT_THETA_SPRING));
194    command_table.insert(CommandMapType::value_type("thermIntOmegaSpringConst", G_THERM_INT_OMEGA_SPRING));
195    command_table.insert(CommandMapType::value_type("surfaceTension", G_SURFACETENSION));
196 +  command_table.insert(CommandMapType::value_type("printPressureTensor", G_PRINTPREESURETENSOR));
197  
198  
199    strcpy( mixingRule,"standard");  //default mixing rules to standard.
# Line 255 | Line 257 | void Globals::initalize(){
257    have_theta_spring_constant = 0;
258    have_omega_spring_constant = 0;
259    have_surface_tension = 0;
260 +  have_print_pressure_tensor = 0;
261   }
262  
263   int Globals::newComponent( event* the_event ){
# Line 1870 | Line 1873 | int Globals::globalAssign( event* the_event ){
1873            break;
1874          }
1875          break;
1876 +
1877 +    case G_PRINTPREESURETENSOR:
1878 +          if( the_type == STRING ){
1879 +        
1880 +        if( !strcasecmp( "true", the_event->evt.asmt.rhs.sval )) {
1881 +            have_print_pressure_tensor= 1;
1882 +            print_pressure_tensor = 1;
1883 +        } else if( !strcasecmp( "false", the_event->evt.asmt.rhs.sval )) {
1884 +            have_print_pressure_tensor= 1;
1885 +            print_pressure_tensor = 0;
1886 +        } else{
1887 +          the_event->err_msg =
1888 +            strdup( "Error in parsing meta-data file!\n\tprintPressureTensor was not \"true\" or \"false\".\n" );
1889 +          return 0;
1890 +        }
1891 +        return 1;
1892 +          }
1893 +          
1894 +          the_event->err_msg =
1895 +        strdup( "Error in parsing meta-data file!\n\tprintPressureTensor was not \"true\" or \"false\".\n" );
1896 +          return 0;
1897 +          break;
1898 +
1899          
1900  
1901        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines