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

Comparing branches/development/src/visitors/AtomVisitor.cpp (file contents):
Revision 1871 by gezelter, Fri May 10 14:59:13 2013 UTC vs.
Revision 1873 by gezelter, Fri May 10 16:09:34 2013 UTC

# Line 50 | Line 50 | namespace OpenMD {
50   #include "types/GayBerneAdapter.hpp"
51  
52   namespace OpenMD {
53 +
54 +  BaseAtomVisitor::BaseAtomVisitor(SimInfo* info) : BaseVisitor() {
55 +    storageLayout_ = info->getStorageLayout();
56 +  }    
57 +  
58    void BaseAtomVisitor::visit(RigidBody *rb) {
59      //vector<Atom*> myAtoms;
60      //vector<Atom*>::iterator atomIter;
# Line 108 | Line 113 | namespace OpenMD {
113        atomInfo->hasCharge = true;
114        atomInfo->charge += atom->getFlucQPos();
115      }
116 <
117 <    if (atype->isElectrostatic()) {
116 >    
117 >    if ((storageLayout_ & DataStorage::dslElectricField) &&
118 >        (atype->isElectrostatic())) {
119        atomInfo->hasElectricField = true;
120        atomInfo->eField = atom->getElectricField();
121      }
# Line 151 | Line 157 | namespace OpenMD {
157        atomInfo->charge += datom->getFlucQPos();
158      }
159  
160 <    if (atype->isElectrostatic()) {
160 >    if ((storageLayout_ & DataStorage::dslElectricField) &&
161 >        (atype->isElectrostatic())) {
162        atomInfo->hasElectricField = true;
163        atomInfo->eField = datom->getElectricField();
164      }
# Line 170 | Line 177 | namespace OpenMD {
177        atomInfo->vec = datom->getA().transpose()*V3Z;
178      }
179  
180 +    atomData = new AtomData;
181 +    atomData->setID("ATOMDATA");  
182      atomData->addAtomInfo(atomInfo);
183 +
184      datom->addProperty(atomData);
185  
186      setVisited(datom);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines