ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/primitives/StuntDouble.hpp
(Generate patch)

Comparing branches/development/src/primitives/StuntDouble.hpp (file contents):
Revision 1711 by gezelter, Sat May 19 02:58:35 2012 UTC vs.
Revision 1808 by gezelter, Mon Oct 22 20:42:10 2012 UTC

# Line 107 | Line 107 | namespace OpenMD{
107  
108      /**
109       * Sets the global index of this stuntDouble.
110 <     * @param new global index to be set
110 >     * @param index new global index to be set
111       */
112      void setGlobalIndex(int index) {
113        globalIndex_ = index;
# Line 568 | Line 568 | namespace OpenMD{
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_];
578 <    }
579 <      
576 >    Vector3d getPrevDipole() {
577 >      return ((snapshotMan_->getPrevSnapshot())->*storage_).dipole[localIndex_];
578 >    }
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_];
586 <    }
587 <
584 >    Vector3d getDipole() {
585 >      return ((snapshotMan_->getCurrentSnapshot())->*storage_).dipole[localIndex_];
586 >    }
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
# Line 877 | Line 904 | namespace OpenMD{
904      /**
905       * Sets  the previous fluctuating charge of this stuntDouble
906       * @param charge  new fluctuating charge
907 <     * @see #getflucQPos
907 >     * @see #getFlucQPos
908       */        
909      void setPrevFlucQPos(RealType charge) {
910        ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] = charge;
# Line 895 | Line 922 | namespace OpenMD{
922       * Sets  the fluctuating charge of this stuntDouble in specified snapshot
923       * @param charge fluctuating charge to be set
924       * @param snapshotNo
925 <     * @see #getflucQPos
925 >     * @see #getFlucQPos
926       */        
927      void setFlucQPos(RealType charge, int snapshotNo) {
928        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] = charge;
# Line 904 | Line 931 | namespace OpenMD{
931      /**
932       * Adds fluctuating charge into the previous fluctuating charge of this stuntDouble
933       * @param charge  new fluctuating charge
934 <     * @see #getflucQPos
934 >     * @see #getFlucQPos
935       */        
936      void addPrevFlucQPos(RealType charge) {
937        ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] += charge;
# Line 920 | Line 947 | namespace OpenMD{
947  
948      /**
949       * Adds fluctuating charge into the fluctuating charge of this stuntDouble in specified snapshot
950 <     * @param value fluctuating charge to be add
950 >     * @param charge fluctuating charge to be add
951       * @param snapshotNo
952 <     * @see #getflucQPos
952 >     * @see #getFlucQPos
953       */        
954      void addflucQPos(RealType charge, int snapshotNo) {
955        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] += charge;
# Line 957 | Line 984 | namespace OpenMD{
984      /**
985       * Sets  the previous charge velocity of this stuntDouble
986       * @param cvel  new charge velocity
987 <     * @see #getflucQVel
987 >     * @see #getFlucQVel
988       */        
989      void setPrevFlucQVel(RealType cvel) {
990        ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] = cvel;
# Line 975 | Line 1002 | namespace OpenMD{
1002       * Sets  the charge velocity of this stuntDouble in specified snapshot
1003       * @param cvel charge velocity to be set
1004       * @param snapshotNo
1005 <     * @see #getflucQVel
1005 >     * @see #getFlucQVel
1006       */        
1007      void setFlucQVel(RealType cvel, int snapshotNo) {
1008        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] = cvel;
# Line 984 | Line 1011 | namespace OpenMD{
1011      /**
1012       * Adds charge velocity into the previous charge velocity of this stuntDouble
1013       * @param cvel  new charge velocity
1014 <     * @see #getflucQVel
1014 >     * @see #getFlucQVel
1015       */        
1016      void addPrevFlucQVel(RealType cvel) {
1017        ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] += cvel;
# Line 1000 | Line 1027 | namespace OpenMD{
1027  
1028      /**
1029       * Adds charge velocity into the charge velocity of this stuntDouble in specified snapshot
1030 <     * @param value charge velocity to be add
1030 >     * @param cvel charge velocity to be add
1031       * @param snapshotNo
1032 <     * @see #getflucQVel
1032 >     * @see #getFlucQVel
1033       */        
1034      void addflucQVel(RealType cvel, int snapshotNo) {
1035        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] += cvel;
# Line 1037 | Line 1064 | namespace OpenMD{
1064      /**
1065       * Sets  the previous charge force of this stuntDouble
1066       * @param cfrc  new charge force
1067 <     * @see #getflucQFrc
1067 >     * @see #getFlucQFrc
1068       */        
1069      void setPrevFlucQFrc(RealType cfrc) {
1070        ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] = cfrc;
# Line 1055 | Line 1082 | namespace OpenMD{
1082       * Sets  the charge force of this stuntDouble in specified snapshot
1083       * @param cfrc charge force to be set
1084       * @param snapshotNo
1085 <     * @see #getflucQFrc
1085 >     * @see #getFlucQFrc
1086       */        
1087      void setFlucQFrc(RealType cfrc, int snapshotNo) {
1088        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_] = cfrc;
# Line 1063 | Line 1090 | namespace OpenMD{
1090  
1091      /**
1092       * Adds charge force into the previous charge force of this stuntDouble
1093 <     * @param cfrc  new charge force
1094 <     * @see #getflucQFrc
1093 >     * @param cfrc   charge force to be added
1094 >     * @see #getFlucQFrc
1095       */        
1096      void addPrevFlucQFrc(RealType cfrc) {
1097        ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc;
# Line 1072 | Line 1099 | namespace OpenMD{
1099        
1100      /**
1101       * Adds charge force into the current charge force of this stuntDouble
1102 <     * @param cfrc  new charge force
1102 >     * @param cfrc   charge force to be added
1103       */        
1104      void addFlucQFrc(RealType cfrc) {
1105        ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc;
# Line 1080 | Line 1107 | namespace OpenMD{
1107  
1108      /**
1109       * Adds charge force into the charge force of this stuntDouble in specified snapshot
1110 <     * @param value charge force to be add
1110 >     * @param cfrc charge force to be added
1111       * @param snapshotNo
1112 <     * @see #getflucQFrc
1112 >     * @see #getFlucQFrc
1113       */        
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      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines