| 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 |
|
|
| 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; |