| 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 |
+ |
#define G_USE_UNDAMPED_WOLF 59 |
| 122 |
+ |
#define G_USE_DAMPED_WOLF 60 |
| 123 |
|
|
| 124 |
|
Globals::Globals(){ |
| 125 |
|
initalize(); |
| 194 |
|
command_table.insert(CommandMapType::value_type("thermIntDistSpringConst", G_THERM_INT_DIST_SPRING)); |
| 195 |
|
command_table.insert(CommandMapType::value_type("thermIntThetaSpringConst", G_THERM_INT_THETA_SPRING)); |
| 196 |
|
command_table.insert(CommandMapType::value_type("thermIntOmegaSpringConst", G_THERM_INT_OMEGA_SPRING)); |
| 197 |
< |
command_table.insert(CommandMapType::value_type("targetStress", G_SURFACETENSION)); |
| 198 |
< |
|
| 197 |
> |
command_table.insert(CommandMapType::value_type("surfaceTension", G_SURFACETENSION)); |
| 198 |
> |
command_table.insert(CommandMapType::value_type("printPressureTensor", G_PRINTPREESURETENSOR)); |
| 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 |
| 260 |
|
have_theta_spring_constant = 0; |
| 261 |
|
have_omega_spring_constant = 0; |
| 262 |
|
have_surface_tension = 0; |
| 263 |
+ |
have_print_pressure_tensor = 0; |
| 264 |
|
} |
| 265 |
|
|
| 266 |
|
int Globals::newComponent( event* the_event ){ |
| 1876 |
|
break; |
| 1877 |
|
} |
| 1878 |
|
break; |
| 1879 |
+ |
|
| 1880 |
+ |
case G_PRINTPREESURETENSOR: |
| 1881 |
+ |
if( the_type == STRING ){ |
| 1882 |
|
|
| 1883 |
+ |
if( !strcasecmp( "true", the_event->evt.asmt.rhs.sval )) { |
| 1884 |
+ |
have_print_pressure_tensor= 1; |
| 1885 |
+ |
print_pressure_tensor = 1; |
| 1886 |
+ |
} else if( !strcasecmp( "false", the_event->evt.asmt.rhs.sval )) { |
| 1887 |
+ |
have_print_pressure_tensor= 1; |
| 1888 |
+ |
print_pressure_tensor = 0; |
| 1889 |
+ |
} else{ |
| 1890 |
+ |
the_event->err_msg = |
| 1891 |
+ |
strdup( "Error in parsing meta-data file!\n\tprintPressureTensor was not \"true\" or \"false\".\n" ); |
| 1892 |
+ |
return 0; |
| 1893 |
+ |
} |
| 1894 |
+ |
return 1; |
| 1895 |
+ |
} |
| 1896 |
+ |
|
| 1897 |
+ |
the_event->err_msg = |
| 1898 |
+ |
strdup( "Error in parsing meta-data file!\n\tprintPressureTensor was not \"true\" or \"false\".\n" ); |
| 1899 |
+ |
return 0; |
| 1900 |
+ |
break; |
| 1901 |
|
|
| 1902 |
+ |
case G_USE_UNDAMPED_WOLF: |
| 1903 |
+ |
if( the_type == STRING ){ |
| 1904 |
+ |
|
| 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 |
|
} |