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 1570 by gezelter, Thu May 26 21:56:04 2011 UTC vs.
Revision 1571 by gezelter, Fri May 27 16:45:44 2011 UTC

# Line 55 | Line 55 | namespace OpenMD {
55    void ForceMatrixDecomposition::distributeInitialData() {
56      snap_ = sman_->getCurrentSnapshot();
57      storageLayout_ = sman_->getStorageLayout();
58 +    ff_ = info_->getForceField();
59      nLocal_ = snap_->getNumberOfAtoms();
60      nGroups_ = snap_->getNumberOfCutoffGroups();
61  
62      // gather the information for atomtype IDs (atids):
63 <    vector<int> identsLocal = info_->getIdentArray();
63 >    identsLocal = info_->getIdentArray();
64      AtomLocalToGlobal = info_->getGlobalAtomIndices();
65      cgLocalToGlobal = info_->getGlobalGroupIndices();
66      vector<int> globalGroupMembership = info_->getGlobalGroupMembership();
# Line 147 | Line 148 | namespace OpenMD {
148      skipsForRowAtom.clear();
149      skipsForRowAtom.reserve(nAtomsInRow_);
150      for (int i = 0; i < nAtomsInRow_; i++) {
151 <      int iglob = AtomColToGlobal[i];
151 >      int iglob = AtomRowToGlobal[i];
152        for (int j = 0; j < nAtomsInCol_; j++) {
153 <        int jglob = AtomRowToGlobal[j];        
153 >        int jglob = AtomColToGlobal[j];        
154          if (excludes.hasPair(iglob, jglob))
155            skipsForRowAtom[i].push_back(j);      
156        }      
# Line 158 | Line 159 | namespace OpenMD {
159      toposForRowAtom.clear();
160      toposForRowAtom.reserve(nAtomsInRow_);
161      for (int i = 0; i < nAtomsInRow_; i++) {
162 <      int iglob = AtomColToGlobal[i];
162 >      int iglob = AtomRowToGlobal[i];
163        int nTopos = 0;
164        for (int j = 0; j < nAtomsInCol_; j++) {
165 <        int jglob = AtomRowToGlobal[j];        
165 >        int jglob = AtomColToGlobal[j];        
166          if (oneTwo.hasPair(iglob, jglob)) {
167            toposForRowAtom[i].push_back(j);
168            topoDistRow[i][nTopos] = 1;
# Line 540 | Line 541 | namespace OpenMD {
541      InteractionData idat;
542  
543   #ifdef IS_MPI
544 +    
545 +    idat.atypes = make_pair( ff_->getAtomType(identsRow[atom1]),
546 +                             ff_->getAtomType(identsCol[atom2]) );
547 +
548      if (storageLayout_ & DataStorage::dslAmat) {
549        idat.A1 = &(atomRowData.aMat[atom1]);
550        idat.A2 = &(atomColData.aMat[atom2]);
# Line 566 | Line 571 | namespace OpenMD {
571      }
572  
573   #else
574 +
575 +    idat.atypes = make_pair( ff_->getAtomType(identsLocal[atom1]),
576 +                             ff_->getAtomType(identsLocal[atom2]) );
577 +
578      if (storageLayout_ & DataStorage::dslAmat) {
579        idat.A1 = &(snap_->atomData.aMat[atom1]);
580        idat.A2 = &(snap_->atomData.aMat[atom2]);
# Line 598 | Line 607 | namespace OpenMD {
607  
608      InteractionData idat;
609   #ifdef IS_MPI
610 +    idat.atypes = make_pair( ff_->getAtomType(identsRow[atom1]),
611 +                             ff_->getAtomType(identsCol[atom2]) );
612 +
613      if (storageLayout_ & DataStorage::dslElectroFrame) {
614        idat.eFrame1 = &(atomRowData.electroFrame[atom1]);
615        idat.eFrame2 = &(atomColData.electroFrame[atom2]);
# Line 611 | Line 623 | namespace OpenMD {
623        idat.t2 = &(atomColData.force[atom2]);
624      }
625   #else
626 +    idat.atypes = make_pair( ff_->getAtomType(identsLocal[atom1]),
627 +                             ff_->getAtomType(identsLocal[atom2]) );
628 +
629      if (storageLayout_ & DataStorage::dslElectroFrame) {
630        idat.eFrame1 = &(snap_->atomData.electroFrame[atom1]);
631        idat.eFrame2 = &(snap_->atomData.electroFrame[atom2]);
# Line 623 | Line 638 | namespace OpenMD {
638        idat.t1 = &(snap_->atomData.force[atom1]);
639        idat.t2 = &(snap_->atomData.force[atom2]);
640      }
641 < #endif
627 <    
641 > #endif    
642    }
643  
630
631
632
644    /*
645     * buildNeighborList
646     *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines