48 |
|
#define G_TAUBAROSTAT 27 |
49 |
|
#define G_ZCONSTIME 28 |
50 |
|
#define G_NZCONSTRAINTS 29 |
51 |
+ |
#define G_ZCONSTOL 30 |
52 |
|
|
52 |
– |
|
53 |
|
Globals::Globals(){ |
54 |
|
|
55 |
|
int i; |
90 |
|
addHash( "tauBarostat", G_TAUBAROSTAT); |
91 |
|
addHash( "zconsTime", G_ZCONSTIME); |
92 |
|
addHash( "nZconstraints", G_NZCONSTRAINTS); |
93 |
< |
|
93 |
> |
addHash( "zconsTol", G_ZCONSTOL); |
94 |
> |
|
95 |
|
// define some default values |
96 |
|
|
97 |
|
strcpy( mixingRule,"standard"); //default mixing rules to standard. |
125 |
|
have_q_mass = 0; |
126 |
|
have_tau_thermostat = 0; |
127 |
|
have_tau_barostat = 0; |
128 |
< |
have_zcon_time = 0; |
128 |
> |
have_zcons_time = 0; |
129 |
|
have_n_zConstraints = 0; |
130 |
|
have_zConstraints = 0; |
131 |
+ |
have_zcons_tol = 0; |
132 |
|
} |
133 |
|
|
134 |
|
Globals::~Globals(){ |
988 |
|
|
989 |
|
case DOUBLE: |
990 |
|
zcons_time = the_event->evt.asmt.rhs.dval; |
991 |
+ |
have_zcons_time = 1; |
992 |
|
return 1; |
993 |
|
break; |
994 |
|
|
995 |
|
case INT: |
996 |
|
zcons_time = (double)the_event->evt.asmt.rhs.ival; |
997 |
< |
have_zcon_time = 1; |
997 |
> |
have_zcons_time = 1; |
998 |
|
return 1; |
999 |
|
break; |
1000 |
|
|
1001 |
|
default: |
1002 |
|
the_event->err_msg = |
1003 |
|
strdup( "Global error. zcons_time unrecognized.\n" ); |
1004 |
+ |
return 0; |
1005 |
+ |
break; |
1006 |
+ |
} |
1007 |
+ |
break; |
1008 |
+ |
|
1009 |
+ |
case G_ZCONSTOL: |
1010 |
+ |
switch( the_type ){ |
1011 |
+ |
|
1012 |
+ |
case STRING: |
1013 |
+ |
the_event->err_msg = |
1014 |
+ |
strdup( "Global error. zcons_tol is not a double or int.\n" ); |
1015 |
|
return 0; |
1016 |
|
break; |
1017 |
+ |
|
1018 |
+ |
case DOUBLE: |
1019 |
+ |
zcons_tol = the_event->evt.asmt.rhs.dval; |
1020 |
+ |
have_zcons_tol = 1; |
1021 |
+ |
return 1; |
1022 |
+ |
break; |
1023 |
+ |
|
1024 |
+ |
case INT: |
1025 |
+ |
zcons_tol = (double)the_event->evt.asmt.rhs.ival; |
1026 |
+ |
have_zcons_tol = 1; |
1027 |
+ |
return 1; |
1028 |
+ |
break; |
1029 |
+ |
|
1030 |
+ |
default: |
1031 |
+ |
the_event->err_msg = |
1032 |
+ |
strdup( "Global error. zcons_ol unrecognized.\n" ); |
1033 |
+ |
return 0; |
1034 |
+ |
break; |
1035 |
|
} |
1036 |
|
break; |
1037 |
|
|