Confused about someting in the cdft newt subroutine

From NWChem

Viewed 1045 times, With a total of 0 Posts
Jump to: navigation, search

Clicked A Few Times
Threads 4
Posts 5
So I have been trying to do cdft and have been running into terrible convergence issues and have been trying to better understand the code by reading the source code. In reviewing the cdft_newt subroutine in cdft_util.F I am confused about the following.

       do i = 1, nconstr
grad_old(i) = grad(i)
p(i) = -grad(i)

       c use svd in case there are redundant constraints
do i = 1, nconstr
p(i) = 0.d0

Why is p(i) initialized to -grad(i) in the first loop then immediately initialized to zero in the second loop?

Edited On 3:38:11 PM PST - Mon, Nov 4th 2019 by Jdhoward

Forum >> NWChem's corner >> Feedback

Who's here now Members 0 Guests 3 Bots/Crawler 0

AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC