Stellarator-Tools
f1dim_mod Module Reference

Module containing Fletcher-Reeves (non-linear Conjugate Gradient) routines including linear search algorithm. More...

Functions/Subroutines

real(dp) function f1dim (x)
 One-dimension function used by linmin, passed to mnbrak/brent to find minimum for line search.
 
subroutine fletcher_reeves (p, ftol, iter, fret, n)
 Fletcher-Reeves-Polak-Ribiere minimization.
 
real(dp) function wfunc (p)
 Function to compute the MHD energy used in line search.
 
real(dp) function, dimension(size(p)) dfunc (p)
 Function to compute gradient of MHD energy.
 
subroutine linmin (p, xi, fret)
 Routine to find minimum of func along a given direction xi from point p.
 
subroutine mnbrak (ax, bx, cx, fa, fb, fc, func)
 Routine to bracket the minimum of func in the downhill direction.
 
real(dp) function brent (ax, bx, cx, func, tol, xmin)
 Isolates the minimum of func.
 
subroutine swap (a, b)
 Swaps a,b => b,a.
 
subroutine shft (a, b, c, d)
 Shifts a=b, b=c, c=d.
 

Variables

integer ncom
 
real(dp), dimension(:), pointer pcom
 
real(dp), dimension(:), pointer xicom
 

Detailed Description

Module containing Fletcher-Reeves (non-linear Conjugate Gradient) routines including linear search algorithm.