Commit 4ae5f0dc authored by Andreas Marek's avatar Andreas Marek
Browse files

Doxygen documentation for elpa_api.F90

parent 67e68694
...@@ -63,11 +63,11 @@ module elpa_api ...@@ -63,11 +63,11 @@ module elpa_api
c_double, c_double_complex, & c_double, c_double_complex, &
c_float, c_float_complex c_float, c_float_complex
!> \brief Abstract defintion of the elpa_t type !> \brief Abstract definition of the elpa_t type
type, abstract :: elpa_t type, abstract :: elpa_t
private private
! these have to be public for proper bounds checking, sadly !< these have to be public for proper bounds checking, sadly
integer(kind=c_int), public, pointer :: na => NULL() integer(kind=c_int), public, pointer :: na => NULL()
integer(kind=c_int), public, pointer :: nev => NULL() integer(kind=c_int), public, pointer :: nev => NULL()
integer(kind=c_int), public, pointer :: local_nrows => NULL() integer(kind=c_int), public, pointer :: local_nrows => NULL()
...@@ -80,7 +80,7 @@ module elpa_api ...@@ -80,7 +80,7 @@ module elpa_api
procedure(elpa_setup_i), deferred, public :: setup !< export a setup method procedure(elpa_setup_i), deferred, public :: setup !< export a setup method
procedure(elpa_destroy_i), deferred, public :: destroy !< export a destroy method procedure(elpa_destroy_i), deferred, public :: destroy !< export a destroy method
! key/value store !< key/value store
generic, public :: set => & !< export a method to set integer/double key/values generic, public :: set => & !< export a method to set integer/double key/values
elpa_set_integer, & elpa_set_integer, &
elpa_set_double elpa_set_double
...@@ -90,11 +90,11 @@ module elpa_api ...@@ -90,11 +90,11 @@ module elpa_api
procedure(elpa_is_set_i), deferred, public :: is_set !< method to check whether key/value is set procedure(elpa_is_set_i), deferred, public :: is_set !< method to check whether key/value is set
procedure(elpa_can_set_i), deferred, public :: can_set !< method to check whether key/value can be set procedure(elpa_can_set_i), deferred, public :: can_set !< method to check whether key/value can be set
! Timer !< Timer
procedure(elpa_get_time_i), deferred, public :: get_time procedure(elpa_get_time_i), deferred, public :: get_time
procedure(elpa_print_times_i), deferred, public :: print_times procedure(elpa_print_times_i), deferred, public :: print_times
! Actual math routines !< Actual math routines
generic, public :: solve => & !< method solve for solving the eigenvalue problem generic, public :: solve => & !< method solve for solving the eigenvalue problem
elpa_solve_real_double, & !< for symmetric real valued / hermitian complex valued elpa_solve_real_double, & !< for symmetric real valued / hermitian complex valued
elpa_solve_real_single, & !< matrices elpa_solve_real_single, & !< matrices
...@@ -154,6 +154,11 @@ module elpa_api ...@@ -154,6 +154,11 @@ module elpa_api
end type elpa_t end type elpa_t
!> \brief definition of helper function to get C strlen
!> Parameters
!> \details
!> \param ptr type(c_ptr) : pointer to string
!> \result size integer(kind=c_size_t) : length of string
interface interface
pure function elpa_strlen_c(ptr) result(size) bind(c, name="strlen") pure function elpa_strlen_c(ptr) result(size) bind(c, name="strlen")
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
...@@ -162,7 +167,11 @@ module elpa_api ...@@ -162,7 +167,11 @@ module elpa_api
end function end function
end interface end interface
!> \brief abstract definition of setup method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \result error integer : error code, which can be queried with elpa_strerr()
abstract interface abstract interface
function elpa_setup_i(self) result(error) function elpa_setup_i(self) result(error)
import elpa_t import elpa_t
...@@ -171,7 +180,13 @@ module elpa_api ...@@ -171,7 +180,13 @@ module elpa_api
end function end function
end interface end interface
!> \brief abstract definition of set method for integer values
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name string: the name of the key
!> \param value integer : the value to set for the key
!> \param error integer, optional : error code, which can be queried with elpa_strerr()
abstract interface abstract interface
subroutine elpa_set_integer_i(self, name, value, error) subroutine elpa_set_integer_i(self, name, value, error)
use iso_c_binding use iso_c_binding
...@@ -183,7 +198,13 @@ module elpa_api ...@@ -183,7 +198,13 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract definition of get method for integer values
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name string: the name of the key
!> \param error integer, optional : error code, which can be queried with elpa_strerr()
!> \result value integer : the value corresponding to the key
abstract interface abstract interface
function elpa_get_integer_i(self, name, error) result(value) function elpa_get_integer_i(self, name, error) result(value)
use iso_c_binding use iso_c_binding
...@@ -195,28 +216,47 @@ module elpa_api ...@@ -195,28 +216,47 @@ module elpa_api
end function end function
end interface end interface
!> \brief abstract definition of is_set method for integer values
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name string: the name of the key
!> \result state integer : 1 is set, 0 if not, else a negativ error code
!> which can be queried with elpa_strerr
abstract interface abstract interface
function elpa_is_set_i(self, name) result(error) function elpa_is_set_i(self, name) result(state)
import elpa_t import elpa_t
class(elpa_t) :: self class(elpa_t) :: self
character(*), intent(in) :: name character(*), intent(in) :: name
integer :: error integer :: sta
end function end function
end interface end interface
!> \brief abstract definition of can_set method for integer values
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name string: the name of the key
!> \param value integer: the valye to associate with the key
!> \result state integer : 1 is set, 0 if not, else a negativ error code
!> which can be queried with elpa_strerr
abstract interface abstract interface
function elpa_can_set_i(self, name, value) result(error) function elpa_can_set_i(self, name, value) result(state)
import elpa_t, c_int import elpa_t, c_int
class(elpa_t) :: self class(elpa_t) :: self
character(*), intent(in) :: name character(*), intent(in) :: name
integer(kind=c_int), intent(in) :: value integer(kind=c_int), intent(in) :: value
integer :: error integer :: state
end function end function
end interface end interface
!> \brief abstract definition of set method for double values
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name string: the name of the key
!? \param value double: the value to associate with the key
!> \param error integer. optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_set_double_i(self, name, value, error) subroutine elpa_set_double_i(self, name, value, error)
use iso_c_binding use iso_c_binding
...@@ -228,7 +268,13 @@ module elpa_api ...@@ -228,7 +268,13 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract definition of get method for double values
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name string: the name of the key
!> \param error integer. optional : error code, which can be queried with elpa_strerr
!> \result value double: the value associated with the key
abstract interface abstract interface
function elpa_get_double_i(self, name, error) result(value) function elpa_get_double_i(self, name, error) result(value)
use iso_c_binding use iso_c_binding
...@@ -240,7 +286,12 @@ module elpa_api ...@@ -240,7 +286,12 @@ module elpa_api
end function end function
end interface end interface
!> \brief abstract definition of associate method for integer pointers
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name string: the name of the key
!> \result value integer pointer: the value associated with the key
abstract interface abstract interface
function elpa_associate_int_i(self, name) result(value) function elpa_associate_int_i(self, name) result(value)
use iso_c_binding use iso_c_binding
...@@ -254,6 +305,12 @@ module elpa_api ...@@ -254,6 +305,12 @@ module elpa_api
! Timer routines ! Timer routines
!> \brief abstract definition of get_time method to querry the timer
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
!> \param name1..6 string: the name of the timer entry, supports up to 6 levels
!> \result s double: the time for the entry name1..6
abstract interface abstract interface
function elpa_get_time_i(self, name1, name2, name3, name4, name5, name6) result(s) function elpa_get_time_i(self, name1, name2, name3, name4, name5, name6) result(s)
import elpa_t, c_double import elpa_t, c_double
...@@ -264,7 +321,10 @@ module elpa_api ...@@ -264,7 +321,10 @@ module elpa_api
end function end function
end interface end interface
!> \brief abstract definition of print method for timer
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
abstract interface abstract interface
subroutine elpa_print_times_i(self) subroutine elpa_print_times_i(self)
import elpa_t import elpa_t
...@@ -273,15 +333,16 @@ module elpa_api ...@@ -273,15 +333,16 @@ module elpa_api
end interface end interface
! Actual math routines !< Actual math routines
!> \brief abstract defintion of interface to solve double real eigenvalue problem !> \brief abstract definition of interface to solve double real eigenvalue problem
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a double real matrix a: defines the problem to solve !> \param a double real matrix a: defines the problem to solve
!> \param ev double real: on output stores the eigenvalues !> \param ev double real: on output stores the eigenvalues
!> \param q double real matrix q: on output stores the eigenvalues !> \param q double real matrix q: on output stores the eigenvalues
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_solve_real_double_i(self, a, ev, q, error) subroutine elpa_solve_real_double_i(self, a, ev, q, error)
use iso_c_binding use iso_c_binding
...@@ -298,13 +359,14 @@ module elpa_api ...@@ -298,13 +359,14 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to solve single real eigenvalue problem !> \brief abstract definition of interface to solve single real eigenvalue problem
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a single real matrix a: defines the problem to solve !> \param a single real matrix a: defines the problem to solve
!> \param ev single real: on output stores the eigenvalues !> \param ev single real: on output stores the eigenvalues
!> \param q single real matrix q: on output stores the eigenvalues !> \param q single real matrix q: on output stores the eigenvalues
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_solve_real_single_i(self, a, ev, q, error) subroutine elpa_solve_real_single_i(self, a, ev, q, error)
use iso_c_binding use iso_c_binding
...@@ -321,13 +383,14 @@ module elpa_api ...@@ -321,13 +383,14 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to solve double complex eigenvalue problem !> \brief abstract definition of interface to solve double complex eigenvalue problem
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a double complex matrix a: defines the problem to solve !> \param a double complex matrix a: defines the problem to solve
!> \param ev double real: on output stores the eigenvalues !> \param ev double real: on output stores the eigenvalues
!> \param q double complex matrix q: on output stores the eigenvalues !> \param q double complex matrix q: on output stores the eigenvalues
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_solve_complex_double_i(self, a, ev, q, error) subroutine elpa_solve_complex_double_i(self, a, ev, q, error)
use iso_c_binding use iso_c_binding
...@@ -345,13 +408,14 @@ module elpa_api ...@@ -345,13 +408,14 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to solve single complex eigenvalue problem !> \brief abstract definition of interface to solve single complex eigenvalue problem
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a single complex matrix a: defines the problem to solve !> \param a single complex matrix a: defines the problem to solve
!> \param ev single real: on output stores the eigenvalues !> \param ev single real: on output stores the eigenvalues
!> \param q single complex matrix q: on output stores the eigenvalues !> \param q single complex matrix q: on output stores the eigenvalues
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_solve_complex_single_i(self, a, ev, q, error) subroutine elpa_solve_complex_single_i(self, a, ev, q, error)
use iso_c_binding use iso_c_binding
...@@ -368,7 +432,7 @@ module elpa_api ...@@ -368,7 +432,7 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to compute C : = A**T * B !> \brief abstract definition of interface to compute C : = A**T * B
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
...@@ -395,7 +459,7 @@ module elpa_api ...@@ -395,7 +459,7 @@ module elpa_api
!> \param c double real matrix c !> \param c double real matrix c
!> \param ldc leading dimension of matrix c !> \param ldc leading dimension of matrix c
!> \param ldcCols columns of matrix c !> \param ldcCols columns of matrix c
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_multiply_at_b_double_i (self,uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, & subroutine elpa_multiply_at_b_double_i (self,uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
c, ldc, ldcCols, error) c, ldc, ldcCols, error)
...@@ -413,7 +477,7 @@ module elpa_api ...@@ -413,7 +477,7 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to compute C : = A**T * B !> \brief abstract definition of interface to compute C : = A**T * B
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
...@@ -440,7 +504,7 @@ module elpa_api ...@@ -440,7 +504,7 @@ module elpa_api
!> \param c single real matrix c !> \param c single real matrix c
!> \param ldc leading dimension of matrix c !> \param ldc leading dimension of matrix c
!> \param ldcCols columns of matrix c !> \param ldcCols columns of matrix c
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_multiply_at_b_single_i (self,uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, & subroutine elpa_multiply_at_b_single_i (self,uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
c, ldc, ldcCols, error) c, ldc, ldcCols, error)
...@@ -458,7 +522,7 @@ module elpa_api ...@@ -458,7 +522,7 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to compute C : = A**H * B !> \brief abstract definition of interface to compute C : = A**H * B
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
...@@ -485,7 +549,7 @@ module elpa_api ...@@ -485,7 +549,7 @@ module elpa_api
!> \param c double complex matrix c !> \param c double complex matrix c
!> \param ldc leading dimension of matrix c !> \param ldc leading dimension of matrix c
!> \param ldcCols columns of matrix c !> \param ldcCols columns of matrix c
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_multiply_ah_b_double_i (self,uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, & subroutine elpa_multiply_ah_b_double_i (self,uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
c, ldc, ldcCols, error) c, ldc, ldcCols, error)
...@@ -503,7 +567,7 @@ module elpa_api ...@@ -503,7 +567,7 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to compute C : = A**H * B !> \brief abstract definition of interface to compute C : = A**H * B
!> Parameters !> Parameters
!> \details !> \details
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
...@@ -530,7 +594,7 @@ module elpa_api ...@@ -530,7 +594,7 @@ module elpa_api
!> \param c single complex matrix c !> \param c single complex matrix c
!> \param ldc leading dimension of matrix c !> \param ldc leading dimension of matrix c
!> \param ldcCols columns of matrix c !> \param ldcCols columns of matrix c
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_multiply_ah_b_single_i (self, uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, & subroutine elpa_multiply_ah_b_single_i (self, uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
c, ldc, ldcCols, error) c, ldc, ldcCols, error)
...@@ -548,11 +612,11 @@ module elpa_api ...@@ -548,11 +612,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to do a cholesky decomposition of a double real matrix !> \brief abstract definition of interface to do a cholesky decomposition of a double real matrix
!> Parameters !> Parameters
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a double real matrix: the matrix to be decomposed !> \param a double real matrix: the matrix to be decomposed
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_cholesky_double_real_i (self, a, error) subroutine elpa_cholesky_double_real_i (self, a, error)
use iso_c_binding use iso_c_binding
...@@ -567,11 +631,11 @@ module elpa_api ...@@ -567,11 +631,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to do a cholesky decomposition of a single real matrix !> \brief abstract definition of interface to do a cholesky decomposition of a single real matrix
!> Parameters !> Parameters
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a single real matrix: the matrix to be decomposed !> \param a single real matrix: the matrix to be decomposed
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_cholesky_single_real_i(self, a, error) subroutine elpa_cholesky_single_real_i(self, a, error)
use iso_c_binding use iso_c_binding
...@@ -586,11 +650,11 @@ module elpa_api ...@@ -586,11 +650,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to do a cholesky decomposition of a double complex matrix !> \brief abstract definition of interface to do a cholesky decomposition of a double complex matrix
!> Parameters !> Parameters
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a double complex matrix: the matrix to be decomposed !> \param a double complex matrix: the matrix to be decomposed
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_cholesky_double_complex_i (self, a, error) subroutine elpa_cholesky_double_complex_i (self, a, error)
use iso_c_binding use iso_c_binding
...@@ -605,11 +669,11 @@ module elpa_api ...@@ -605,11 +669,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to do a cholesky decomposition of a single complex matrix !> \brief abstract definition of interface to do a cholesky decomposition of a single complex matrix
!> Parameters !> Parameters
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a single complex matrix: the matrix to be decomposed !> \param a single complex matrix: the matrix to be decomposed
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_cholesky_single_complex_i (self, a, error) subroutine elpa_cholesky_single_complex_i (self, a, error)
use iso_c_binding use iso_c_binding
...@@ -624,11 +688,11 @@ module elpa_api ...@@ -624,11 +688,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to invert a triangular double real matrix !> \brief abstract definition of interface to invert a triangular double real matrix
!> Parameters !> Parameters
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a double real matrix: the matrix to be inverted !> \param a double real matrix: the matrix to be inverted
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_invert_trm_double_real_i (self, a, error) subroutine elpa_invert_trm_double_real_i (self, a, error)
use iso_c_binding use iso_c_binding
...@@ -643,11 +707,11 @@ module elpa_api ...@@ -643,11 +707,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to invert a triangular single real matrix !> \brief abstract definition of interface to invert a triangular single real matrix
!> Parameters !> Parameters
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a single real matrix: the matrix to be inverted !> \param a single real matrix: the matrix to be inverted
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_invert_trm_single_real_i (self, a, error) subroutine elpa_invert_trm_single_real_i (self, a, error)
use iso_c_binding use iso_c_binding
...@@ -662,11 +726,11 @@ module elpa_api ...@@ -662,11 +726,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface
!> \brief abstract defintion of interface to invert a triangular double complex matrix !> \brief abstract definition of interface to invert a triangular double complex matrix
!> Parameters !> Parameters
!> \param self class(elpa_t), the ELPA object !> \param self class(elpa_t), the ELPA object
!> \param a double complex matrix: the matrix to be inverted !> \param a double complex matrix: the matrix to be inverted
!> \param error integer, optional : error code !> \param error integer, optional : error code, which can be queried with elpa_strerr
abstract interface abstract interface
subroutine elpa_invert_trm_double_complex_i (self, a, error) subroutine elpa_invert_trm_double_complex_i (self, a, error)
use iso_c_binding use iso_c_binding
...@@ -681,11 +745,11 @@ module elpa_api ...@@ -681,11 +745,11 @@ module elpa_api
end subroutine end subroutine
end interface end interface