Next: Subroutine n_linmin
Up: Module minimization_module
Previous: Interface test_gradient
Contents
Index
Test a function against its gradient by evaluating the gradient from the
function by symmetric finite differnces. We can only test the gradient if
energy and force functions are pure in that they do not change the input
vector (e.g. no capping of parameters). The interface for func(x) and
dfunc(x)are the same as for minim above.
- xx -- real(dp), intent(in), dimension(:)
-
Position
- dir -- real(dp), intent(in), optional, target, dimension(:)
-
direction along which to test
- Function func(x) -- real(dp)
-
- x -- real(dp), dimension(:)
-
- Function dfunc(x) -- real(dp), dimension(size(x))
-
- x -- real(dp), dimension(:)
-
n_linmin subroutine
gabor
2009-06-30