42 |
|
#include "applications/dynamicProps/RCorrFunc.hpp" |
43 |
|
|
44 |
|
namespace oopse { |
45 |
< |
RCorrFunc::RCorrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) |
46 |
< |
: CorrelationFunction(info, filename, sele1, sele2, DataStorage::dslPosition){ |
45 |
> |
RCorrFunc::RCorrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) |
46 |
> |
: ParticleTimeCorrFunc(info, filename, sele1, sele2, DataStorage::dslPosition){ |
47 |
|
|
48 |
< |
setCorrFuncType("RCorrFunc"); |
49 |
< |
setOutputName(getPrefix(dumpFilename_) + ".rcf"); |
48 |
> |
setCorrFuncType("RCorrFunc"); |
49 |
> |
setOutputName(getPrefix(dumpFilename_) + ".rcorr"); |
50 |
|
|
51 |
< |
} |
51 |
> |
} |
52 |
|
|
53 |
< |
double RCorrFunc::calcCorrVal(StuntDouble* sd1, int frame1, StuntDouble* sd2, int frame2) { |
53 |
> |
double RCorrFunc::calcCorrVal(int frame1, int frame2, StuntDouble* sd1, StuntDouble* sd2) { |
54 |
|
Vector3d r1 =sd1->getPos(frame1); |
55 |
|
Vector3d r2 = sd2->getPos(frame2); |
56 |
|
|
57 |
< |
return (r1-r2).lengthSquare(); |
58 |
< |
} |
57 |
> |
return dot(r1, r2); |
58 |
> |
} |
59 |
|
|
60 |
– |
void RCorrFunc::postCorrelate(){ |
61 |
– |
CorrelationFunction::postCorrelate(); |
62 |
– |
calcDiffConst(); |
60 |
|
} |
64 |
– |
|
65 |
– |
void RCorrFunc::calcDiffConst() { |
66 |
– |
|
67 |
– |
} |
68 |
– |
|
69 |
– |
} |