| # | Line 122 | Line 122 | namespace OpenMD { | |
|---|---|---|
| 122 | // z is possibly symmetric around 0 | |
| 123 | z = pos.z(); | |
| 124 | ||
| 125 | < | std::size_t whichRBin = int(r / dr); |
| 126 | < | std::size_t whichZBin = int( (zLen/2.0 + z) / dz); |
| 127 | < | |
| 128 | < | if ((whichRBin < nRBins_) && (whichZBin >= 0) && (whichZBin < nZBins_)) |
| 125 | > | int whichRBin = int(r / dr); |
| 126 | > | int whichZBin = int( (zLen/2.0 + z) / dz); |
| 127 | > | |
| 128 | > | if ((whichRBin < int(nRBins_)) && (whichZBin >= 0) && (whichZBin < int(nZBins_))) { |
| 129 | histo[whichRBin][whichZBin] += sd->getMass(); | |
| 130 | + | } |
| 131 | ||
| 132 | } | |
| 133 | ||
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |