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 1713 by gezelter, Sat May 19 14:21:02 2012 UTC vs.
Revision 1721 by gezelter, Thu May 24 14:17:42 2012 UTC

# Line 523 | Line 523 | namespace OpenMD {
523             atomRowData.skippedCharge.end(), 0.0);
524        fill(atomColData.skippedCharge.begin(),
525             atomColData.skippedCharge.end(), 0.0);
526 +    }
527 +
528 +    if (storageLayout_ & DataStorage::dslFlucQForce) {      
529 +      fill(atomRowData.flucQFrc.begin(),
530 +           atomRowData.flucQFrc.end(), 0.0);
531 +      fill(atomColData.flucQFrc.begin(),
532 +           atomColData.flucQFrc.end(), 0.0);
533      }
534  
535      if (storageLayout_ & DataStorage::dslElectricField) {    
# Line 531 | Line 538 | namespace OpenMD {
538        fill(atomColData.electricField.begin(),
539             atomColData.electricField.end(), V3Zero);
540      }
541 +
542      if (storageLayout_ & DataStorage::dslFlucQForce) {    
543        fill(atomRowData.flucQFrc.begin(), atomRowData.flucQFrc.end(),
544             0.0);
# Line 1005 | Line 1013 | namespace OpenMD {
1013      if (storageLayout_ & DataStorage::dslSkippedCharge) {              
1014        idat.skippedCharge1 = &(atomRowData.skippedCharge[atom1]);
1015        idat.skippedCharge2 = &(atomColData.skippedCharge[atom2]);
1016 +    }
1017 +
1018 +    if (storageLayout_ & DataStorage::dslFlucQPosition) {              
1019 +      idat.flucQ1 = &(atomRowData.flucQPos[atom1]);
1020 +      idat.flucQ2 = &(atomColData.flucQPos[atom2]);
1021      }
1022  
1023   #else
# Line 1057 | Line 1070 | namespace OpenMD {
1070        idat.skippedCharge1 = &(snap_->atomData.skippedCharge[atom1]);
1071        idat.skippedCharge2 = &(snap_->atomData.skippedCharge[atom2]);
1072      }
1073 +
1074 +    if (storageLayout_ & DataStorage::dslFlucQPosition) {              
1075 +      idat.flucQ1 = &(snap_->atomData.flucQPos[atom1]);
1076 +      idat.flucQ2 = &(snap_->atomData.flucQPos[atom2]);
1077 +    }
1078 +
1079   #endif
1080    }
1081  
# Line 1069 | Line 1088 | namespace OpenMD {
1088      atomRowData.force[atom1] += *(idat.f1);
1089      atomColData.force[atom2] -= *(idat.f1);
1090  
1091 +    if (storageLayout_ & DataStorage::dslFlucQForce) {              
1092 +      atomRowData.flucQFrc[atom1] += *(idat.dVdFQ1);
1093 +      atomColData.flucQFrc[atom2] += *(idat.dVdFQ2);
1094 +    }
1095 +
1096 +    if (storageLayout_ & DataStorage::dslElectricField) {              
1097 +      atomRowData.electricField[atom1] += *(idat.eField1);
1098 +      atomColData.electricField[atom2] += *(idat.eField2);
1099 +    }
1100 +
1101      // should particle pot be done here also?
1102   #else
1103      pairwisePot += *(idat.pot);
# Line 1080 | Line 1109 | namespace OpenMD {
1109        snap_->atomData.particlePot[atom1] += *(idat.vpair) * *(idat.sw);
1110        snap_->atomData.particlePot[atom2] -= *(idat.vpair) * *(idat.sw);
1111      }
1112 <      
1112 >    
1113 >    if (storageLayout_ & DataStorage::dslFlucQForce) {              
1114 >      snap_->atomData.flucQFrc[atom1] += *(idat.dVdFQ1);
1115 >      snap_->atomData.flucQFrc[atom2] -= *(idat.dVdFQ2);
1116 >    }
1117 >
1118 >    if (storageLayout_ & DataStorage::dslElectricField) {              
1119 >      snap_->atomData.electricField[atom1] += *(idat.eField1);
1120 >      snap_->atomData.electricField[atom2] += *(idat.eField2);
1121 >    }
1122 >
1123   #endif
1124      
1125    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines