Skip to content

Commit 14f05be

Browse files
committed
update opt_TN.hpp
1 parent cbad3ae commit 14f05be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/module_base/opt_TN.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ void Opt_TN::next_direct(double* px,
171171
for (int i = 0; i < this->nx_; ++i)
172172
{
173173
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-
}
174+
}
175+
(t->*p_calGradient)(temp_x, temp_gradient);
176+
for (int i = 0; i < this->nx_; ++i)
177+
{
178+
temp_Hcgd[i] = (temp_gradient[i] - pgradient[i]) / epsilon;
179179
}
180180

181181
// get CG step length and update rdirect

0 commit comments

Comments
 (0)