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

Comparing branches/development/src/parallel/ForceMatrixDecomposition.cpp (file contents):
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1706 by gezelter, Fri Apr 27 20:44:16 2012 UTC

# Line 537 | Line 537 | namespace OpenMD {
537        fill(snap_->atomData.density.begin(),
538             snap_->atomData.density.end(), 0.0);
539      }
540 +
541      if (storageLayout_ & DataStorage::dslFunctional) {
542        fill(snap_->atomData.functional.begin(),
543             snap_->atomData.functional.end(), 0.0);
544      }
545 +
546      if (storageLayout_ & DataStorage::dslFunctionalDerivative) {      
547        fill(snap_->atomData.functionalDerivative.begin(),
548             snap_->atomData.functionalDerivative.end(), 0.0);
549      }
550 +
551      if (storageLayout_ & DataStorage::dslSkippedCharge) {      
552        fill(snap_->atomData.skippedCharge.begin(),
553             snap_->atomData.skippedCharge.end(), 0.0);
554      }
552    
555    }
556  
557  
# Line 951 | Line 953 | namespace OpenMD {
953      }
954  
955   #else
956 +    
957  
958 +    // cerr << "atoms = " << atom1 << " " << atom2 << "\n";
959 +    // cerr << "pos1 = " << snap_->atomData.position[atom1] << "\n";
960 +    // cerr << "pos2 = " << snap_->atomData.position[atom2] << "\n";
961 +
962      idat.atypes = make_pair( atypesLocal[atom1], atypesLocal[atom2]);
963      //idat.atypes = make_pair( ff_->getAtomType(idents[atom1]),
964      //                         ff_->getAtomType(idents[atom2]) );
# Line 1001 | Line 1008 | namespace OpenMD {
1008    
1009    void ForceMatrixDecomposition::unpackInteractionData(InteractionData &idat, int atom1, int atom2) {    
1010   #ifdef IS_MPI
1011 <    pot_row[atom1] += 0.5 *  *(idat.pot);
1012 <    pot_col[atom2] += 0.5 *  *(idat.pot);
1011 >    pot_row[atom1] += RealType(0.5) *  *(idat.pot);
1012 >    pot_col[atom2] += RealType(0.5) *  *(idat.pot);
1013  
1014      atomRowData.force[atom1] += *(idat.f1);
1015      atomColData.force[atom2] -= *(idat.f1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines