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

Comparing branches/development/src/brains/ForceManager.cpp (file contents):
Revision 1593 by gezelter, Fri Jul 15 21:35:14 2011 UTC vs.
Revision 1612 by gezelter, Fri Aug 12 19:59:56 2011 UTC

# Line 526 | Line 526 | namespace OpenMD {
526             mol = info_->nextMolecule(mi)) {
527          for(cg = mol->beginCutoffGroup(ci); cg != NULL;
528              cg = mol->nextCutoffGroup(ci)) {
529          cerr << "branch1\n";
530          cerr << "globind = " << cg->getGlobalIndex() << "\n";
529            cg->updateCOM();
530          }
531        }      
532      } else {
533        // center of mass of the group is the same as position of the atom  
534        // if cutoff group does not exist
537      cerr << "branch2\n";
535        cgConfig->position = config->position;
536      }
537  
# Line 585 | Line 582 | namespace OpenMD {
582          bool update_nlist = fDecomp_->checkNeighborList();
583          if (update_nlist)
584            neighborList = fDecomp_->buildNeighborList();
585 <      }      
586 <        
585 >      }            
586 >
587        for (vector<pair<int, int> >::iterator it = neighborList.begin();
588               it != neighborList.end(); ++it) {
589                  
# Line 636 | Line 633 | namespace OpenMD {
633                  if (atomListRow.size() == 1 && atomListColumn.size() == 1) {
634                    idat.d = &d_grp;
635                    idat.r2 = &rgrpsq;
639                  cerr << "dgrp = " << d_grp << "\n";
636                  } else {
637                    d = fDecomp_->getInteratomicVector(atom1, atom2);
638                    curSnapshot->wrapVector( d );
639                    r2 = d.lengthSquare();
644                  cerr << "datm = " << d<< "\n";
640                    idat.d = &d;
641                    idat.r2 = &r2;
642                  }
643 <                
649 <                cerr << "idat.d = " << *(idat.d) << "\n";
643 >              
644                  r = sqrt( *(idat.r2) );
645                  idat.rij = &r;
646                
# Line 656 | Line 650 | namespace OpenMD {
650                    interactionMan_->doPair(idat);
651                    fDecomp_->unpackInteractionData(idat, atom1, atom2);
652  
659                  cerr << "d = " << *(idat.d) << "\tv=" << vpair << "\tf=" << f1 << "\n";
653                    vij += vpair;
654                    fij += f1;
655                    tau -= outProduct( *(idat.d), f1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines