71 |
|
|
72 |
|
pot_ += p; |
73 |
|
|
74 |
< |
restInfo_[rtDisplacement] = std::make_pair(r, p); |
74 |
> |
if (printRest_) restInfo_[rtDisplacement] = std::make_pair(r, p); |
75 |
|
|
76 |
|
for(it = forces_.begin(); it != forces_.end(); ++it) |
77 |
|
(*it) = -kDisp_ * del * scaleFactor_; |
156 |
|
p = kTwist_ * (1.0 - cos(dTwist) ) ; |
157 |
|
pot_ += p; |
158 |
|
tBody -= dVdtwist * V3Z; |
159 |
< |
restInfo_[rtTwist] = std::make_pair(twistAngle, p); |
159 |
> |
if (printRest_) restInfo_[rtTwist] = std::make_pair(twistAngle, p); |
160 |
|
} |
161 |
|
|
162 |
|
// if (restType_ & rtSwing){ |
174 |
|
p = kSwingX_ * (1.0 - cos(2.0 * dSwingX)); |
175 |
|
pot_ += p; |
176 |
|
tBody -= dVdswingX * V3X; |
177 |
< |
restInfo_[rtSwingX] = std::make_pair(swingX, p); |
177 |
> |
if (printRest_) restInfo_[rtSwingX] = std::make_pair(swingX, p); |
178 |
|
} |
179 |
|
if (restType_ & rtSwingY){ |
180 |
|
dSwingY = swingY - swingY0_; |
182 |
|
p = kSwingY_ * (1.0 - cos(2.0 * dSwingY)); |
183 |
|
pot_ += p; |
184 |
|
tBody -= dVdswingY * V3Y; |
185 |
< |
restInfo_[rtSwingY] = std::make_pair(swingY, p); |
185 |
> |
if (printRest_) restInfo_[rtSwingY] = std::make_pair(swingY, p); |
186 |
|
} |
187 |
|
|
188 |
|
|