(git:374b731)
Loading...
Searching...
No Matches
ct_methods.F File Reference

Go to the source code of this file.

Modules

module  ct_methods
 Cayley transformation methods.
 

Functions/Subroutines

subroutine, public ct_methods::ct_step_execute (cts_env)
 Performs Cayley transformation.
 
subroutine, public ct_methods::analytic_line_search (a, b, c, d, minima, nmins)
 Finds real roots of a cubic equation

‍ a*x**3 + b*x**2 + c*x + d = 0 and returns only those roots for which the derivative is positive

Step 0: Check the true order of the equation. Cubic, quadratic, linear? Step 1: Calculate p and q p = ( 3*c/a - (b/a)**2 ) / 3 q = ( 2*(b/a)**3 - 9*b*c/a/a + 27*d/a ) / 27 Step 2: Calculate discriminant D D = (p/3)**3 + (q/2)**2 Step 3: Depending on the sign of D, we follow different strategy. If D<0, three distinct real roots. If D=0, three real roots of which at least two are equal. If D>0, one real and two complex roots. Step 3a: For D>0 and D=0, Calculate u and v u = cubic_root(-q/2 + sqrt(D)) v = cubic_root(-q/2 - sqrt(D)) Find the three transformed roots y1 = u + v y2 = -(u+v)/2 + i (u-v)*sqrt(3)/2 y3 = -(u+v)/2 - i (u-v)*sqrt(3)/2 Step 3b Alternately, for D<0, a trigonometric formulation is more convenient y1 = 2 * sqrt(|p|/3) * cos(phi/3) y2 = -2 * sqrt(|p|/3) * cos((phi+pi)/3) y3 = -2 * sqrt(|p|/3) * cos((phi-pi)/3) where phi = acos(-q/2/sqrt(|p|**3/27)) pi = 3.141592654... Step 4 Find the real roots x = y - b/a/3 Step 5 Check the derivative and return only those real roots for which the derivative is positive.

 
subroutine, public ct_methods::diagonalize_diagonal_blocks (matrix, c, e)
 Diagonalizes diagonal blocks of a symmetric dbcsr matrix and returs its eigenvectors.