mod_matrix_elements Module



Contents


Derived Types

type, public :: matrix_elements_t

Components

TypeVisibilityAttributesNameInitial
integer, private :: nb_elements
integer, private :: spline1_size
integer, private :: spline2_size
type(matrix_element_node_t), private, pointer:: head
type(matrix_element_node_t), private, pointer:: tail
character(len=:), private, allocatable:: state_vector(:)

Type-Bound Procedures

procedure, public :: add => add_node
procedure, public :: get_node
procedure, public :: get_elements
procedure, public :: get_positions
procedure, public :: get_nb_elements
procedure, public :: delete
procedure, private :: spline_sizes_are_valid
procedure, private :: increment_nb_elements

Functions

public pure function new_matrix_elements(state_vector) result(elements)

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: state_vector(:)

Return Value type(matrix_elements_t)

private function get_node(this, inode) result(node)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(in) :: this
integer, intent(in) :: inode

Return Value type(matrix_element_node_t),pointer

private function get_elements(this) result(elements)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(in) :: this

Return Value complex(kind=dp)(this%nb_elements)

private function get_positions(this) result(positions)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(in) :: this

Return Value integer(this%nb_elements,2)

private pure function get_nb_elements(this)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(in) :: this

Return Value integer

private pure function cast_node_element_to_complex(element) result(node_element)

Arguments

TypeIntentOptionalAttributesName
class(*), intent(in) :: element

Return Value complex(kind=dp)

private pure function is_valid_position(position)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: position(:)

Return Value logical

private function spline_sizes_are_valid(this, spline1, spline2)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(in) :: this
real(kind=dp), intent(in) :: spline1(:)
real(kind=dp), intent(in) :: spline2(:)

Return Value logical


Subroutines

private subroutine add_node(this, element, loc1, loc2, spline1, spline2)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(inout) :: this
class(*), intent(in) :: element
character(len=*), intent(in) :: loc1
character(len=*), intent(in) :: loc2
real(kind=dp), intent(in) :: spline1(:)
real(kind=dp), intent(in) :: spline2(:)

private pure subroutine increment_nb_elements(this)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(inout) :: this

private pure subroutine delete(this)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(inout) :: this