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

Comparing trunk/src/applications/sequentialProps/ContactAngle2.cpp (file contents):
Revision 2073 by gezelter, Sat Mar 7 23:52:07 2015 UTC vs.
Revision 2081 by gezelter, Tue Mar 17 18:22:18 2015 UTC

# Line 54 | Line 54 | namespace OpenMD {
54    
55    ContactAngle2::ContactAngle2(SimInfo* info, const std::string& filename,
56                                 const std::string& sele, RealType solidZ,
57 +                               RealType centroidX, RealType centroidY,
58                                 RealType threshDens, RealType bufferLength,
59                                 int nrbins, int nzbins)
60 <  : SequentialAnalyzer(info, filename), solidZ_(solidZ),
61 <    threshDens_(threshDens), bufferLength_(bufferLength), nRBins_(nrbins),
62 <    nZBins_(nzbins), selectionScript_(sele), seleMan_(info),
63 <    evaluator_(info) {
60 >    : SequentialAnalyzer(info, filename), solidZ_(solidZ),
61 >      centroidX_(centroidX), centroidY_(centroidY),
62 >      threshDens_(threshDens), bufferLength_(bufferLength), nRBins_(nrbins),
63 >      nZBins_(nzbins), selectionScript_(sele), seleMan_(info),
64 >      evaluator_(info) {
65      
66      setOutputName(getPrefix(filename) + ".ca2");
67      
# Line 95 | Line 97 | namespace OpenMD {
97      }
98      
99  
100 <    RealType mtot = 0.0;
101 <    Vector3d com(V3Zero);
102 <    RealType mass;
100 >    // RealType mtot = 0.0;
101 >    // Vector3d com(V3Zero);
102 >    // RealType mass;
103      
104 <    for (sd = seleMan_.beginSelected(i); sd != NULL;
105 <         sd = seleMan_.nextSelected(i)) {      
106 <      mass = sd->getMass();
107 <      mtot += mass;
108 <      com += sd->getPos() * mass;
109 <    }
104 >    // for (sd = seleMan_.beginSelected(i); sd != NULL;
105 >    //      sd = seleMan_.nextSelected(i)) {      
106 >    //   mass = sd->getMass();
107 >    //   mtot += mass;
108 >    //   com += sd->getPos() * mass;
109 >    // }
110  
111 <    com /= mtot;
111 >    // com /= mtot;
112  
113 +    Vector3d com(centroidX_, centroidY_, solidZ_);
114 +
115      // now that we have the centroid, we can make cylindrical density maps
116      Vector3d pos;
117      RealType r;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines