35 |
|
((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_] = a; |
36 |
|
//((snapshotMan_->getPrevSnapshot())->*storage_).electroFrame[localIndex_] = a.transpose() * sU_; |
37 |
|
|
38 |
< |
//for (int i =0 ; i < atoms_.size(); ++i){ |
39 |
< |
// if (atoms_[i]->isDirectional()) { |
40 |
< |
// atoms_[i]->setPrevA(a * refOrients_[i]); |
41 |
< |
// } |
42 |
< |
//} |
38 |
> |
for (int i =0 ; i < atoms_.size(); ++i){ |
39 |
> |
if (atoms_[i]->isDirectional()) { |
40 |
> |
atoms_[i]->setPrevA(a * refOrients_[i]); |
41 |
> |
} |
42 |
> |
} |
43 |
|
|
44 |
|
} |
45 |
|
|
48 |
|
((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_] = a; |
49 |
|
//((snapshotMan_->getCurrentSnapshot())->*storage_).electroFrame[localIndex_] = a.transpose() * sU_; |
50 |
|
|
51 |
< |
//for (int i =0 ; i < atoms_.size(); ++i){ |
52 |
< |
// if (atoms_[i]->isDirectional()) { |
53 |
< |
// atoms_[i]->setA(a * refOrients_[i]); |
54 |
< |
// } |
55 |
< |
//} |
51 |
> |
for (int i =0 ; i < atoms_.size(); ++i){ |
52 |
> |
if (atoms_[i]->isDirectional()) { |
53 |
> |
atoms_[i]->setA(a * refOrients_[i]); |
54 |
> |
} |
55 |
> |
} |
56 |
|
} |
57 |
|
|
58 |
|
void RigidBody::setA(const RotMat3x3d& a, int snapshotNo) { |
59 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] = a; |
60 |
|
//((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electroFrame[localIndex_] = a.transpose() * sU_; |
61 |
|
|
62 |
< |
//for (int i =0 ; i < atoms_.size(); ++i){ |
63 |
< |
// if (atoms_[i]->isDirectional()) { |
64 |
< |
// atoms_[i]->setA(a * refOrients_[i], snapshotNo); |
65 |
< |
// } |
66 |
< |
//} |
62 |
> |
for (int i =0 ; i < atoms_.size(); ++i){ |
63 |
> |
if (atoms_[i]->isDirectional()) { |
64 |
> |
atoms_[i]->setA(a * refOrients_[i], snapshotNo); |
65 |
> |
} |
66 |
> |
} |
67 |
|
|
68 |
|
} |
69 |
|
|