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

Comparing trunk/OOPSE/libmdtools/ForceFields.cpp (file contents):
Revision 484 by gezelter, Wed Apr 9 13:59:35 2003 UTC vs.
Revision 781 by tim, Mon Sep 22 23:07:57 2003 UTC

# Line 1 | Line 1
1 + #include <iostream>
2 +
3 + using namespace std;
4 +
5 +
6   #include <cstdlib>
7  
8   #ifdef IS_MPI
# Line 21 | Line 26 | void ForceFields::calcRcut( void ){
26  
27    //calc rCut and rList
28  
29 <  entry_plug->rCut = 2.5 * bigSigma;
30 <  if(entry_plug->rCut > (entry_plug->box_x / 2.0))
26 <    entry_plug->rCut = entry_plug->box_x / 2.0;
27 <  if(entry_plug->rCut > (entry_plug->box_y / 2.0))
28 <    entry_plug->rCut = entry_plug->box_y / 2.0;
29 <  if(entry_plug->rCut > (entry_plug->box_z / 2.0))
30 <    entry_plug->rCut = entry_plug->box_z / 2.0;
31 <  
32 <  entry_plug->rList = entry_plug->rCut + 1.0;
33 <  
29 >  entry_plug->setRcut( 2.5 * bigSigma );  
30 >    
31   }
32  
33   void ForceFields::doForces( int calcPot, int calcStress ){
# Line 42 | Line 39 | void ForceFields::doForces( int calcPot, int calcStres
39    double* A;
40    double* u_l;;
41    DirectionalAtom* dAtom;
42 +  SimState* config;
43  
44    short int passedCalcPot = (short int)calcPot;
45    short int passedCalcStress = (short int)calcStress;
# Line 57 | Line 55 | void ForceFields::doForces( int calcPot, int calcStres
55      entry_plug->molecules[i].calcForces();
56    }
57  
58 <  frc = Atom::getFrcArray();
61 <  pos = Atom::getPosArray();
62 <  trq = Atom::getTrqArray();
63 <  A   = Atom::getAmatArray();
64 <  u_l = Atom::getUlArray();
58 >  config = entry_plug->getConfiguration();
59    
60 +  frc = config->getFrcArray();
61 +  pos = config->getPosArray();
62 +  trq = config->getTrqArray();
63 +  A   = config->getAmatArray();
64 +  u_l = config->getUlArray();
65 +
66    isError = 0;
67    entry_plug->lrPot = 0.0;
68  
# Line 93 | Line 93 | void ForceFields::doForces( int calcPot, int calcStres
93             "returned from the force calculation.\n" );
94    MPIcheckPoint();
95   #endif // is_mpi
96 +  
97  
98   }
99  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines