ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/brains/SimSetup.cpp
(Generate patch)

Comparing trunk/src/brains/SimSetup.cpp (file contents):
Revision 3 by tim, Fri Sep 24 16:27:58 2004 UTC vs.
Revision 135 by gezelter, Thu Oct 21 20:15:31 2004 UTC

# Line 32 | Line 32 | using namespace std;
32   #define FF_H2O   3
33  
34   using namespace std;
35 + using namespace oopse;
36  
37   /**
38   * Check whether dividend is divisble by divisor or not
# Line 908 | Line 909 | void SimSetup::gatherInfo(void){
909    }
910    
911    for (i = 0; i < nInfo; i++) {
911    // get the mixing rule
912    
913    strcpy(info[i].mixingRule, globals->getMixingRule());
912      info[i].usePBC = globals->getPBC();
913    }
914    
# Line 1763 | Line 1761 | void SimSetup::initFortran(void){
1761  
1762   void SimSetup::initFortran(void){
1763    info[0].refreshSim();
1766
1767  if (!strcmp(info[0].mixingRule, "standard")){
1768    the_ff->initForceField(LB_MIXING_RULE);
1769  }
1770  else if (!strcmp(info[0].mixingRule, "explicit")){
1771    the_ff->initForceField(EXPLICIT_MIXING_RULE);
1772  }
1773  else{
1774    sprintf(painCave.errMsg, "SimSetup Error: unknown mixing rule -> \"%s\"\n",
1775            info[0].mixingRule);
1776    painCave.isFatal = 1;
1777    simError();
1778  }
1764  
1765 +  the_ff->initForceField();
1766  
1767   #ifdef IS_MPI
1768 <  strcpy(checkPointMsg, "Successfully intialized the mixingRule for Fortran.");
1768 >  strcpy(checkPointMsg, "Successfully intialized the fortran portion of the force field.");
1769    MPIcheckPoint();
1770   #endif // is_mpi
1771   }
# Line 1790 | Line 1776 | void SimSetup::setupZConstraint(SimInfo& theInfo){
1776  
1777    if (globals->haveZconstraintTime()){
1778      //add sample time of z-constraint  into SimInfo's property list                    
1779 <    DoubleData* zconsTimeProp = new DoubleData();
1779 >    DoubleGenericData* zconsTimeProp = new DoubleGenericData();
1780      zconsTimeProp->setID(ZCONSTIME_ID);
1781      zconsTimeProp->setData(globals->getZconsTime());
1782      theInfo.addProperty(zconsTimeProp);
# Line 1805 | Line 1791 | void SimSetup::setupZConstraint(SimInfo& theInfo){
1791  
1792    //push zconsTol into siminfo, if user does not specify
1793    //value for zconsTol, a default value will be used
1794 <  DoubleData* zconsTol = new DoubleData();
1794 >  DoubleGenericData* zconsTol = new DoubleGenericData();
1795    zconsTol->setID(ZCONSTOL_ID);
1796    if (globals->haveZconsTol()){
1797      zconsTol->setData(globals->getZconsTol());
# Line 1825 | Line 1811 | void SimSetup::setupZConstraint(SimInfo& theInfo){
1811    theInfo.addProperty(zconsTol);
1812  
1813    //set Force Subtraction Policy
1814 <  StringData* zconsForcePolicy = new StringData();
1814 >  StringGenericData* zconsForcePolicy = new StringGenericData();
1815    zconsForcePolicy->setID(ZCONSFORCEPOLICY_ID);
1816  
1817    if (globals->haveZconsForcePolicy()){
# Line 1844 | Line 1830 | void SimSetup::setupZConstraint(SimInfo& theInfo){
1830    theInfo.addProperty(zconsForcePolicy);
1831  
1832    //set zcons gap
1833 <  DoubleData* zconsGap = new DoubleData();
1833 >  DoubleGenericData* zconsGap = new DoubleGenericData();
1834    zconsGap->setID(ZCONSGAP_ID);
1835  
1836    if (globals->haveZConsGap()){
# Line 1853 | Line 1839 | void SimSetup::setupZConstraint(SimInfo& theInfo){
1839    }
1840  
1841    //set zcons fixtime
1842 <  DoubleData* zconsFixtime = new DoubleData();
1842 >  DoubleGenericData* zconsFixtime = new DoubleGenericData();
1843    zconsFixtime->setID(ZCONSFIXTIME_ID);
1844  
1845    if (globals->haveZConsFixTime()){
# Line 1862 | Line 1848 | void SimSetup::setupZConstraint(SimInfo& theInfo){
1848    }
1849  
1850    //set zconsUsingSMD
1851 <  IntData* zconsUsingSMD = new IntData();
1851 >  IntGenericData* zconsUsingSMD = new IntGenericData();
1852    zconsUsingSMD->setID(ZCONSUSINGSMD_ID);
1853  
1854    if (globals->haveZConsUsingSMD()){
# Line 1878 | Line 1864 | void SimSetup::setupZConstraint(SimInfo& theInfo){
1864  
1865    zconsOutput = zconsOutput.substr(0, zconsOutput.rfind(".")) + ".fz";
1866  
1867 <  StringData* zconsFilename = new StringData();
1867 >  StringGenericData* zconsFilename = new StringGenericData();
1868    zconsFilename->setID(ZCONSFILENAME_ID);
1869    zconsFilename->setData(zconsOutput);
1870  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines