ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/test/brains/DirectioanlAtom.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/test/brains/DirectioanlAtom.cpp (file contents):
Revision 1683 by tim, Thu Oct 28 22:34:01 2004 UTC vs.
Revision 1684 by tim, Fri Oct 29 16:20:50 2004 UTC

# Line 27 | Line 27 | DirectionalAtom::DirectionalAtom() : objType_(otDAtom)
27  
28   namespace oopse {
29  
30 < DirectionalAtom::DirectionalAtom() : objType_(otDAtom), storage_(&Snapshot::atomData){
30 > DirectionalAtom::DirectionalAtom(DirectionalAtom* dAtomType)
31 >                         : Atom(dAtomType), objType_(otDAtom), storage_(&Snapshot::atomData){
32  
33   }
34  
35   Mat3x3d DirectionalAtom::getI() {
36 <    return inertiaTensor_;
36 >    return static_cast<DirectionalAtomType*>(getAtomType())->getI();
37   }    
38  
38 void DirectionalAtom::setI(Mat3x3d& I) {
39    inertiaTensor_ = I;
40 }
41
39   void DirectionalAtom::setPrevA(const RotMat3x3d& a) {
40      (snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_] = a;
41      (snapshotMan_->getPrevSnapshot())->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2);
# Line 55 | Line 52 | void DirectionalAtom::setA(const RotMat3x3d& a, int sn
52      (snapshotMan_->getSnapshot(snapshotNo))->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2);    
53   }    
54  
55 + void DirectionalAtom::rotateBy(const RotMat3x3d& m) {
56 +    setA(m *getA());
57 + }
58  
59
59   void  DirectionalAtom::setUnitFrameFromEuler(double phi, double theta, double psi) {
60      sU_.setupRotMat(phi,theta,psi);
62
61   }
62  
63   std::vector<double> DirectionalAtom::getGrad() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines