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 1710 by gezelter, Fri May 18 21:44:02 2012 UTC vs.
Revision 1714 by gezelter, Sat May 19 18:12:46 2012 UTC

# Line 847 | Line 847 | namespace OpenMD{
847       */        
848      void addParticlePot(const RealType& particlePot, int snapshotNo) {
849        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_] += particlePot;
850    }      
851
852
853    /**
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;
850      }      
851  
932
852      /**
853       * Returns the previous fluctuating charge of this stuntDouble
854       * @return the fluctuating charge of this stuntDouble
# Line 1170 | Line 1089 | namespace OpenMD{
1089      }      
1090  
1091  
1092 +    /**
1093 +     * Returns the previous electric field of this stuntDouble
1094 +     * @return the electric field of this stuntDouble
1095 +     */    
1096 +    Vector3d getPrevElectricField() {
1097 +      return ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_];
1098 +    }
1099 +      
1100 +    /**
1101 +     * Returns the current electric field of this stuntDouble
1102 +     * @return the electric field of this stuntDouble
1103 +     */    
1104 +    Vector3d getElectricField() {
1105 +      return ((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_];
1106 +    }
1107  
1108 +    /**
1109 +     * Returns the electric field of this stuntDouble in specified snapshot
1110 +     * @return the electric field of this stuntDouble
1111 +     * @param snapshotNo
1112 +     */    
1113 +    Vector3d getElectricField(int snapshotNo) {
1114 +      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_];
1115 +    }
1116  
1117 +    /**
1118 +     * Sets  the previous electric field of this stuntDouble
1119 +     * @param pos  new electric field
1120 +     * @see #getElectricField
1121 +     */        
1122 +    void setPrevElectricField(const Vector3d& pos) {
1123 +      ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] = pos;
1124 +    }
1125 +      
1126 +    /**
1127 +     * Sets  the current electric field of this stuntDouble
1128 +     * @param pos  new electric field
1129 +     */        
1130 +    void setElectricField(const Vector3d& pos) {
1131 +      DataStorage&  data = snapshotMan_->getCurrentSnapshot()->*storage_;
1132 +      data.electricField[localIndex_] = pos;
1133 +      //((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] = pos;
1134 +    }
1135 +
1136 +    /**
1137 +     * Sets  the electric field of this stuntDouble in specified snapshot
1138 +     * @param pos electric field to be set
1139 +     * @param snapshotNo
1140 +     * @see #getElectricField
1141 +     */        
1142 +    void setElectricField(const Vector3d& pos, int snapshotNo) {
1143 +
1144 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] = pos;
1145 +
1146 +    }
1147 +
1148 +
1149      /** Set the force of this stuntDouble to zero */
1150      void zeroForcesAndTorques();
1151      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines