| 41 |
|
|
| 42 |
|
#include <algorithm> |
| 43 |
|
#include <fstream> |
| 44 |
< |
#include "applications/staticProps/GofRAngle2.hpp" |
| 44 |
> |
#include "applications/staticProps/GofAngle2.hpp" |
| 45 |
|
#include "utils/simError.h" |
| 46 |
|
|
| 47 |
|
namespace oopse { |
| 48 |
|
|
| 49 |
< |
GofRAngle2::GofRAngle2(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) |
| 49 |
> |
GofAngle2::GofAngle2(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) |
| 50 |
|
: RadialDistrFunc(info, filename, sele1, sele2){ |
| 51 |
+ |
setOutputName(getPrefix(filename) + ".gfotw"); |
| 52 |
|
|
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
|
| 56 |
< |
void GofRAngle2::preProcess() { |
| 56 |
> |
void GofAngle2::preProcess() { |
| 57 |
|
|
| 58 |
|
for (int i = 0; i < avgGofr_.size(); ++i) { |
| 59 |
|
std::fill(avgGofr_[i].begin(), avgGofr_[i].end(), 0); |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
|
|
| 63 |
< |
void GofRAngle2::initalizeHistogram() { |
| 63 |
> |
void GofAngle2::initalizeHistogram() { |
| 64 |
|
npairs_ = 0; |
| 65 |
|
for (int i = 0; i < histogram_.size(); ++i) |
| 66 |
|
std::fill(histogram_[i].begin(), histogram_[i].end(), 0); |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
|
| 70 |
< |
void GofRAngle2::processHistogram() { |
| 70 |
> |
void GofAngle2::processHistogram() { |
| 71 |
|
|
| 72 |
|
//std::for_each(avgGofr_.begin(), avgGofr_.end(), std::plus<std::vector<int>>) |
| 73 |
|
|
| 74 |
|
} |
| 75 |
|
|
| 76 |
< |
void GofRAngle2::collectHistogram(StuntDouble* sd1, StuntDouble* sd2) { |
| 76 |
> |
void GofAngle2::collectHistogram(StuntDouble* sd1, StuntDouble* sd2) { |
| 77 |
|
|
| 78 |
|
if (sd1 == sd2) { |
| 79 |
|
return; |
| 102 |
|
++npairs_; |
| 103 |
|
} |
| 104 |
|
|
| 105 |
< |
void GofRAngle::writeRdf() { |
| 105 |
> |
void GofAngle2::writeRdf() { |
| 106 |
|
std::ofstream rdfStream(outputFilename_.c_str()); |
| 107 |
|
if (rdfStream.is_open()) { |
| 108 |
|
rdfStream << "#radial distribution function\n"; |