| 51 | 
  | 
 | 
| 52 | 
  | 
/* | 
| 53 | 
  | 
 * The following section lists all of the defined tokens for the | 
| 54 | 
< | 
 * gloabal assignment statements. All are prefixed with a G_ to avoid | 
| 54 | 
> | 
 * global assignment statements. All are prefixed with a G_ to avoid | 
| 55 | 
  | 
 * stepping on any previously defined enumerations.  | 
| 56 | 
  | 
 * | 
| 57 | 
  | 
 * NOTE: tokens start at 1, 0 is a resrved token number | 
| 113 | 
  | 
#define G_THERM_INT_K       51 | 
| 114 | 
  | 
#define G_FORCEFIELD_VARIANT 52 | 
| 115 | 
  | 
#define G_FORCEFIELD_FILENAME 53 | 
| 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 | 
+ | 
 | 
| 120 | 
  | 
Globals::Globals(){ | 
| 121 | 
  | 
  initalize(); | 
| 122 | 
  | 
} | 
| 123 | 
  | 
 | 
| 124 | 
  | 
Globals::~Globals(){ | 
| 125 | 
  | 
  int i; | 
| 122 | 
– | 
 | 
| 123 | 
– | 
  for( i=0; i<hash_size; i++ ){ | 
| 124 | 
– | 
    if( command_table[i] != NULL ) delete command_table[i]; | 
| 125 | 
– | 
  } | 
| 126 | 
– | 
  delete[] command_table; | 
| 127 | 
– | 
 | 
| 126 | 
  | 
  if( components != NULL ){ | 
| 127 | 
  | 
    for( i=0; i<n_components; i++ ) delete components[i]; | 
| 128 | 
  | 
    delete[] components; | 
| 132 | 
  | 
void Globals::initalize(){ | 
| 133 | 
  | 
  int i; | 
| 134 | 
  | 
   | 
| 137 | 
– | 
  hash_size = 23; | 
| 138 | 
– | 
  hash_shift = 4; | 
| 139 | 
– | 
   | 
| 135 | 
  | 
  components = NULL; | 
| 136 | 
  | 
   | 
| 137 | 
< | 
  command_table = new LinkedCommand*[hash_size]; | 
| 138 | 
< | 
  for( i=0; i<hash_size; i++ ) command_table[i] = NULL; | 
| 139 | 
< | 
   | 
| 140 | 
< | 
  addHash( "forceField",    G_FORCEFIELD ); | 
| 141 | 
< | 
  addHash( "nComponents",   G_NCOMPONENTS ); | 
| 142 | 
< | 
  addHash( "targetTemp",    G_TARGETTEMP ); | 
| 143 | 
< | 
  addHash( "ensemble",      G_ENSEMBLE ); | 
| 144 | 
< | 
   | 
| 145 | 
< | 
  addHash( "dt",            G_DT ); | 
| 146 | 
< | 
  addHash( "runTime",       G_RUNTIME ); | 
| 147 | 
< | 
   | 
| 148 | 
< | 
  addHash( "initialConfig", G_INITIALCONFIG ); | 
| 149 | 
< | 
  addHash( "finalConfig",   G_FINALCONFIG ); | 
| 150 | 
< | 
  addHash( "nMol",          G_NMOL ); | 
| 151 | 
< | 
  addHash( "density",       G_DENSITY ); | 
| 152 | 
< | 
  addHash( "box",           G_BOX ); | 
| 153 | 
< | 
  addHash( "boxX",          G_BOXX ); | 
| 154 | 
< | 
  addHash( "boxY",          G_BOXY ); | 
| 155 | 
< | 
  addHash( "boxZ",          G_BOXZ ); | 
| 156 | 
< | 
  addHash( "sampleTime",    G_SAMPLETIME ); | 
| 157 | 
< | 
  addHash( "resetTime",     G_RESETTIME ); | 
| 158 | 
< | 
  addHash( "statusTime",    G_STATUSTIME ); | 
| 159 | 
< | 
  addHash( "cutoffRadius",  G_RCUT ); | 
| 160 | 
< | 
  addHash( "switchingRadius",  G_RSW ); | 
| 161 | 
< | 
  addHash( "dielectric",    G_DIELECTRIC ); | 
| 162 | 
< | 
  addHash( "tempSet",       G_TEMPSET ); | 
| 163 | 
< | 
  addHash( "thermalTime",   G_THERMALTIME ); | 
| 164 | 
< | 
  addHash( "mixingRule",    G_MIXINGRULE); | 
| 165 | 
< | 
  addHash( "usePeriodicBoundaryConditions",        G_USEPBC); | 
| 166 | 
< | 
  addHash( "useReactionField",                     G_USERF ); | 
| 167 | 
< | 
  addHash( "targetPressure",                       G_TARGETPRESSURE); | 
| 168 | 
< | 
  addHash( "tauThermostat",                        G_TAUTHERMOSTAT); | 
| 169 | 
< | 
  addHash( "tauBarostat",                          G_TAUBAROSTAT); | 
| 170 | 
< | 
  addHash( "zconsTime",                            G_ZCONSTIME); | 
| 171 | 
< | 
  addHash( "nZconstraints",                        G_NZCONSTRAINTS); | 
| 172 | 
< | 
  addHash( "zconsTol",                             G_ZCONSTOL); | 
| 173 | 
< | 
  addHash( "zconsForcePolicy",                     G_ZCONSFORCEPOLICY); | 
| 174 | 
< | 
  addHash( "seed",                                 G_SEED); | 
| 175 | 
< | 
  addHash( "useInitialTime",                       G_USEINITTIME); | 
| 176 | 
< | 
  addHash( "useInitialExtendedSystemState",        G_USEINIT_XS_STATE); | 
| 177 | 
< | 
  addHash( "orthoBoxTolerance",                    G_ORTHOBOXTOLERANCE); | 
| 178 | 
< | 
  addHash( "minimizer",                            G_MINIMIZER); | 
| 179 | 
< | 
  addHash( "minimizerMaxIter",                     G_MIN_MAXITER); | 
| 180 | 
< | 
  addHash( "minimizerWriteFrq",                    G_MIN_WRITEFRQ); | 
| 181 | 
< | 
  addHash( "minimizerStepSize",                    G_MIN_STEPSIZE); | 
| 182 | 
< | 
  addHash( "minimizerFTol",                        G_MIN_FTOL); | 
| 183 | 
< | 
  addHash( "minimizerGTol",                        G_MIN_GTOL); | 
| 184 | 
< | 
  addHash( "minimizerLSTol",                       G_MIN_LSTOL); | 
| 185 | 
< | 
  addHash( "minimizerLSMaxIter",                   G_MIN_LSMAXITER); | 
| 186 | 
< | 
  addHash( "zconsGap",                             G_ZCONSGAP); | 
| 187 | 
< | 
  addHash( "zconsFixtime",                         G_ZCONSFIXTIME); | 
| 188 | 
< | 
  addHash( "zconsUsingSMD",                        G_ZCONSUSINGSMD); | 
| 189 | 
< | 
  addHash( "useSolidThermInt",                     G_USE_SOLID_THERM_INT); | 
| 190 | 
< | 
  addHash( "useLiquidThermInt",                    G_USE_LIQUID_THERM_INT); | 
| 191 | 
< | 
  addHash( "thermodynamicIntegrationLambda",       G_THERM_INT_LAMBDA); | 
| 192 | 
< | 
  addHash( "thermodynamicIntegrationK",            G_THERM_INT_K); | 
| 193 | 
< | 
  addHash( "forceFieldVariant",                    G_FORCEFIELD_VARIANT); | 
| 194 | 
< | 
  addHash( "forceFieldFileName",                    G_FORCEFIELD_FILENAME); | 
| 200 | 
< | 
   | 
| 137 | 
> | 
  command_table.insert(CommandMapType::value_type("forceField", G_FORCEFIELD)); | 
| 138 | 
> | 
  command_table.insert(CommandMapType::value_type("nComponents", G_NCOMPONENTS)); | 
| 139 | 
> | 
  command_table.insert(CommandMapType::value_type("targetTemp", G_TARGETTEMP)); | 
| 140 | 
> | 
  command_table.insert(CommandMapType::value_type("ensemble", G_ENSEMBLE)); | 
| 141 | 
> | 
  command_table.insert(CommandMapType::value_type("dt", G_DT)); | 
| 142 | 
> | 
  command_table.insert(CommandMapType::value_type("runTime", G_RUNTIME)); | 
| 143 | 
> | 
  command_table.insert(CommandMapType::value_type("initialConfig", G_INITIALCONFIG)); | 
| 144 | 
> | 
  command_table.insert(CommandMapType::value_type("finalConfig", G_FINALCONFIG)); | 
| 145 | 
> | 
  command_table.insert(CommandMapType::value_type("nMol", G_NMOL)); | 
| 146 | 
> | 
  command_table.insert(CommandMapType::value_type("density", G_DENSITY)); | 
| 147 | 
> | 
  command_table.insert(CommandMapType::value_type("box", G_BOX)); | 
| 148 | 
> | 
  command_table.insert(CommandMapType::value_type("boxX", G_BOXX)); | 
| 149 | 
> | 
  command_table.insert(CommandMapType::value_type("boxY", G_BOXY)); | 
| 150 | 
> | 
  command_table.insert(CommandMapType::value_type("boxZ", G_BOXZ)); | 
| 151 | 
> | 
  command_table.insert(CommandMapType::value_type("sampleTime", G_SAMPLETIME)); | 
| 152 | 
> | 
  command_table.insert(CommandMapType::value_type("resetTime", G_RESETTIME)); | 
| 153 | 
> | 
  command_table.insert(CommandMapType::value_type("statusTime", G_STATUSTIME)); | 
| 154 | 
> | 
  command_table.insert(CommandMapType::value_type("cutoffRadius", G_RCUT)); | 
| 155 | 
> | 
  command_table.insert(CommandMapType::value_type("switchingRadius", G_RSW)); | 
| 156 | 
> | 
  command_table.insert(CommandMapType::value_type("dielectric", G_DIELECTRIC)); | 
| 157 | 
> | 
  command_table.insert(CommandMapType::value_type("tempSet", G_TEMPSET)); | 
| 158 | 
> | 
  command_table.insert(CommandMapType::value_type("thermalTime", G_THERMALTIME)); | 
| 159 | 
> | 
  command_table.insert(CommandMapType::value_type("mixingRule", G_MIXINGRULE)); | 
| 160 | 
> | 
  command_table.insert(CommandMapType::value_type("usePeriodicBoundaryConditions", G_USEPBC)); | 
| 161 | 
> | 
  command_table.insert(CommandMapType::value_type("useReactionField", G_USERF)); | 
| 162 | 
> | 
  command_table.insert(CommandMapType::value_type("targetPressure", G_TARGETPRESSURE)); | 
| 163 | 
> | 
  command_table.insert(CommandMapType::value_type("tauThermostat", G_TAUTHERMOSTAT)); | 
| 164 | 
> | 
  command_table.insert(CommandMapType::value_type("tauBarostat", G_TAUBAROSTAT)); | 
| 165 | 
> | 
  command_table.insert(CommandMapType::value_type("zconsTime", G_ZCONSTIME)); | 
| 166 | 
> | 
  command_table.insert(CommandMapType::value_type("nZconstraints", G_NZCONSTRAINTS)); | 
| 167 | 
> | 
  command_table.insert(CommandMapType::value_type("zconsTol", G_ZCONSTOL)); | 
| 168 | 
> | 
  command_table.insert(CommandMapType::value_type("zconsForcePolicy", G_ZCONSFORCEPOLICY)); | 
| 169 | 
> | 
  command_table.insert(CommandMapType::value_type("seed", G_SEED)); | 
| 170 | 
> | 
  command_table.insert(CommandMapType::value_type("useInitialTime", G_USEINITTIME)); | 
| 171 | 
> | 
  command_table.insert(CommandMapType::value_type("useInitialExtendedSystemState", G_USEINIT_XS_STATE)); | 
| 172 | 
> | 
  command_table.insert(CommandMapType::value_type("orthoBoxTolerance", G_ORTHOBOXTOLERANCE)); | 
| 173 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizer", G_MINIMIZER)); | 
| 174 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizerMaxIter", G_MIN_MAXITER)); | 
| 175 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizerWriteFrq", G_MIN_WRITEFRQ)); | 
| 176 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizerStepSize", G_MIN_STEPSIZE)); | 
| 177 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizerFTol", G_MIN_FTOL)); | 
| 178 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizerGTol", G_MIN_GTOL)); | 
| 179 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizerLSTol", G_MIN_LSTOL)); | 
| 180 | 
> | 
  command_table.insert(CommandMapType::value_type("minimizerLSMaxIter", G_MIN_LSMAXITER)); | 
| 181 | 
> | 
  command_table.insert(CommandMapType::value_type("zconsGap", G_ZCONSGAP)); | 
| 182 | 
> | 
  command_table.insert(CommandMapType::value_type("zconsFixtime", G_ZCONSFIXTIME)); | 
| 183 | 
> | 
  command_table.insert(CommandMapType::value_type("zconsUsingSMD", G_ZCONSUSINGSMD)); | 
| 184 | 
> | 
  command_table.insert(CommandMapType::value_type("useSolidThermInt", G_USE_SOLID_THERM_INT)); | 
| 185 | 
> | 
  command_table.insert(CommandMapType::value_type("useLiquidThermInt", G_USE_LIQUID_THERM_INT)); | 
| 186 | 
> | 
  command_table.insert(CommandMapType::value_type("thermodynamicIntegrationLambda", G_THERM_INT_LAMBDA)); | 
| 187 | 
> | 
  command_table.insert(CommandMapType::value_type("thermodynamicIntegrationK", G_THERM_INT_K)); | 
| 188 | 
> | 
  command_table.insert(CommandMapType::value_type("forceFieldVariant", G_FORCEFIELD_VARIANT)); | 
| 189 | 
> | 
  command_table.insert(CommandMapType::value_type("forceFieldFileName", G_FORCEFIELD_FILENAME)); | 
| 190 | 
> | 
  command_table.insert(CommandMapType::value_type("thermIntDistSpringConst", G_THERM_INT_DIST_SPRING)); | 
| 191 | 
> | 
  command_table.insert(CommandMapType::value_type("thermIntThetaSpringConst", G_THERM_INT_THETA_SPRING)); | 
| 192 | 
> | 
  command_table.insert(CommandMapType::value_type("thermIntOmegaSpringConst", G_THERM_INT_OMEGA_SPRING)); | 
| 193 | 
> | 
 | 
| 194 | 
> | 
 | 
| 195 | 
  | 
  strcpy( mixingRule,"standard");  //default mixing rules to standard. | 
| 196 | 
  | 
  usePBC = 1; //default  periodic boundry conditions to on | 
| 197 | 
  | 
  useRF  = 0; | 
| 249 | 
  | 
  have_thermodynamic_integration_k = 0; | 
| 250 | 
  | 
  have_forcefield_variant = 0; | 
| 251 | 
  | 
  have_forcefield_filename = 0;  | 
| 252 | 
< | 
 | 
| 252 | 
> | 
  have_dist_spring_constant =  0; | 
| 253 | 
> | 
  have_theta_spring_constant = 0; | 
| 254 | 
> | 
  have_omega_spring_constant = 0; | 
| 255 | 
  | 
} | 
| 256 | 
  | 
 | 
| 257 | 
  | 
int Globals::newComponent( event* the_event ){ | 
| 399 | 
  | 
  char err[300]; | 
| 400 | 
  | 
   | 
| 401 | 
  | 
  token = 0; | 
| 402 | 
< | 
  key = hash( lhs ); | 
| 403 | 
< | 
  if( command_table[key] != NULL ) token = command_table[key]->match( lhs ); | 
| 402 | 
> | 
 | 
| 403 | 
> | 
  CommandMapType::iterator iter; | 
| 404 | 
> | 
  std::string keyword(lhs); | 
| 405 | 
> | 
  iter = command_table.find(keyword); | 
| 406 | 
> | 
  if (iter != command_table.end()) { | 
| 407 | 
> | 
    token = iter->second; | 
| 408 | 
> | 
  } | 
| 409 | 
  | 
   | 
| 410 | 
  | 
  if( token ){ | 
| 411 | 
  | 
     | 
| 1725 | 
  | 
        return 0; | 
| 1726 | 
  | 
        break; | 
| 1727 | 
  | 
      } | 
| 1728 | 
< | 
      break;       | 
| 1728 | 
> | 
      break;    | 
| 1729 | 
> | 
    | 
| 1730 | 
  | 
    case G_FORCEFIELD_VARIANT: | 
| 1731 | 
  | 
      if( the_type == STRING ){ | 
| 1732 | 
  | 
        strcpy( forcefield_variant, the_event->evt.asmt.rhs.sval ); | 
| 1751 | 
  | 
        strdup( "Error in parsing meta-data file!\n\tforceFieldFileName was not a string assignment.\n" ); | 
| 1752 | 
  | 
      return 0; | 
| 1753 | 
  | 
      break;       | 
| 1754 | 
+ | 
 | 
| 1755 | 
+ | 
    case G_THERM_INT_DIST_SPRING: | 
| 1756 | 
+ | 
      switch( the_type ){ | 
| 1757 | 
+ | 
         | 
| 1758 | 
+ | 
      case STRING: | 
| 1759 | 
+ | 
        the_event->err_msg =  | 
| 1760 | 
+ | 
          strdup( "Error in parsing meta-data file!\n\tthermIntDistSpringConst is not a double or int.\n" ); | 
| 1761 | 
+ | 
        return 1; | 
| 1762 | 
+ | 
        break; | 
| 1763 | 
+ | 
         | 
| 1764 | 
+ | 
      case DOUBLE: | 
| 1765 | 
+ | 
        therm_int_dist_spring = the_event->evt.asmt.rhs.dval; | 
| 1766 | 
+ | 
        have_dist_spring_constant = 1; | 
| 1767 | 
+ | 
        return 1; | 
| 1768 | 
+ | 
        break; | 
| 1769 | 
+ | 
         | 
| 1770 | 
+ | 
      case INT: | 
| 1771 | 
+ | 
        therm_int_dist_spring = (double)the_event->evt.asmt.rhs.dval; | 
| 1772 | 
+ | 
        have_dist_spring_constant = 1; | 
| 1773 | 
+ | 
        return 1; | 
| 1774 | 
+ | 
        break; | 
| 1775 | 
+ | 
         | 
| 1776 | 
+ | 
      default: | 
| 1777 | 
+ | 
        the_event->err_msg =  | 
| 1778 | 
+ | 
          strdup( "Error in parsing meta-data file!\n\tthermIntDistSpringConst unrecognized.\n" ); | 
| 1779 | 
+ | 
        return 0; | 
| 1780 | 
+ | 
        break; | 
| 1781 | 
+ | 
      } | 
| 1782 | 
+ | 
      break;    | 
| 1783 | 
+ | 
 | 
| 1784 | 
+ | 
    case G_THERM_INT_THETA_SPRING: | 
| 1785 | 
+ | 
      switch( the_type ){ | 
| 1786 | 
+ | 
         | 
| 1787 | 
+ | 
      case STRING: | 
| 1788 | 
+ | 
        the_event->err_msg =  | 
| 1789 | 
+ | 
          strdup( "Error in parsing meta-data file!\n\tthermIntThetaSpringConst is not a double or int.\n" ); | 
| 1790 | 
+ | 
        return 1; | 
| 1791 | 
+ | 
        break; | 
| 1792 | 
+ | 
         | 
| 1793 | 
+ | 
      case DOUBLE: | 
| 1794 | 
+ | 
        therm_int_theta_spring = the_event->evt.asmt.rhs.dval; | 
| 1795 | 
+ | 
        have_theta_spring_constant = 1; | 
| 1796 | 
+ | 
        return 1; | 
| 1797 | 
+ | 
        break; | 
| 1798 | 
+ | 
         | 
| 1799 | 
+ | 
      case INT: | 
| 1800 | 
+ | 
        therm_int_theta_spring = (double)the_event->evt.asmt.rhs.dval; | 
| 1801 | 
+ | 
        have_theta_spring_constant = 1; | 
| 1802 | 
+ | 
        return 1; | 
| 1803 | 
+ | 
        break; | 
| 1804 | 
+ | 
         | 
| 1805 | 
+ | 
      default: | 
| 1806 | 
+ | 
        the_event->err_msg =  | 
| 1807 | 
+ | 
          strdup( "Error in parsing meta-data file!\n\tthermIntThetaSpringConst unrecognized.\n" ); | 
| 1808 | 
+ | 
        return 0; | 
| 1809 | 
+ | 
        break; | 
| 1810 | 
+ | 
      } | 
| 1811 | 
+ | 
      break; | 
| 1812 | 
+ | 
 | 
| 1813 | 
+ | 
       case G_THERM_INT_OMEGA_SPRING: | 
| 1814 | 
+ | 
      switch( the_type ){ | 
| 1815 | 
+ | 
         | 
| 1816 | 
+ | 
      case STRING: | 
| 1817 | 
+ | 
        the_event->err_msg =  | 
| 1818 | 
+ | 
          strdup( "Error in parsing meta-data file!\n\tthermIntOmegaSpringConst is not a double or int.\n" ); | 
| 1819 | 
+ | 
        return 1; | 
| 1820 | 
+ | 
        break; | 
| 1821 | 
+ | 
         | 
| 1822 | 
+ | 
      case DOUBLE: | 
| 1823 | 
+ | 
        therm_int_omega_spring = the_event->evt.asmt.rhs.dval; | 
| 1824 | 
+ | 
        have_omega_spring_constant = 1; | 
| 1825 | 
+ | 
        return 1; | 
| 1826 | 
+ | 
        break; | 
| 1827 | 
+ | 
         | 
| 1828 | 
+ | 
      case INT: | 
| 1829 | 
+ | 
        therm_int_omega_spring = (double)the_event->evt.asmt.rhs.dval; | 
| 1830 | 
+ | 
        have_omega_spring_constant = 1; | 
| 1831 | 
+ | 
        return 1; | 
| 1832 | 
+ | 
        break; | 
| 1833 | 
+ | 
         | 
| 1834 | 
+ | 
      default: | 
| 1835 | 
+ | 
        the_event->err_msg =  | 
| 1836 | 
+ | 
          strdup( "Error in parsing meta-data file!\n\tthermIntOmegaSpringConst unrecognized.\n" ); | 
| 1837 | 
+ | 
        return 0; | 
| 1838 | 
+ | 
        break; | 
| 1839 | 
+ | 
      } | 
| 1840 | 
+ | 
      break;    | 
| 1841 | 
  | 
      // add more token cases here.       | 
| 1842 | 
  | 
    } | 
| 1843 | 
  | 
  } | 
| 1929 | 
  | 
  return 1; | 
| 1930 | 
  | 
} | 
| 1931 | 
  | 
 | 
| 1843 | 
– | 
int Globals::hash( char* text ){ | 
| 1844 | 
– | 
 | 
| 1845 | 
– | 
  register unsigned short int i = 0; // loop counter | 
| 1846 | 
– | 
  int key = 0; // the hash key | 
| 1847 | 
– | 
   | 
| 1848 | 
– | 
  while( text[i] != '\0' ){ | 
| 1849 | 
– | 
     | 
| 1850 | 
– | 
    key = ( ( key << hash_shift ) + text[i] ) % hash_size; | 
| 1851 | 
– | 
     | 
| 1852 | 
– | 
    i++; | 
| 1853 | 
– | 
  } | 
| 1854 | 
– | 
   | 
| 1855 | 
– | 
  if( key < 0 ){ | 
| 1856 | 
– | 
 | 
| 1857 | 
– | 
    // if the key is less than zero, we've had an overflow error | 
| 1858 | 
– | 
 | 
| 1859 | 
– | 
    sprintf( painCave.errMsg, | 
| 1860 | 
– | 
             "There has been an overflow error in the Globals' hash key."); | 
| 1861 | 
– | 
    painCave.isFatal = 1; | 
| 1862 | 
– | 
    simError(); | 
| 1863 | 
– | 
#ifdef IS_MPI | 
| 1864 | 
– | 
    if( painCave.isEventLoop ){ | 
| 1865 | 
– | 
      if( worldRank == 0 ) mpiInterfaceExit(); | 
| 1866 | 
– | 
    } | 
| 1867 | 
– | 
#endif //is_mpi | 
| 1868 | 
– | 
  } | 
| 1869 | 
– | 
   | 
| 1870 | 
– | 
  return key; | 
| 1871 | 
– | 
} | 
| 1872 | 
– | 
 | 
| 1873 | 
– | 
void Globals::addHash( char* text, int token ){ | 
| 1874 | 
– | 
 | 
| 1875 | 
– | 
  int key; | 
| 1876 | 
– | 
  LinkedCommand* the_element; | 
| 1877 | 
– | 
 | 
| 1878 | 
– | 
  the_element = new LinkedCommand; | 
| 1879 | 
– | 
  the_element->setValues( text, token ); | 
| 1880 | 
– | 
 | 
| 1881 | 
– | 
  key = hash( text ); | 
| 1882 | 
– | 
 | 
| 1883 | 
– | 
  the_element->setNext( command_table[key] ); | 
| 1884 | 
– | 
  command_table[key] = the_element; | 
| 1885 | 
– | 
} |