ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/Globals.cpp
(Generate patch)

Comparing trunk/OOPSE/libBASS/Globals.cpp (file contents):
Revision 1153 by gezelter, Tue May 11 04:21:52 2004 UTC vs.
Revision 1188 by chrisfen, Sat May 22 18:17:05 2004 UTC

# Line 66 | Line 66
66   #define G_ZCONSGAP          45
67   #define G_ZCONSFIXTIME      46
68   #define G_ZCONSUSINGSMD     47
69 + #define G_USE_THERM_INT     48
70 + #define G_THERM_INT_LAMBDA  49
71 + #define G_THERM_INT_K       50
72  
73   Globals::Globals(){
74    
# Line 128 | Line 131 | Globals::Globals(){
131    addHash( "zconsGap", G_ZCONSGAP);
132    addHash( "zconsFixtime", G_ZCONSFIXTIME);
133    addHash( "zconsUsingSMD", G_ZCONSUSINGSMD);
134 +  addHash( "useThermInt",                    G_USE_THERM_INT);
135 +  addHash( "thermodynamicIntegrationLambda", G_THERM_INT_LAMBDA);
136 +  addHash( "thermodynamicIntegrationK",      G_THERM_INT_K);
137  
138    strcpy( mixingRule,"standard");  //default mixing rules to standard.
139    usePBC = 1; //default  periodic boundry conditions to on
# Line 135 | Line 141 | Globals::Globals(){
141    useInitTime = 0; // default to pull init time from the init file
142    useInitXSstate = 0; // default to pull the extended state from the init file
143    orthoBoxTolerance = 1E-6;
144 +  useThermInt = 0; // default thermodynamic integration to off
145  
146    have_force_field =  0;
147    have_n_components = 0;
# Line 180 | Line 187 | Globals::Globals(){
187    have_minimizer_gtol = 0;
188    have_minimizer_ls_tol = 0;
189    have_minimizer_ls_maxiteration = 0;
190 +  have_thermodynamic_integration_lambda = 0;
191 +  have_thermodynamic_integration_k = 0;
192  
193   }
194  
# Line 1568 | Line 1577 | int Globals::globalAssign( event* the_event ){
1577            strdup( "Global error. seed unrecognized.\n" );
1578          return 0;
1579          break;
1580 +      }
1581 +      break;
1582 +
1583 +    case G_USE_THERM_INT:
1584 +      if( the_type == STRING ){
1585 +        
1586 +        if( !strcasecmp( "true", the_event->evt.asmt.rhs.sval )) useThermInt = 1;
1587 +        else if( !strcasecmp( "false", the_event->evt.asmt.rhs.sval )) useThermInt = 0;
1588 +        else{
1589 +          the_event->err_msg =
1590 +            strdup( "Global error. useThermInt was not \"true\" or \"false\".\n" );
1591 +          return 0;
1592 +        }
1593 +        return 1;
1594        }
1595 +      
1596 +      the_event->err_msg =
1597 +        strdup( "Global error. useThermInt was not \"true\" or \"false\".\n" );
1598 +      return 0;
1599        break;
1600 +
1601 +    case G_THERM_INT_LAMBDA:
1602 +      switch( the_type ){
1603 +        
1604 +      case STRING:
1605 +        the_event->err_msg =
1606 +          strdup( "Global error. thermodynamicIntegrationLambda is not a double or int.\n" );
1607 +        return 1;
1608 +        break;
1609 +        
1610 +      case DOUBLE:
1611 +        thermodynamic_integration_lambda = the_event->evt.asmt.rhs.dval;
1612 +        have_thermodynamic_integration_lambda = 1;
1613 +        return 1;
1614 +        break;
1615 +        
1616 +      case INT:
1617 +        thermodynamic_integration_lambda = (double)the_event->evt.asmt.rhs.dval;
1618 +        have_thermodynamic_integration_lambda = 1;
1619 +        return 1;
1620 +        break;
1621 +        
1622 +      default:
1623 +        the_event->err_msg =
1624 +          strdup( "Global error. thermodynamicIntegrationLambda unrecognized.\n" );
1625 +        return 0;
1626 +        break;
1627 +      }
1628 +      break;      
1629 +
1630 +    case G_THERM_INT_K:
1631 +      switch( the_type ){
1632 +        
1633 +      case STRING:
1634 +        the_event->err_msg =
1635 +          strdup( "Global error. thermodynamicIntegrationK is not a double or int.\n" );
1636 +        return 1;
1637 +        break;
1638 +        
1639 +      case DOUBLE:
1640 +        thermodynamic_integration_k = the_event->evt.asmt.rhs.dval;
1641 +        have_thermodynamic_integration_k = 1;
1642 +        return 1;
1643 +        break;
1644 +        
1645 +      case INT:
1646 +        thermodynamic_integration_k = (double)the_event->evt.asmt.rhs.dval;
1647 +        have_thermodynamic_integration_k = 1;
1648 +        return 1;
1649 +        break;
1650 +        
1651 +      default:
1652 +        the_event->err_msg =
1653 +          strdup( "Global error. thermodynamicIntegrationK unrecognized.\n" );
1654 +        return 0;
1655 +        break;
1656 +      }
1657 +      break;      
1658        // add more token cases here.
1659  
1660      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines