41 |
|
#ifndef APPLICATIONS_STATICPROPS_RADIALDISTRFUNC_HPP |
42 |
|
#define APPLICATIONS_STATICPROPS_RADIALDISTRFUNC_HPP |
43 |
|
|
44 |
+ |
#include <string> |
45 |
|
#include <vector> |
46 |
|
|
47 |
|
#include "selection/SelectionEvaluator.hpp" |
48 |
|
#include "selection/SelectionManager.hpp" |
49 |
+ |
#include "utils/NumericConstant.hpp" |
50 |
|
namespace oopse { |
51 |
|
|
52 |
< |
/** |
53 |
< |
* @class RadialDistrFunc |
54 |
< |
* @brief Radial Distribution Function |
55 |
< |
*/ |
56 |
< |
class RadialDistrFunc { |
57 |
< |
public: |
58 |
< |
RadialDistrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2. double len); |
52 |
> |
/** |
53 |
> |
* @class RadialDistrFunc |
54 |
> |
* @brief Radial Distribution Function |
55 |
> |
*/ |
56 |
> |
class RadialDistrFunc { |
57 |
> |
public: |
58 |
> |
RadialDistrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2); |
59 |
|
|
60 |
< |
void process(); |
60 |
> |
virtual ~RadialDistrFunc() {} |
61 |
> |
|
62 |
> |
void process(); |
63 |
|
|
64 |
< |
void setNBins(int nbins) { |
65 |
< |
assert(nbins > 0); |
66 |
< |
nbins_ = nbins; |
63 |
< |
delta_ = len_ / nbins_; |
64 |
< |
} |
64 |
> |
void setOutputName(const std::string& filename) { |
65 |
> |
outputFilename_ = filename; |
66 |
> |
} |
67 |
|
|
68 |
< |
int getNBins() { |
69 |
< |
return nbins_; |
70 |
< |
} |
68 |
> |
const std::string& getOutputFileName() const { |
69 |
> |
return outputFilename_; |
70 |
> |
} |
71 |
> |
|
72 |
> |
void setStep(int step) { |
73 |
> |
assert(step > 0); |
74 |
> |
step_ =step; |
75 |
> |
} |
76 |
|
|
77 |
< |
void setOutputName(const std::string& filename) { |
71 |
< |
outputFilename_ = filename; |
72 |
< |
} |
77 |
> |
protected: |
78 |
|
|
79 |
< |
const std::string& getOutputFileName() const { |
80 |
< |
return outputFilename_; |
76 |
< |
} |
79 |
> |
virtual void preProcess() {} |
80 |
> |
virtual void postProcess() {} |
81 |
|
|
82 |
< |
void setStep(int step) { |
79 |
< |
assert(step > 0); |
80 |
< |
step_ =step; |
81 |
< |
} |
82 |
> |
int getNPairs() { return nPairs_;} |
83 |
|
|
84 |
< |
protected: |
84 |
> |
SimInfo* info_; |
85 |
> |
Snapshot* currentSnapshot_; |
86 |
|
|
87 |
< |
virtual void preProcess() {} |
88 |
< |
virtual void postProcess() {} |
89 |
< |
|
90 |
< |
SimInfo* info_; |
91 |
< |
Snapshot* currentSnapshot_; |
92 |
< |
double len_; |
93 |
< |
int nbins_; |
94 |
< |
double delta_; |
93 |
< |
std::string dumpFilename_; |
94 |
< |
std::string outputFilename_; |
95 |
< |
int step_; |
96 |
< |
std::string selectionScript1_; |
97 |
< |
std::string selectionScript2_; |
87 |
> |
std::string dumpFilename_; |
88 |
> |
std::string outputFilename_; |
89 |
> |
int step_; |
90 |
> |
std::string selectionScript1_; |
91 |
> |
std::string selectionScript2_; |
92 |
> |
int nProcessed_; |
93 |
> |
SelectionManager seleMan1_; |
94 |
> |
SelectionManager seleMan2_; |
95 |
|
|
96 |
< |
private: |
96 |
> |
private: |
97 |
|
|
98 |
< |
virtual void initalizeHistogram() {} |
99 |
< |
virtual void collectHistogram(StuntDouble* sd1, StuntDouble* sd2) =0; |
100 |
< |
virtual void processHistogram() = 0; |
98 |
> |
virtual void initalizeHistogram() {} |
99 |
> |
virtual void collectHistogram(StuntDouble* sd1, StuntDouble* sd2) =0; |
100 |
> |
virtual void processHistogram() {} |
101 |
> |
void processNonOverlapping(SelectionManager& sman1, SelectionManager& sman2); |
102 |
> |
void processOverlapping(SelectionManager& sman); |
103 |
|
|
104 |
< |
virtual void writeRdf() = 0; |
104 |
> |
virtual void validateSelection1(SelectionManager& sman) {} |
105 |
> |
virtual void validateSelection2(SelectionManager& sman) {} |
106 |
> |
virtual void writeRdf() = 0; |
107 |
|
|
108 |
|
|
109 |
< |
SelectionEvaluator evaluator1_; |
110 |
< |
SelectionEvaluator evaluator2_; |
110 |
< |
SelectionManager seleMan1_; |
111 |
< |
SelectionManager seleMan2_; |
112 |
< |
|
113 |
< |
}; |
109 |
> |
SelectionEvaluator evaluator1_; |
110 |
> |
SelectionEvaluator evaluator2_; |
111 |
|
|
112 |
+ |
SelectionManager sele1_minus_common_; |
113 |
+ |
SelectionManager sele2_minus_common_; |
114 |
+ |
SelectionManager common_; |
115 |
+ |
int nPairs_; |
116 |
+ |
}; |
117 |
|
|
118 |
+ |
|
119 |
|
} |
120 |
|
#endif |