568 |
|
void setEuler(const Vector3d& euler, int snapshotNo) { |
569 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] = euler; |
570 |
|
} |
571 |
< |
|
571 |
> |
|
572 |
|
/** |
573 |
< |
* Returns the previous unit vectors of this stuntDouble |
574 |
< |
* @return the unit vectors of this stuntDouble |
573 |
> |
* Returns the previous dipole vector of this stuntDouble |
574 |
> |
* @return the dipole vector of this stuntDouble |
575 |
|
*/ |
576 |
< |
RotMat3x3d getPrevElectroFrame() { |
577 |
< |
return ((snapshotMan_->getPrevSnapshot())->*storage_).electroFrame[localIndex_]; |
576 |
> |
Vector3d getPrevDipole() { |
577 |
> |
return ((snapshotMan_->getPrevSnapshot())->*storage_).dipole[localIndex_]; |
578 |
|
} |
579 |
< |
|
579 |
> |
|
580 |
|
/** |
581 |
< |
* Returns the current unit vectors of this stuntDouble |
582 |
< |
* @return the unit vectors of this stuntDouble |
581 |
> |
* Returns the current dipole vector of this stuntDouble |
582 |
> |
* @return the dipole vector of this stuntDouble |
583 |
|
*/ |
584 |
< |
RotMat3x3d getElectroFrame() { |
585 |
< |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).electroFrame[localIndex_]; |
584 |
> |
Vector3d getDipole() { |
585 |
> |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).dipole[localIndex_]; |
586 |
|
} |
587 |
< |
|
587 |
> |
|
588 |
|
/** |
589 |
< |
* Returns the unit vectors of this stuntDouble in specified snapshot |
589 |
> |
* Returns the dipole vector of this stuntDouble in specified snapshot |
590 |
|
* |
591 |
< |
* @return the unit vectors of this stuntDouble |
591 |
> |
* @return the dipole vector of this stuntDouble |
592 |
|
* @param snapshotNo |
593 |
|
*/ |
594 |
< |
RotMat3x3d getElectroFrame(int snapshotNo) { |
595 |
< |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electroFrame[localIndex_]; |
594 |
> |
Vector3d getDipole(int snapshotNo) { |
595 |
> |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).dipole[localIndex_]; |
596 |
|
} |
597 |
|
|
598 |
+ |
|
599 |
+ |
/** |
600 |
+ |
* Returns the previous quadrupole tensor of this stuntDouble |
601 |
+ |
* @return the quadrupole tensor of this stuntDouble |
602 |
+ |
*/ |
603 |
+ |
Mat3x3d getPrevQuadrupole() { |
604 |
+ |
return ((snapshotMan_->getPrevSnapshot())->*storage_).quadrupole[localIndex_]; |
605 |
+ |
} |
606 |
+ |
|
607 |
+ |
/** |
608 |
+ |
* Returns the current quadrupole tensor of this stuntDouble |
609 |
+ |
* @return the quadrupole tensor of this stuntDouble |
610 |
+ |
*/ |
611 |
+ |
Mat3x3d getQuadrupole() { |
612 |
+ |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).quadrupole[localIndex_]; |
613 |
+ |
} |
614 |
+ |
|
615 |
+ |
/** |
616 |
+ |
* Returns the quadrupole tensor of this stuntDouble in specified snapshot |
617 |
+ |
* |
618 |
+ |
* @return the quadrupole tensor of this stuntDouble |
619 |
+ |
* @param snapshotNo |
620 |
+ |
*/ |
621 |
+ |
Mat3x3d getQuadrupole(int snapshotNo) { |
622 |
+ |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).quadrupole[localIndex_]; |
623 |
+ |
} |
624 |
+ |
|
625 |
|
/** |
626 |
|
* Returns the previous force of this stuntDouble |
627 |
|
* @return the force of this stuntDouble |
876 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_] += particlePot; |
877 |
|
} |
878 |
|
|
852 |
– |
|
879 |
|
/** |
854 |
– |
* Returns the previous z-angle of this stuntDouble |
855 |
– |
* @return the z-angle of this stuntDouble |
856 |
– |
*/ |
857 |
– |
RealType getPrevZangle() { |
858 |
– |
return ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_]; |
859 |
– |
} |
860 |
– |
|
861 |
– |
/** |
862 |
– |
* Returns the current z-angle of this stuntDouble |
863 |
– |
* @return the z-angle of this stuntDouble |
864 |
– |
*/ |
865 |
– |
RealType getZangle() { |
866 |
– |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_]; |
867 |
– |
} |
868 |
– |
|
869 |
– |
/** |
870 |
– |
* Returns the z-angle of this stuntDouble in specified snapshot |
871 |
– |
* @return the z-angle of this stuntDouble |
872 |
– |
* @param snapshotNo |
873 |
– |
*/ |
874 |
– |
RealType getZangle(int snapshotNo) { |
875 |
– |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_]; |
876 |
– |
} |
877 |
– |
|
878 |
– |
/** |
879 |
– |
* Sets the previous z-angle of this stuntDouble |
880 |
– |
* @param angle new z-angle |
881 |
– |
* @see #getZangle |
882 |
– |
*/ |
883 |
– |
void setPrevZangle(RealType angle) { |
884 |
– |
((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] = angle; |
885 |
– |
} |
886 |
– |
|
887 |
– |
/** |
888 |
– |
* Sets the current z-angle of this stuntDouble |
889 |
– |
* @param angle new z-angle |
890 |
– |
*/ |
891 |
– |
void setZangle(RealType angle) { |
892 |
– |
((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] = angle; |
893 |
– |
} |
894 |
– |
|
895 |
– |
/** |
896 |
– |
* Sets the z-angle of this stuntDouble in specified snapshot |
897 |
– |
* @param angle z-angle to be set |
898 |
– |
* @param snapshotNo |
899 |
– |
* @see #getZangle |
900 |
– |
*/ |
901 |
– |
void setZangle(RealType angle, int snapshotNo) { |
902 |
– |
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] = angle; |
903 |
– |
} |
904 |
– |
|
905 |
– |
/** |
906 |
– |
* Adds z-angle into the previous z-angle of this stuntDouble |
907 |
– |
* @param angle new z-angle |
908 |
– |
* @see #getZangle |
909 |
– |
*/ |
910 |
– |
void addPrevZangle(RealType angle) { |
911 |
– |
((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] += angle; |
912 |
– |
} |
913 |
– |
|
914 |
– |
/** |
915 |
– |
* Adds z-angle into the current z-angle of this stuntDouble |
916 |
– |
* @param angle new z-angle |
917 |
– |
*/ |
918 |
– |
void addZangle(RealType angle) { |
919 |
– |
((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] += angle; |
920 |
– |
} |
921 |
– |
|
922 |
– |
/** |
923 |
– |
* Adds z-angle into the z-angle of this stuntDouble in specified snapshot |
924 |
– |
* @param angle z-angle to be add |
925 |
– |
* @param snapshotNo |
926 |
– |
* @see #getZangle |
927 |
– |
*/ |
928 |
– |
void addZangle(RealType angle, int snapshotNo) { |
929 |
– |
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] += angle; |
930 |
– |
} |
931 |
– |
|
932 |
– |
|
933 |
– |
/** |
880 |
|
* Returns the previous fluctuating charge of this stuntDouble |
881 |
|
* @return the fluctuating charge of this stuntDouble |
882 |
|
*/ |
1114 |
|
void addflucQFrc(RealType cfrc, int snapshotNo) { |
1115 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_] += cfrc; |
1116 |
|
} |
1117 |
+ |
|
1118 |
+ |
|
1119 |
+ |
/** |
1120 |
+ |
* Returns the previous electric field of this stuntDouble |
1121 |
+ |
* @return the electric field of this stuntDouble |
1122 |
+ |
*/ |
1123 |
+ |
Vector3d getPrevElectricField() { |
1124 |
+ |
return ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_]; |
1125 |
+ |
} |
1126 |
+ |
|
1127 |
+ |
/** |
1128 |
+ |
* Returns the current electric field of this stuntDouble |
1129 |
+ |
* @return the electric field of this stuntDouble |
1130 |
+ |
*/ |
1131 |
+ |
Vector3d getElectricField() { |
1132 |
+ |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_]; |
1133 |
+ |
} |
1134 |
|
|
1135 |
+ |
/** |
1136 |
+ |
* Returns the electric field of this stuntDouble in specified snapshot |
1137 |
+ |
* @return the electric field of this stuntDouble |
1138 |
+ |
* @param snapshotNo |
1139 |
+ |
*/ |
1140 |
+ |
Vector3d getElectricField(int snapshotNo) { |
1141 |
+ |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_]; |
1142 |
+ |
} |
1143 |
|
|
1144 |
+ |
/** |
1145 |
+ |
* Sets the previous electric field of this stuntDouble |
1146 |
+ |
* @param pos new electric field |
1147 |
+ |
* @see #getElectricField |
1148 |
+ |
*/ |
1149 |
+ |
void setPrevElectricField(const Vector3d& pos) { |
1150 |
+ |
((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] = pos; |
1151 |
+ |
} |
1152 |
+ |
|
1153 |
+ |
/** |
1154 |
+ |
* Sets the current electric field of this stuntDouble |
1155 |
+ |
* @param pos new electric field |
1156 |
+ |
*/ |
1157 |
+ |
void setElectricField(const Vector3d& pos) { |
1158 |
+ |
DataStorage& data = snapshotMan_->getCurrentSnapshot()->*storage_; |
1159 |
+ |
data.electricField[localIndex_] = pos; |
1160 |
+ |
//((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] = pos; |
1161 |
+ |
} |
1162 |
|
|
1163 |
+ |
/** |
1164 |
+ |
* Sets the electric field of this stuntDouble in specified snapshot |
1165 |
+ |
* @param pos electric field to be set |
1166 |
+ |
* @param snapshotNo |
1167 |
+ |
* @see #getElectricField |
1168 |
+ |
*/ |
1169 |
+ |
void setElectricField(const Vector3d& pos, int snapshotNo) { |
1170 |
|
|
1171 |
+ |
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] = pos; |
1172 |
+ |
|
1173 |
+ |
} |
1174 |
+ |
|
1175 |
+ |
|
1176 |
|
/** Set the force of this stuntDouble to zero */ |
1177 |
|
void zeroForcesAndTorques(); |
1178 |
|
/** |