| 116 |
|
#define G_THERM_INT_DIST_SPRING 54 |
| 117 |
|
#define G_THERM_INT_THETA_SPRING 55 |
| 118 |
|
#define G_THERM_INT_OMEGA_SPRING 56 |
| 119 |
< |
#define G_TARGETSTRESS 57 |
| 119 |
> |
#define G_SURFACETENSION 57 |
| 120 |
> |
#define G_PRINTPREESURETENSOR 58 |
| 121 |
|
|
| 122 |
|
Globals::Globals(){ |
| 123 |
|
initalize(); |
| 192 |
|
command_table.insert(CommandMapType::value_type("thermIntDistSpringConst", G_THERM_INT_DIST_SPRING)); |
| 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("targetStress", G_TARGETSTRESS)); |
| 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. |
| 256 |
|
have_dist_spring_constant = 0; |
| 257 |
|
have_theta_spring_constant = 0; |
| 258 |
|
have_omega_spring_constant = 0; |
| 259 |
< |
have_targetstress = 0; |
| 259 |
> |
have_surface_tension = 0; |
| 260 |
> |
have_print_pressure_tensor = 0; |
| 261 |
|
} |
| 262 |
|
|
| 263 |
|
int Globals::newComponent( event* the_event ){ |
| 1845 |
|
} |
| 1846 |
|
break; |
| 1847 |
|
|
| 1848 |
< |
case G_TARGETSTRESS: |
| 1848 |
> |
case G_SURFACETENSION: |
| 1849 |
|
switch( the_type ){ |
| 1850 |
|
|
| 1851 |
|
case STRING: |
| 1852 |
|
the_event->err_msg = |
| 1853 |
< |
strdup( "Error in parsing meta-data file!\n\ttargetStress is not a double or int.\n" ); |
| 1853 |
> |
strdup( "Error in parsing meta-data file!\n\tsurfaceTension is not a double or int.\n" ); |
| 1854 |
|
return 1; |
| 1855 |
|
break; |
| 1856 |
|
|
| 1857 |
|
case DOUBLE: |
| 1858 |
< |
target_stress= the_event->evt.asmt.rhs.dval; |
| 1859 |
< |
have_targetstress = 1; |
| 1858 |
> |
surface_tension= the_event->evt.asmt.rhs.dval; |
| 1859 |
> |
have_surface_tension = 1; |
| 1860 |
|
return 1; |
| 1861 |
|
break; |
| 1862 |
|
|
| 1863 |
|
case INT: |
| 1864 |
< |
target_stress = (double)the_event->evt.asmt.rhs.dval; |
| 1865 |
< |
have_targetstress = 1; |
| 1864 |
> |
surface_tension = (double)the_event->evt.asmt.rhs.dval; |
| 1865 |
> |
have_surface_tension = 1; |
| 1866 |
|
return 1; |
| 1867 |
|
break; |
| 1868 |
|
|
| 1869 |
|
default: |
| 1870 |
|
the_event->err_msg = |
| 1871 |
< |
strdup( "Error in parsing meta-data file!\n\tttargetStress unrecognized.\n" ); |
| 1871 |
> |
strdup( "Error in parsing meta-data file!\n\tsurfaceTension unrecognized.\n" ); |
| 1872 |
|
return 0; |
| 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 |
|
|
| 1902 |
|
// add more token cases here. |
| 1903 |
|
} |