nambu_m Module

This module defines the data type 'nambu', which represents 4×4 complex matrices in spin and Nambu space. The module overloads arithmetic operators to work with the new type, and defines and exports the Pauli matrices as constants.


Uses


Contents


Interfaces

public interface inverse

Matrix inverse

  • private pure function nambu_inv(this) result(r)

    Calculate the inverse of the nambu matrix.

    Arguments

    Type IntentOptional AttributesName
    class(nambu), intent(in) :: this

    Return Value type(nambu)

public interface trace

Matrix trace

  • private pure elemental function nambu_trace(this) result(r)

    Calculate the trace of the nambu matrix.

    Arguments

    Type IntentOptional AttributesName
    class(nambu), intent(in) :: this

    Return Value complex(kind=wp)

public interface sum

Matrix sum

  • private pure function nambu_sum(this) result(r)

    Calculate the sum of an array of nambu matrices.

    Arguments

    Type IntentOptional AttributesName
    class(nambu), intent(in) :: this(:)

    Return Value type(nambu)

public interface conjg

Complex conjugation

  • private pure elemental function nambu_conjg(this) result(r)

    Calculate the complex conjugate of the nambu matrix.

    Arguments

    Type IntentOptional AttributesName
    class(nambu), intent(in) :: this

    Return Value type(nambu)

public interface nambuv

Construct basis matrices

  • private pure function nambuv_scalar(n) result(r)

    Constructs basis matrix number n in spin-nambu space.

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: n

    Return Value type(nambu)

  • private pure function nambuv_vector(v) result(r)

    Constructs a matrix representation of a vector.

    Arguments

    Type IntentOptional AttributesName
    real(kind=wp), intent(in), dimension(1:3):: v

    Return Value type(nambu)


Derived Types

type, public :: nambu

Components

TypeVisibility AttributesNameInitial
complex(kind=wp), public :: matrix(4,4) =0.0_wp

Encapsulate a spin and Nambu space matrix

Type-Bound Procedures

generic, public :: nambu => cons_rscalar, cons_cscalar, cons_cmatrix, cons_nambu
generic, public :: assignment(=) => assr_rscalar, assr_cscalar, assr_cmatrix, assl_cmatrix
generic, public :: operator(+) => addl_rscalar, addr_rscalar, addl_cscalar, addr_cscalar, addl_cmatrix, addr_cmatrix, add_nambu
generic, public :: operator(-) => subl_rscalar, subr_rscalar, subl_cscalar, subr_cscalar, subl_cmatrix, subr_cmatrix, sub_nambu
generic, public :: operator(*) => mull_rscalar, mulr_rscalar, mull_cscalar, mulr_cscalar, mull_cmatrix, mulr_cmatrix, mul_nambu
generic, public :: operator(/) => divr_rscalar, divr_cscalar
generic, public :: operator(**) => expr_iscalar