| 38 |  | * University of Notre Dame has been advised of the possibility of | 
| 39 |  | * such damages. | 
| 40 |  | */ | 
| 41 | < | #ifndef APPLICATIONS_STATICPROPS_GOFANGLE_HPP | 
| 42 | < | #define APPLICATIONS_STATICPROPS_GOFANGLE_HPP | 
| 41 | > | #ifndef APPLICATIONS_STATICPROPS_GOFRANGLE_HPP | 
| 42 | > | #define APPLICATIONS_STATICPROPS_GOFRANGLE_HPP | 
| 43 |  |  | 
| 44 | < | #include "application/staticProps/RadialDistrFunc.hpp" | 
| 44 | > | #include "applications/staticProps/RadialDistrFunc.hpp" | 
| 45 |  | namespace oopse { | 
| 46 |  |  | 
| 47 | < | class GofRAngle : public RadialDistrFunc { | 
| 47 | > | class GofRAngle : public RadialDistrFunc { | 
| 48 |  |  | 
| 49 | < | public: | 
| 50 | < | GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2); | 
| 49 | > | public: | 
| 50 | > | GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, double len, int nrbins, int nangleBins); | 
| 51 |  |  | 
| 52 | < | void setNRBins(int nbins) { | 
| 53 | < | assert(nbins > 0); | 
| 54 | < | nRBins_ = nbins; | 
| 55 | < | deltaR_ = len_ / nRBins_; | 
| 56 | < | for (int i = 0 ; i < nRBins_; ++i) { | 
| 57 | < | histogram_[i].resize(nAngleBins_); | 
| 58 | < | avgGofr_[i].resize(nAngleBins_); | 
| 59 | < | } | 
| 60 | < | } | 
| 52 | > | int getNRBins() { | 
| 53 | > | return nRBins_; | 
| 54 | > | } | 
| 55 |  |  | 
| 56 | < | int getNRBins() { | 
| 57 | < | return nRBins_; | 
| 58 | < | } | 
| 56 | > | double getLength() { | 
| 57 | > | return len_; | 
| 58 | > | } | 
| 59 | > |  | 
| 60 | > | int getNAngleBins() {return nAngleBins_;} | 
| 61 |  |  | 
| 62 | < | void setNAngleBins(int nbins) { | 
| 67 | < | assert(nbins >0); | 
| 68 | < | nAngleBins_ = nbins; | 
| 69 | < | deltaCosAngle_ = 2.0 / nAngleBins_; | 
| 70 | < | for (int i = 0 ; i < nRBins_; ++i) { | 
| 71 | < | histogram_[i].resize(nAngleBins_); | 
| 72 | < | avgGofr_[i].resize(nAngleBins_); | 
| 73 | < | } | 
| 74 | < | } | 
| 75 | < |  | 
| 76 | < | int getNAngleBins() {return nAngleBins_;} | 
| 77 | < |  | 
| 78 | < | private: | 
| 62 | > | private: | 
| 63 |  |  | 
| 64 | < | virtual void preProcess(); | 
| 65 | < | virtual void initalizeHistogram(); | 
| 66 | < | virtual void collectHistogram(StuntDouble* sd1, StuntDouble* sd2); | 
| 67 | < | virtual void processHistogram(); | 
| 64 | > | virtual void preProcess(); | 
| 65 | > | virtual void initalizeHistogram(); | 
| 66 | > | virtual void collectHistogram(StuntDouble* sd1, StuntDouble* sd2); | 
| 67 | > | virtual void processHistogram(); | 
| 68 |  |  | 
| 69 | < | virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2) = 0; | 
| 69 | > | virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2) = 0; | 
| 70 |  |  | 
| 71 | < | virtual void writeRdf(); | 
| 71 | > | virtual void writeRdf(); | 
| 72 |  |  | 
| 73 | < | double deltaCosAngle_; | 
| 74 | < | int nAngleBins_; | 
| 75 | < | double len_; | 
| 76 | < | int nRBins_; | 
| 77 | < | double deltaR_; | 
| 73 | > | double deltaCosAngle_; | 
| 74 | > | int nAngleBins_; | 
| 75 | > | double len_; | 
| 76 | > | int nRBins_; | 
| 77 | > | double deltaR_; | 
| 78 |  |  | 
| 79 | < | std::vector<std::vector<int> > histogram_; | 
| 80 | < | std::vector<std::vector<double> > avgGofr_; | 
| 81 | < | int npairs_; | 
| 82 | < | }; | 
| 79 | > | std::vector<std::vector<int> > histogram_; | 
| 80 | > | std::vector<std::vector<double> > avgGofr_; | 
| 81 | > | int npairs_; | 
| 82 | > | }; | 
| 83 |  |  | 
| 84 |  |  | 
| 85 | < | class GofRTheta : GofRAngle { | 
| 86 | < | public: | 
| 87 | < | GofRTheta(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, double len); | 
| 85 | > | class GofRTheta : public GofRAngle { | 
| 86 | > | public: | 
| 87 | > | GofRTheta(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, double len, int nrbins, int nangleBins) | 
| 88 | > | : GofRAngle (info, filename, sele1, sele2, len, nrbins, nangleBins) { | 
| 89 | > | setOutputName(getPrefix(filename) + ".gofrt"); | 
| 90 | > | } | 
| 91 | > |  | 
| 92 | > | private: | 
| 93 |  |  | 
| 94 | < | private: | 
| 94 | > | virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2); | 
| 95 | > | }; | 
| 96 |  |  | 
| 107 | – | virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2); | 
| 108 | – | }; | 
| 97 |  |  | 
| 98 | + | class GofROmega : public GofRAngle { | 
| 99 | + | public: | 
| 100 | + | GofROmega(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, double len, int nrbins, int nangleBins) | 
| 101 | + | : GofRAngle (info, filename, sele1, sele2, len, nrbins, nangleBins) { | 
| 102 | + | setOutputName(getPrefix(filename) + ".gofro"); | 
| 103 | + | } | 
| 104 | + |  | 
| 105 | + | private: | 
| 106 | + | virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2); | 
| 107 | + | }; | 
| 108 |  |  | 
| 111 | – | class GofROmega : GofRAngle { | 
| 112 | – | public: | 
| 113 | – | GofROmega(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, double len); | 
| 114 | – |  | 
| 115 | – | private: | 
| 116 | – |  | 
| 117 | – | virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2); | 
| 118 | – | }; | 
| 119 | – |  | 
| 109 |  | } | 
| 110 |  | #endif | 
| 111 |  |  |