45 |
|
|
46 |
|
namespace oopse { |
47 |
|
|
48 |
< |
RadialDistrFunc:: RadialDistrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, double len) |
49 |
< |
: info_(info), currentSnapshot_(NULL), dumpFilename_(filename), len_(len), nbins_(50), step_(1), |
48 |
> |
RadialDistrFunc:: RadialDistrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) |
49 |
> |
: info_(info), currentSnapshot_(NULL), dumpFilename_(filename), step_(1), |
50 |
|
selectionScript1_(sele1), selectionScript2_(sele2), evaluator1_(info), evaluator2_(info){ |
51 |
|
|
52 |
|
evaluator1_.loadScriptString(sele1); |
59 |
|
seleMan2_.setSelectionSet(evaluator2_->evaluate()); |
60 |
|
} |
61 |
|
|
62 |
– |
delta_ = len_ /nbins_; |
62 |
|
} |
63 |
|
|
64 |
|
void RadialDistrFunc::process() { |
67 |
|
|
68 |
|
DumpReader reader(info_, dumpFilename_); |
69 |
|
int nFrames = reader->getNFrames(); |
70 |
< |
|
70 |
> |
nProcessed_ = nFrames / step_ + 1; |
71 |
|
for (int i = 0; i < nFrames; i += step_) { |
72 |
|
reader->readFrame(i); |
73 |
|
currentSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot(); |
98 |
|
|
99 |
|
postProcess(); |
100 |
|
|
101 |
< |
|
101 |
> |
writeRdf(); |
102 |
|
} |
103 |
|
|
104 |
|
} |