ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/staticProps/DensityPlot.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/staticProps/DensityPlot.cpp (file contents):
Revision 2258 by gezelter, Mon Jun 20 16:03:30 2005 UTC vs.
Revision 2264 by tim, Wed Jul 13 16:48:49 2005 UTC

# Line 40 | Line 40
40   */
41  
42   #include <algorithm>
43 + #include <functional>
44   #include "applications/staticProps/DensityPlot.hpp"
45   #include "utils/simError.h"
46   #include "io/DumpReader.hpp"
# Line 83 | Line 84 | void DensityPlot::process() {
84    
85    DumpReader reader(info_, dumpFilename_);    
86    int nFrames = reader.getNFrames();
87 <  int i;
87 <  for (i = 0; i < nFrames; i += step_) {
87 >  for (int i = 0; i < nFrames; i += step_) {
88      reader.readFrame(i);
89      currentSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot();
90  
# Line 108 | Line 108 | void DensityPlot::process() {
108  
109      Mat3x3d hmat = currentSnapshot_->getHmat();
110      double slabVolume = deltaR_ * hmat(0, 0) * hmat(1, 1);
111 <    
112 <    for (StuntDouble* sd = seleMan_.beginSelected(i); sd != NULL; sd = seleMan_.nextSelected(i)) {
111 >    int k;
112 >    for (StuntDouble* sd = seleMan_.beginSelected(k); sd != NULL; sd = seleMan_.nextSelected(k)) {
113  
114  
115              if (!sd->isAtom()) {
# Line 161 | Line 161 | void DensityPlot::process() {
161              double sigma2 = sigma * sigma;
162  
163              Vector3d pos = sd->getPos() - origin;
164            /*
165            currentSnapshot_->wrapVector(pos);            
166            double wrappedZdist = pos.z() + halfLen_;
167            if (wrappedZdist < 0.0 || wrappedZdist > len_) {
168                continue;
169            }
170            
171            int which =wrappedZdist / deltaR_;        
172            density_[which] += nelectron;
173            */
164              for (int j =0; j < nRBins_; ++j) {
165                  Vector3d tmp(pos);
166                  double zdist =j * deltaR_ - halfLen_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines