dense_vector_csp Derived Type

type, public, extends(abstract_vector_csp) :: dense_vector_csp


Components

Type Visibility Attributes Name Initial
complex(kind=sp), public, allocatable :: data(:)
integer, public :: n

Type-Bound Procedures

procedure, public, pass(self) :: add => add_csp

Adds two abstract_vector, i.e. .

  • private subroutine add_csp(self, vec)

    Add two abstract_vector in-place.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(inout) :: self

    Input/Output vector.

    class(abstract_vector_csp), intent(in) :: vec

    Vector to be added.

procedure, public, pass(self) :: axpby => dense_axpby_csp

In-place computation of .

  • private subroutine dense_axpby_csp(alpha, vec, beta, self)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=sp), intent(in) :: alpha
    class(abstract_vector_csp), intent(in) :: vec
    complex(kind=sp), intent(in) :: beta
    class(dense_vector_csp), intent(inout) :: self

procedure, public, pass(self) :: chsgn => chsgn_csp

Change the sign of a vector, i.e. .

  • private subroutine chsgn_csp(self)

    Changes the sign of the abstract_vector.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(inout) :: self

    Vector whose entries need to change sign.

procedure, public, pass(self) :: dot => dense_dot_csp

Computes the dot product between two abstract_vector_csp.

  • private function dense_dot_csp(self, vec) result(alpha)

    Arguments

    Type IntentOptional Attributes Name
    class(dense_vector_csp), intent(in) :: self
    class(abstract_vector_csp), intent(in) :: vec

    Return Value complex(kind=sp)

procedure, public, pass(self) :: get_size => dense_get_size_csp

Return size of specific abstract vector

  • private function dense_get_size_csp(self) result(n)

    Arguments

    Type IntentOptional Attributes Name
    class(dense_vector_csp), intent(in) :: self

    Return Value integer

procedure, public, pass(self) :: norm => norm_csp

Computes the norm of the abstract_vector.

  • private function norm_csp(self) result(alpha)

    Compute the norm of an abstract_vector.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(in) :: self

    Vector whose norm needs to be computed.

    Return Value real(kind=sp)

    Norm of the vector.

procedure, public, pass(self) :: rand => dense_rand_csp

Creates a random abstract_vector_csp.

  • private subroutine dense_rand_csp(self, ifnorm)

    Arguments

    Type IntentOptional Attributes Name
    class(dense_vector_csp), intent(inout) :: self
    logical, intent(in), optional :: ifnorm

procedure, public, pass(self) :: scal => dense_scal_csp

Compute the scalar-vector product.

  • private subroutine dense_scal_csp(self, alpha)

    Arguments

    Type IntentOptional Attributes Name
    class(dense_vector_csp), intent(inout) :: self
    complex(kind=sp), intent(in) :: alpha

procedure, public, pass(self) :: sub => sub_csp

Subtracts two abstract_vector, i.e. .

  • private subroutine sub_csp(self, vec)

    Subtract two abstract_vector in-place.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(inout) :: self

    Input/Output vector.

    class(abstract_vector_csp), intent(in) :: vec

    Vector to be added.

procedure, public, pass(self) :: zero => dense_zero_csp

Sets an abstract_vector_csp to zero.

  • private subroutine dense_zero_csp(self)

    Arguments

    Type IntentOptional Attributes Name
    class(dense_vector_csp), intent(inout) :: self