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

Comparing trunk/OOPSE-4/src/applications/staticProps/RhoZ.cpp (file contents):
Revision 2758 by gezelter, Tue Mar 7 16:43:53 2006 UTC vs.
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC

# Line 44 | Line 44
44   *
45   *  Created by Charles F. Vardeman II on 11/26/05.
46   *  @author  Charles F. Vardeman II
47 < *  @version $Id: RhoZ.cpp,v 1.4 2006-03-07 16:43:52 gezelter Exp $
47 > *  @version $Id: RhoZ.cpp,v 1.5 2006-05-17 21:51:42 tim Exp $
48   *
49   */
50  
# Line 58 | Line 58 | namespace oopse {
58   #include "primitives/Molecule.hpp"
59   namespace oopse {
60    
61 <  RhoZ::RhoZ(SimInfo* info, const std::string& filename, const std::string& sele, double len, int nrbins)
61 >  RhoZ::RhoZ(SimInfo* info, const std::string& filename, const std::string& sele, RealType len, int nrbins)
62      : StaticAnalyser(info, filename), selectionScript_(sele),  evaluator_(info), seleMan_(info), len_(len), nRBins_(nrbins){
63  
64      evaluator_.loadScriptString(sele);
# Line 91 | Line 91 | namespace oopse {
91        reader.readFrame(istep);
92        currentSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot();
93        
94 <      double sliceVolume = currentSnapshot_->getVolume() /nRBins_;
94 >      RealType sliceVolume = currentSnapshot_->getVolume() /nRBins_;
95        //assume simulation box will never change
96        //Mat3x3d hmat = currentSnapshot_->getHmat();
97 <      double halfBoxZ_ = len_ / 2.0;      
97 >      RealType halfBoxZ_ = len_ / 2.0;      
98          
99          if (evaluator_.isDynamic()) {
100            seleMan_.setSelectionSet(evaluator_.evaluate());
# Line 118 | Line 118 | namespace oopse {
118  
119          //loop over the slices to calculate the densities
120          for (i = 0; i < nRBins_; i++) {
121 <            double totalMass = 0;
121 >            RealType totalMass = 0;
122              for (int k = 0; k < sliceSDLists_[i].size(); ++k) {
123                  totalMass += sliceSDLists_[i][k]->getMass();
124              }
# Line 140 | Line 140 | namespace oopse {
140        rdfStream << "#selection: (" << selectionScript_ << ")\n";
141        rdfStream << "#z\tdensity\n";
142        for (int i = 0; i < density_.size(); ++i) {
143 <        double r = deltaR_ * (i + 0.5);
143 >        RealType r = deltaR_ * (i + 0.5);
144          rdfStream << r << "\t" << 1.660535*density_[i]/nProcessed_ << "\n";
145        }
146        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines