37 |
|
|
38 |
|
void DirectionalAtom::setI(Mat3x3d& I) { |
39 |
|
inertiaTensor_ = I; |
40 |
+ |
} |
41 |
+ |
|
42 |
+ |
void DirectionalAtom::setPrevA(const RotMat3x3d& a) { |
43 |
+ |
(snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_] = a; |
44 |
+ |
(snapshotMan_->getPrevSnapshot())->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2); |
45 |
+ |
} |
46 |
+ |
|
47 |
+ |
|
48 |
+ |
void DirectionalAtom::setA(const RotMat3x3d& a) { |
49 |
+ |
(snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_] = a; |
50 |
+ |
(snapshotMan_->getCurrentSnapshot())->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2); |
51 |
|
} |
52 |
+ |
|
53 |
+ |
void DirectionalAtom::setA(const RotMat3x3d& a, int snapshotNo) { |
54 |
+ |
(snapshotMan_->getSnapshot(snapshotNo))->storage_->aMat[localIndex_] = a; |
55 |
+ |
(snapshotMan_->getSnapshot(snapshotNo))->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2); |
56 |
+ |
} |
57 |
|
|
58 |
+ |
|
59 |
+ |
|
60 |
+ |
void DirectionalAtom::setUnitFrameFromEuler(double phi, double theta, double psi) { |
61 |
+ |
sU_.setupRotMat(phi,theta,psi); |
62 |
+ |
|
63 |
+ |
} |
64 |
+ |
|
65 |
|
std::vector<double> DirectionalAtom::getGrad() { |
66 |
|
vector<double> grad(6, 0.0); |
67 |
|
Vector3d force; |