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

Comparing branches/development/src/applications/staticProps/TetrahedralityParamZ.cpp (file contents):
Revision 1762 by plouden, Thu Jun 28 20:17:33 2012 UTC vs.
Revision 1767 by gezelter, Fri Jul 6 22:01:58 2012 UTC

# Line 66 | Line 66 | namespace OpenMD
66      //std ::cerrnZBins_:"<<nZBins_<<"\t"<<"nzbins:"<<nzbins<<endl;
67      // nZBins_ = 90;
68      //fixed numbe of bins
69 +    count_.resize(nZBins_);
70      sliceSDLists_.resize(nZBins_);
71      Qave_.resize(nZBins_);
72  
# Line 107 | Line 108 | namespace OpenMD
108      StuntDouble* sd2;
109      StuntDouble* sdi;
110      StuntDouble* sdj;
110    StuntDouble* sdk;
111      RigidBody* rb;
112      int myIndex;
113      SimInfo::MoleculeIterator mi;
# Line 116 | Line 116 | namespace OpenMD
116      Vector3d vec;
117      Vector3d ri, rj, rk, rik, rkj, dposition, tposition;
118      RealType r;
119    RealType dist;
119      RealType cospsi;
120      RealType Qk;
121 <    RealType Qsum;
123 <    RealType count[nZBins_];
124 <    std::vector<RealType> Qave_;
121 >
122      std::vector<std::pair<RealType,StuntDouble*> > myNeighbors;
123      int isd1, isd2;
124      cerr << "After Creation of variables in TP:process()\n";
# Line 152 | Line 149 | namespace OpenMD
149          int i;
150          for(i=0;i<nZBins_;i++)
151            {
152 <            count[i]=0;
152 >            count_[i]=0;
153            }    
154          
155          reader.readFrame(istep);
# Line 272 | Line 269 | namespace OpenMD
269      for(int i=0;i< nZBins_; i++)
270        {
271          RealType Qsum=0;
272 <        for (int k = 0; k < sliceSDLists_[i].size(); ++k)
272 >        for (unsigned int k = 0; k < sliceSDLists_[i].size(); ++k)
273            {
274              Qsum=Qsum+sliceSDLists_[i][k];
275 <            count[i]=count[i]+1;
275 >            count_[i]++;
276            }
277          //std::cerr<<"past averagin Qk"<<endl;
278          //std::cerr<<Qsum<<endl;
279 <        if(count[i]!=0)
279 >        if(count_[i]!=0)
280            {
281 <            Qave_.push_back(Qsum/count[i]);
281 >            Qave_.push_back(Qsum/count_[i]);
282            }
283          //std::cerr<<count[i]<<endl;
284        }
# Line 296 | Line 293 | namespace OpenMD
293          //rdfStream << "#z\tdensity\n";
294          for (int i = 0; i < nZBins_; ++i)
295            {
296 <            if(count[i]!=0)
296 >            if(count_[i]!=0)
297                {
298                  rdfStream << ((hmat(2,2)*i)/nZBins_)+(hmat(2,2)/(2*nZBins_)) << "\t" << Qave_[i] << "\n";
299                }
# Line 358 | Line 355 | namespace OpenMD
355                  Vector3d position;
356                  position = (*iter)->getPos();
357                  osd << "O  " << "\t";
358 <                for (int z=0; z<position.size(); z++)
358 >                for (unsigned int z=0; z<position.size(); z++)
359                    {
360                      osd << position[z] << "  " << "\t";
361                    }
# Line 377 | Line 374 | namespace OpenMD
374                  Vector3d position;              
375                  position = (*iter)->getPos();
376                  ost << "O  " << "\t";
377 <                for (int z=0; z<position.size(); z++)
377 >                for (unsigned int z=0; z<position.size(); z++)
378                    {
379                      ost << position[z] << "  " << "\t";
380                    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines