We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbad3ae commit 14f05beCopy full SHA for 14f05be
source/module_base/opt_TN.hpp
@@ -171,11 +171,11 @@ void Opt_TN::next_direct(double* px,
171
for (int i = 0; i < this->nx_; ++i)
172
{
173
temp_x[i] = px[i] + epsilon * cg_direct[i];
174
- (t->*p_calGradient)(temp_x, temp_gradient);
175
- for (int i = 0; i < this->nx_; ++i)
176
- {
177
- temp_Hcgd[i] = (temp_gradient[i] - pgradient[i]) / epsilon;
178
- }
+ }
+ (t->*p_calGradient)(temp_x, temp_gradient);
+ for (int i = 0; i < this->nx_; ++i)
+ {
+ temp_Hcgd[i] = (temp_gradient[i] - pgradient[i]) / epsilon;
179
}
180
181
// get CG step length and update rdirect
0 commit comments