ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/interface_implementation/LJ_FF.cpp
(Generate patch)

Comparing trunk/mdtools/interface_implementation/LJ_FF.cpp (file contents):
Revision 252 by chuckv, Tue Jan 28 22:16:55 2003 UTC vs.
Revision 254 by chuckv, Thu Jan 30 20:03:37 2003 UTC

# Line 9 | Line 9 | using namespace std;
9   #include "SRI.hpp"
10   #include "simError.h"
11  
12
12   // Declare the structures that will be passed by the parser and  MPI
13  
14   typedef struct{
# Line 25 | Line 24 | int parseAtomLJ( char *lineBuffer, int lineNum, atomSt
24   int parseAtomLJ( char *lineBuffer, int lineNum, atomStruct &info );
25  
26   #ifdef IS_MPI
28
27   #include "mpiForceField.h"
28  
29   MPI_Datatype mpiAtomStructType;
# Line 73 | Line 71 | LJ_FF::LJ_FF(){
71   // begins the actual forcefield stuff.  
72   //****************************************************************
73  
74 +
75   LJ_FF::LJ_FF(){
76  
77    char fileName[200];
# Line 438 | Line 437 | void LJ_FF::initializeAtoms( void ){
437    
438   #ifdef IS_MPI
439    double tempBig = bigSigma;
440 <  MPI::COMM_WORLD::Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX );
440 >  MPI::COMM_WORLD.Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX );
441   #endif  //is_mpi
442  
443    //calc rCut and rList
# Line 605 | Line 604 | void LJ_FF::doForces( void ){
604   }
605  
606  
607 < void LJ_FF::doForces( void ){
607 > void LJ_FF::doForces( int calcPot ){
608  
609    int i;
610    double* frc;
611    double* pos;
612 <  short int calcPot = 1;
612 >  short int passedCalcPot = (short int)calcPot;
613  
614    // forces are zeroed here, before any are acumulated.
615    // NOTE: do not rezero the forces in Fortran.
# Line 622 | Line 621 | void LJ_FF::doForces( void ){
621    frc = Atom::getFrcArray();
622    pos = Atom::getPosArray();
623  
624 <  doLJfortran( pos, frc, &(entry_plug->lrPot), &calcPot );
624 > //   entry_plug->lrPot = -1;
625 >  doLJfortran( pos, frc, &(entry_plug->lrPot), &passedCalcPot );
626 >
627 >
628 > //  fprintf( stderr,
629 > //         "lrPot =  %lf\n", entry_plug->lrPot );
630 >  
631   }
632    
633   void LJ_FF::initFortran( void ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines