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

Comparing:
trunk/src/primitives/StuntDouble.hpp (file contents), Revision 1245 by chuckv, Tue May 27 16:39:06 2008 UTC vs.
branches/development/src/primitives/StuntDouble.hpp (file contents), Revision 1839 by gezelter, Fri Jan 25 15:21:04 2013 UTC

# Line 6 | Line 6
6   * redistribute this software in source and binary code form, provided
7   * that the following conditions are met:
8   *
9 < * 1. Acknowledgement of the program authors must be made in any
10 < *    publication of scientific results based in part on use of the
11 < *    program.  An acceptable form of acknowledgement is citation of
12 < *    the article in which the program was described (Matthew
13 < *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
14 < *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
15 < *    Parallel Simulation Engine for Molecular Dynamics,"
16 < *    J. Comput. Chem. 26, pp. 252-271 (2005))
17 < *
18 < * 2. Redistributions of source code must retain the above copyright
9 > * 1. Redistributions of source code must retain the above copyright
10   *    notice, this list of conditions and the following disclaimer.
11   *
12 < * 3. Redistributions in binary form must reproduce the above copyright
12 > * 2. Redistributions in binary form must reproduce the above copyright
13   *    notice, this list of conditions and the following disclaimer in the
14   *    documentation and/or other materials provided with the
15   *    distribution.
# Line 37 | Line 28
28   * arising out of the use of or inability to use software, even if the
29   * University of Notre Dame has been advised of the possibility of
30   * such damages.
31 + *
32 + * SUPPORT OPEN SCIENCE!  If you use OpenMD or its source code in your
33 + * research, please cite the appropriate papers when you publish your
34 + * work.  Good starting points are:
35 + *                                                                      
36 + * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37 + * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 + * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 + * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 + * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   /**
# Line 58 | Line 59
59   #include "utils/PropertyMap.hpp"
60   #include "brains/Snapshot.hpp"
61   #include "brains/SnapshotManager.hpp"
62 < namespace oopse{
62 > namespace OpenMD{
63  
64  
65    
# Line 106 | Line 107 | namespace oopse{
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 567 | Line 568 | namespace oopse{
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
583 <     */    
584 <    RotMat3x3d getElectroFrame() {
585 <      return ((snapshotMan_->getCurrentSnapshot())->*storage_).electroFrame[localIndex_];
581 >     * Returns the current dipole vector of this stuntDouble
582 >     * @return the dipole vector of this stuntDouble
583 >     */    
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
# Line 763 | Line 791 | namespace oopse{
791      }      
792  
793  
794 +
795      /**
796 <     * Returns the previous z-angle of this stuntDouble
797 <     * @return the z-angle of this stuntDouble
796 >     * Returns the previous particlePot of this stuntDouble
797 >     * @return the particlePot of this stuntDouble
798       */    
799 <    RealType getPrevZangle() {
800 <      return ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_];
799 >    RealType getPrevParticlePot() {
800 >      return ((snapshotMan_->getPrevSnapshot())->*storage_).particlePot[localIndex_];
801      }
802        
803      /**
804 <     * Returns the current z-angle of this stuntDouble
805 <     * @return the z-angle of this stuntDouble
804 >     * Returns the current particlePot of this stuntDouble
805 >     * @return the particlePot of this stuntDouble
806       */    
807 <    RealType getZangle() {
808 <      return ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_];
807 >    RealType getParticlePot() {
808 >      return ((snapshotMan_->getCurrentSnapshot())->*storage_).particlePot[localIndex_];
809      }
810  
811      /**
812 <     * Returns the z-angle of this stuntDouble in specified snapshot
813 <     * @return the z-angle of this stuntDouble
812 >     * Returns the particlePot of this stuntDouble in specified snapshot
813 >     *
814 >     * @return the particlePot of this stuntDouble
815       * @param snapshotNo
816       */    
817 <    RealType getZangle(int snapshotNo) {
818 <      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_];
817 >    RealType getParticlePot(int snapshotNo) {
818 >      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_];
819      }
820  
821      /**
822 <     * Sets  the previous z-angle of this stuntDouble
823 <     * @param angle  new z-angle
824 <     * @see #getZangle
822 >     * Sets  the previous particlePot of this stuntDouble
823 >     *
824 >     * @param particlePot  new particlePot
825 >     * @see #getParticlePot
826       */        
827 <    void setPrevZangle(RealType angle) {
828 <      ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] = angle;
827 >    void setPrevParticlePot(const RealType& particlePot) {
828 >      ((snapshotMan_->getPrevSnapshot())->*storage_).particlePot[localIndex_] = particlePot;
829      }
830        
831      /**
832 <     * Sets  the current z-angle of this stuntDouble
833 <     * @param angle  new z-angle
832 >     * Sets  the current particlePot of this stuntDouble
833 >     * @param particlePot  new particlePot
834       */        
835 <    void setZangle(RealType angle) {
836 <      ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] = angle;
835 >    void setParticlePot(const RealType& particlePot) {
836 >      ((snapshotMan_->getCurrentSnapshot())->*storage_).particlePot[localIndex_] = particlePot;
837      }
838  
839      /**
840 <     * Sets  the z-angle of this stuntDouble in specified snapshot
841 <     * @param angle z-angle to be set
840 >     * Sets  the particlePot of this stuntDouble in specified snapshot
841 >     *
842 >     * @param particlePot particlePot to be set
843       * @param snapshotNo
844 <     * @see #getZangle
844 >     * @see #getParticlePot
845       */        
846 <    void setZangle(RealType angle, int snapshotNo) {
847 <      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] = angle;
846 >    void setParticlePot(const RealType& particlePot, int snapshotNo) {
847 >      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_] = particlePot;
848      }
849  
850      /**
851 <     * Adds z-angle into the previous z-angle of this stuntDouble
852 <     * @param angle  new z-angle
853 <     * @see #getZangle
851 >     * Adds particlePot into the previous particlePot of this stuntDouble
852 >     *
853 >     * @param particlePot  new particlePot
854 >     * @see #getParticlePot
855       */        
856 <    void addPrevZangle(RealType angle) {
857 <      ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] += angle;
856 >    void addPrevParticlePot(const RealType& particlePot) {
857 >      ((snapshotMan_->getPrevSnapshot())->*storage_).particlePot[localIndex_] += particlePot;
858      }
859        
860      /**
861 <     * Adds z-angle into the current z-angle of this stuntDouble
862 <     * @param angle  new z-angle
861 >     * Adds particlePot into the current particlePot of this stuntDouble
862 >     * @param particlePot  new particlePot
863       */        
864 <    void addZangle(RealType angle) {
865 <      ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] += angle;
864 >    void addParticlePot(const RealType& particlePot) {
865 >      ((snapshotMan_->getCurrentSnapshot())->*storage_).particlePot[localIndex_] += particlePot;
866      }
867  
868      /**
869 <     * Adds z-angle into the z-angle of this stuntDouble in specified snapshot
870 <     * @param angle z-angle to be add
869 >     * Adds particlePot into the particlePot of this stuntDouble in specified snapshot
870 >     *
871 >     * @param particlePot particlePot to be add
872       * @param snapshotNo
873 <     * @see #getZangle
873 >     * @see #getParticlePot
874       */        
875 <    void addZangle(RealType angle, int snapshotNo) {
876 <      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] += angle;
875 >    void addParticlePot(const RealType& particlePot, int snapshotNo) {
876 >      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_] += particlePot;
877      }      
878  
879 +    /**
880 +     * Returns the previous fluctuating charge of this stuntDouble
881 +     * @return the fluctuating charge of this stuntDouble
882 +     */    
883 +    RealType getPrevFlucQPos() {
884 +      return ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_];
885 +    }
886 +      
887 +    /**
888 +     * Returns the current fluctuating charge of this stuntDouble
889 +     * @return the fluctuating charge of this stuntDouble
890 +     */    
891 +    RealType getFlucQPos() {
892 +      return ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_];
893 +    }
894 +
895 +    /**
896 +     * Returns the fluctuating charge of this stuntDouble in specified snapshot
897 +     * @return the fluctuating charge of this stuntDouble
898 +     * @param snapshotNo
899 +     */    
900 +    RealType getFlucQPos(int snapshotNo) {
901 +      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_];
902 +    }
903 +
904 +    /**
905 +     * Sets  the previous fluctuating charge of this stuntDouble
906 +     * @param charge  new fluctuating charge
907 +     * @see #getFlucQPos
908 +     */        
909 +    void setPrevFlucQPos(RealType charge) {
910 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] = charge;
911 +    }
912 +      
913 +    /**
914 +     * Sets  the current fluctuating charge of this stuntDouble
915 +     * @param charge  new fluctuating charge
916 +     */        
917 +    void setFlucQPos(RealType charge) {
918 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_] = charge;
919 +    }
920 +
921 +    /**
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
926 +     */        
927 +    void setFlucQPos(RealType charge, int snapshotNo) {
928 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] = charge;
929 +    }
930 +
931 +    /**
932 +     * Adds fluctuating charge into the previous fluctuating charge of this stuntDouble
933 +     * @param charge  new fluctuating charge
934 +     * @see #getFlucQPos
935 +     */        
936 +    void addPrevFlucQPos(RealType charge) {
937 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] += charge;
938 +    }
939 +      
940 +    /**
941 +     * Adds fluctuating charge into the current fluctuating charge of this stuntDouble
942 +     * @param charge  new fluctuating charge
943 +     */        
944 +    void addFlucQPos(RealType charge) {
945 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_] += charge;
946 +    }
947 +
948 +    /**
949 +     * Adds fluctuating charge into the fluctuating charge of this stuntDouble in specified snapshot
950 +     * @param charge fluctuating charge to be add
951 +     * @param snapshotNo
952 +     * @see #getFlucQPos
953 +     */        
954 +    void addflucQPos(RealType charge, int snapshotNo) {
955 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] += charge;
956 +    }      
957 +
958 +
959 +    /**
960 +     * Returns the previous charge velocity of this stuntDouble
961 +     * @return the charge velocity of this stuntDouble
962 +     */    
963 +    RealType getPrevFlucQVel() {
964 +      return ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_];
965 +    }
966 +      
967 +    /**
968 +     * Returns the current charge velocity of this stuntDouble
969 +     * @return the charge velocity of this stuntDouble
970 +     */    
971 +    RealType getFlucQVel() {
972 +      return ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_];
973 +    }
974 +
975 +    /**
976 +     * Returns the charge velocity of this stuntDouble in specified snapshot
977 +     * @return the charge velocity of this stuntDouble
978 +     * @param snapshotNo
979 +     */    
980 +    RealType getFlucQVel(int snapshotNo) {
981 +      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_];
982 +    }
983 +
984 +    /**
985 +     * Sets  the previous charge velocity of this stuntDouble
986 +     * @param cvel  new charge velocity
987 +     * @see #getFlucQVel
988 +     */        
989 +    void setPrevFlucQVel(RealType cvel) {
990 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] = cvel;
991 +    }
992 +      
993 +    /**
994 +     * Sets  the current charge velocity of this stuntDouble
995 +     * @param cvel  new charge velocity
996 +     */        
997 +    void setFlucQVel(RealType cvel) {
998 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_] = cvel;
999 +    }
1000 +
1001 +    /**
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
1006 +     */        
1007 +    void setFlucQVel(RealType cvel, int snapshotNo) {
1008 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] = cvel;
1009 +    }
1010 +
1011 +    /**
1012 +     * Adds charge velocity into the previous charge velocity of this stuntDouble
1013 +     * @param cvel  new charge velocity
1014 +     * @see #getFlucQVel
1015 +     */        
1016 +    void addPrevFlucQVel(RealType cvel) {
1017 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] += cvel;
1018 +    }
1019 +      
1020 +    /**
1021 +     * Adds charge velocity into the current charge velocity of this stuntDouble
1022 +     * @param cvel  new charge velocity
1023 +     */        
1024 +    void addFlucQVel(RealType cvel) {
1025 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_] += cvel;
1026 +    }
1027 +
1028 +    /**
1029 +     * Adds charge velocity into the charge velocity of this stuntDouble in specified snapshot
1030 +     * @param cvel charge velocity to be add
1031 +     * @param snapshotNo
1032 +     * @see #getFlucQVel
1033 +     */        
1034 +    void addflucQVel(RealType cvel, int snapshotNo) {
1035 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] += cvel;
1036 +    }      
1037 +
1038 +
1039 +    /**
1040 +     * Returns the previous charge force of this stuntDouble
1041 +     * @return the charge force of this stuntDouble
1042 +     */    
1043 +    RealType getPrevFlucQFrc() {
1044 +      return ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_];
1045 +    }
1046 +      
1047 +    /**
1048 +     * Returns the current charge force of this stuntDouble
1049 +     * @return the charge force of this stuntDouble
1050 +     */    
1051 +    RealType getFlucQFrc() {
1052 +      return ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_];
1053 +    }
1054 +
1055 +    /**
1056 +     * Returns the charge force of this stuntDouble in specified snapshot
1057 +     * @return the charge force of this stuntDouble
1058 +     * @param snapshotNo
1059 +     */    
1060 +    RealType getFlucQFrc(int snapshotNo) {
1061 +      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_];
1062 +    }
1063 +
1064 +    /**
1065 +     * Sets  the previous charge force of this stuntDouble
1066 +     * @param cfrc  new charge force
1067 +     * @see #getFlucQFrc
1068 +     */        
1069 +    void setPrevFlucQFrc(RealType cfrc) {
1070 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] = cfrc;
1071 +    }
1072 +      
1073 +    /**
1074 +     * Sets  the current charge force of this stuntDouble
1075 +     * @param cfrc  new charge force
1076 +     */        
1077 +    void setFlucQFrc(RealType cfrc) {
1078 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] = cfrc;
1079 +    }
1080 +
1081 +    /**
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
1086 +     */        
1087 +    void setFlucQFrc(RealType cfrc, int snapshotNo) {
1088 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_] = cfrc;
1089 +    }
1090 +
1091 +    /**
1092 +     * Adds charge force into the previous charge force of this stuntDouble
1093 +     * @param cfrc   charge force to be added
1094 +     * @see #getFlucQFrc
1095 +     */        
1096 +    void addPrevFlucQFrc(RealType cfrc) {
1097 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc;
1098 +    }
1099 +      
1100 +    /**
1101 +     * Adds charge force into the current charge force of this stuntDouble
1102 +     * @param cfrc   charge force to be added
1103 +     */        
1104 +    void addFlucQFrc(RealType cfrc) {
1105 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc;
1106 +    }
1107 +
1108 +    /**
1109 +     * Adds charge force into the charge force of this stuntDouble in specified snapshot
1110 +     * @param cfrc charge force to be added
1111 +     * @param snapshotNo
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 eField  new electric field
1147 +     * @see #getElectricField
1148 +     */        
1149 +    void setPrevElectricField(const Vector3d& eField) {
1150 +      ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] = eField;
1151 +    }
1152 +      
1153 +    /**
1154 +     * Sets the current electric field of this stuntDouble
1155 +     * @param eField  new electric field
1156 +     */        
1157 +    void setElectricField(const Vector3d& eField) {
1158 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] = eField;
1159 +    }
1160 +
1161 +    /**
1162 +     * Sets the electric field of this stuntDouble in specified snapshot
1163 +     * @param eField electric field to be set
1164 +     * @param snapshotNo
1165 +     * @see #getElectricField
1166 +     */        
1167 +    void setElectricField(const Vector3d& eField, int snapshotNo) {
1168 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] = eField;
1169 +    }
1170 +
1171 +    /**
1172 +     * Adds electric field into the previous electric field of this
1173 +     * stuntDouble
1174 +     *
1175 +     * @param eField new electric field
1176 +     * @see #getElectricField
1177 +     */        
1178 +    void addPrevEelectricField(const Vector3d& eField) {
1179 +      ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] += eField;
1180 +    }
1181 +      
1182 +    /**
1183 +     * Adds electric field into the current electric field of this stuntDouble
1184 +     * @param eField  new electric field
1185 +     */        
1186 +    void addElectricField(const Vector3d& eField) {
1187 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] += eField;
1188 +    }
1189 +
1190 +    /**
1191 +     * Adds electric field into the electric field of this stuntDouble in specified snapshot
1192 +     *
1193 +     * @param eField electric field to be added
1194 +     * @param snapshotNo
1195 +     * @see #getElectricField
1196 +     */        
1197 +    void addElectricField(const Vector3d& eField, int snapshotNo) {
1198 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] += eField;
1199 +    }      
1200 +
1201 +
1202      /** Set the force of this stuntDouble to zero */
1203      void zeroForcesAndTorques();
1204      /**
# Line 925 | Line 1282 | namespace oopse{
1282      }
1283  
1284      /**
928     * Returns the previous particle potential of this stuntDouble
929     * @return the particle potential of this stuntDouble
930     */    
931    RealType getPrevParticlePot() {
932      return ((snapshotMan_->getPrevSnapshot())->*storage_).particlePot[localIndex_];
933    }
934      
935    /**
936     * Returns the current particle potential of this stuntDouble
937     * @return the particle potential of this stuntDouble
938     */    
939    RealType getParticlePot() {
940      return ((snapshotMan_->getCurrentSnapshot())->*storage_).particlePot[localIndex_];
941    }
942
943    /**
944     * Returns the particle potential of this stuntDouble in specified snapshot
945     * @return the particle potential of this stuntDouble
946     * @param snapshotNo
947     */    
948    RealType getParticlePot(int snapshotNo) {
949      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_];
950    }
951
952    /**
953     * Sets  the previous particle potential of this stuntDouble
954     * @param po tnew particle potential
955     * @see #getParticlePot
956     */        
957    void setPrevParticlePot(RealType pot) {
958      ((snapshotMan_->getPrevSnapshot())->*storage_).particlePot[localIndex_] = pot;
959    }
960      
961    /**
962     * Sets  the current velocity of this stuntDouble
963     * @param vel  new velocity
964     */        
965    void setParticlePot(RealType pot) {
966      ((snapshotMan_->getCurrentSnapshot())->*storage_).particlePot[localIndex_] = pot;
967    }
968
969    /**
970     * Sets  the particle potential of this stuntDouble in specified snapshot
971     * @param pot potential to be set
972     * @param snapshotNo
973     * @see #getVel
974     */        
975    void setParticlePot(RealType pot, int snapshotNo) {
976      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_] = pot;
977    }
978
979    /**
1285       * <p>
1286 <     * The purpose of the Visitor Pattern is to encapsulate an operation that you want to perform on
1287 <     * the elements of a data structure. In this way, you can change the operation being performed
1288 <     * on a structure without the need of changing the classes of the elements that you are operating
1289 <     * on. Using a Visitor pattern allows you to decouple the classes for the data structure and the
1290 <     * algorithms used upon them
1286 >     * The purpose of the Visitor Pattern is to encapsulate an
1287 >     * operation that you want to perform on the elements of a data
1288 >     * structure. In this way, you can change the operation being
1289 >     * performed on a structure without the need of changing the
1290 >     * classes of the elements that you are operating on. Using a
1291 >     * Visitor pattern allows you to decouple the classes for the data
1292 >     * structure and the algorithms used upon them
1293       * </p>
1294       * @param v visitor
1295       */      
# Line 1053 | Line 1360 | namespace oopse{
1360      PropertyMap properties_;
1361    };
1362  
1363 < }//end namespace oopse
1363 > }//end namespace OpenMD
1364   #endif //PRIMITIVES_STUNTDOUBLE_HPP

Comparing:
trunk/src/primitives/StuntDouble.hpp (property svn:keywords), Revision 1245 by chuckv, Tue May 27 16:39:06 2008 UTC vs.
branches/development/src/primitives/StuntDouble.hpp (property svn:keywords), Revision 1839 by gezelter, Fri Jan 25 15:21:04 2013 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines