mod_matrix_elements Module



Contents


Derived Types

type, public :: matrix_elements_t

Components

TypeVisibilityAttributesNameInitial
integer, private :: nb_elements
type(matrix_element_node_t), private, pointer:: head
type(matrix_element_node_t), private, pointer:: tail
type(state_vector_t), private, pointer:: 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 :: increment_nb_elements

Functions

public function new_matrix_elements(state_vector) result(elements)

Arguments

TypeIntentOptionalAttributesName
type(state_vector_t), intent(in), target:: 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 is_NaN_element(element, sv_comp1, sv_comp2)

Arguments

TypeIntentOptionalAttributesName
complex(kind=dp), intent(in) :: element
type(sv_component_t), intent(in) :: sv_comp1
type(sv_component_t), intent(in) :: sv_comp2

Return Value logical

private function is_inf_element(element, sv_comp1, sv_comp2)

Arguments

TypeIntentOptionalAttributesName
complex(kind=dp), intent(in) :: element
type(sv_component_t), intent(in) :: sv_comp1
type(sv_component_t), intent(in) :: sv_comp2

Return Value logical


Subroutines

private subroutine add_node(this, element, sv_comp1, sv_comp2, s1do, s2do)

Arguments

TypeIntentOptionalAttributesName
class(matrix_elements_t), intent(inout) :: this
class(*), intent(in) :: element
type(sv_component_t), intent(in) :: sv_comp1

first state vector component

type(sv_component_t), intent(in) :: sv_comp2

second state vector component

integer, intent(in), optional :: s1do

spline 1 derivative order, 1 = first derivative, 2 = second derivative, etc.

integer, intent(in), optional :: s2do

spline 2 derivative order, 1 = first derivative, 2 = second derivative, etc.

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