ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/primitives/DirectionalAtom.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/primitives/DirectionalAtom.cpp (file contents):
Revision 1812 by tim, Wed Nov 24 17:42:37 2004 UTC vs.
Revision 1813 by tim, Wed Dec 1 17:38:32 2004 UTC

# Line 30 | Line 30 | DirectionalAtom::DirectionalAtom(DirectionalAtomType*
30   DirectionalAtom::DirectionalAtom(DirectionalAtomType* dAtomType)
31                           : Atom(dAtomType){
32      objType_= otDAtom;
33 +    if (dAtomType->isMultipole()) {
34 +        electroBodyFrame_ = dAtomType->getEletroBodyFrame();
35 +    }
36   }
37  
38   Mat3x3d DirectionalAtom::getI() {
# Line 38 | Line 41 | void DirectionalAtom::setPrevA(const RotMat3x3d& a) {
41  
42   void DirectionalAtom::setPrevA(const RotMat3x3d& a) {
43      ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_] = a;
44 <    ((snapshotMan_->getPrevSnapshot())->*storage_).unitFrame[localIndex_] = a.transpose() * sU_;
44 >    if (atomType_->isMultipole()) {
45 >        ((snapshotMan_->getPrevSnapshot())->*storage_).electroFrame[localIndex_] = a.transpose() * electroBodyFrame_;
46 >    }
47   }
48  
49        
50   void DirectionalAtom::setA(const RotMat3x3d& a) {
51      ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_] = a;
52 <    ((snapshotMan_->getCurrentSnapshot())->*storage_).unitFrame[localIndex_] = a.transpose() * sU_;
52 >
53 >    if (atomType_->isMultipole()) {
54 >        ((snapshotMan_->getCurrentSnapshot())->*storage_).electroFrame[localIndex_] = a.transpose() * electroBodyFrame_;
55 >    }
56   }    
57      
58   void DirectionalAtom::setA(const RotMat3x3d& a, int snapshotNo) {
59      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] = a;
60 <    ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).unitFrame[localIndex_] = a.transpose() * sU_;    
60 >
61 >    if (atomType_->isMultipole()) {
62 >        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electroFrame[localIndex_] = a.transpose() * electroBodyFrame_;    
63 >    }
64   }    
65  
66   void DirectionalAtom::rotateBy(const RotMat3x3d& m) {
67      setA(m *getA());
68   }
69  
59 void  DirectionalAtom::setUnitFrameFromEuler(double phi, double theta, double psi) {
60    sU_.setupRotMat(phi,theta,psi);
61 }
62
70   std::vector<double> DirectionalAtom::getGrad() {
71      vector<double> grad(6, 0.0);
72      Vector3d force;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines