Stellarator-Tools
gradient_descent Module Reference

Module is part of the LIBSTELL. This modules contains code to define and integrate along an arbitray path. More...

Data Types

type  gradient_descent_class
 Base class containing the parameters for the gradient_descent. More...
 
interface  gradient_descent_test_class
 Base class containing the parameters for the gradient_descent. More...
 
interface  check
 Interface for checking the results of the unit tests. More...
 

Functions/Subroutines

subroutine gradient_descent_destruct (this)
 Deconstruct a gradient_descent_test_class object. More...
 
subroutine gradient_descent_chi2 (this, chi2)
 Compute the χ^2 value and the gradients. More...
 
real(rprec) function gradient_descent_minimize (this)
 Gradient descent to minimize the χ^2 function. More...
 
class(gradient_descent_test_class) function, pointer gradient_descent_test_construct ()
 Construct a gradient_descent_test_class. More...
 
subroutine gradient_descent_test_chi2 (this, chi2)
 Compute the χ^2 value and the gradients. More...
 
logical function gradient_descent_test ()
 Gradient descent unit test function. More...
 

Detailed Description

Module is part of the LIBSTELL. This modules contains code to define and integrate along an arbitray path.

Function/Subroutine Documentation

◆ gradient_descent_chi2()

subroutine gradient_descent::gradient_descent_chi2 ( class (gradient_descent_class), intent(in)  this,
real (rprec), dimension(:), intent(out)  chi2 
)

Compute the χ^2 value and the gradients.

This method should not be called directly and needs to be overloaded in a subclass.

Parameters
[in]thisA gradient_descent_context instance.
[out]chi2The χ^2 value and the gradients.

◆ gradient_descent_destruct()

subroutine gradient_descent::gradient_descent_destruct ( type (gradient_descent_class), intent(inout)  this)

Deconstruct a gradient_descent_test_class object.

Deallocates memory and uninitializes a gradient_descent_test_class object.

Parameters
[in,out]thisA gradient_descent_test_class instance.

◆ gradient_descent_minimize()

real (rprec) function gradient_descent::gradient_descent_minimize ( class (gradient_descent_class), intent(in)  this)

Gradient descent to minimize the χ^2 function.

Parameters
[in,out]thisA gradient_descent_context instance.
Returns
The χ^2 residule.

◆ gradient_descent_test()

logical function gradient_descent::gradient_descent_test

Gradient descent unit test function.

This runs the associated unit tests and returns the result.

Returns
True if the tests pass and false otherwise.

◆ gradient_descent_test_chi2()

subroutine gradient_descent::gradient_descent_test_chi2 ( class (gradient_descent_test_class), intent(in)  this,
real (rprec), dimension(:), intent(out)  chi2 
)

Compute the χ^2 value and the gradients.

This method should not be called directly and needs to be overloaded in a subclass.

Parameters
[in]thisA gradient_descent_context instance.
[out]chi2The χ^2 value and the gradients.

◆ gradient_descent_test_construct()

class (gradient_descent_test_class) function, pointer gradient_descent::gradient_descent_test_construct

Construct a gradient_descent_test_class.

Allocates memory and initializes a gradient_descent_test_class object.

Returns
A pointer to a constructed gradient_descent_test_class object.