abstract_vector_csp Derived Type

type, public, abstract, extends(abstract_vector) :: abstract_vector_csp

Abstract type to define complex(sp)-valued vectors. Derived-types defined by the user should be extending one such class.


Type-Bound Procedures

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

Adds two abstract_vector.

  • 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(abstract_axpby_csp), public, deferred, pass(self) :: axpby

In-place computation of .

  • subroutine abstract_axpby_csp(self, alpha, vec, beta) Prototype

    Abstract interface to add/scale two vectors in-place.

    Arguments

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

    Input/Output vector.

    complex(kind=sp), intent(in) :: alpha
    class(abstract_vector_csp), intent(in) :: vec

    Vector to be added/subtracted.

    complex(kind=sp), intent(in) :: beta

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

  • 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(abstract_dot_csp), public, deferred, pass(self) :: dot

Computes the dot product between two abstract_vector_csp.

  • function abstract_dot_csp(self, vec) result(alpha) Prototype

    Abstract interface to compute the dot product.

    Arguments

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

    Vectors whose dot product will be computed.

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

    Vectors whose dot product will be computed.

    Return Value complex(kind=sp)

    Result of the dot product.

procedure(abstract_get_size_csp), public, deferred, pass(self) :: get_size

Return size of specific abstract vector

  • function abstract_get_size_csp(self) result(N) Prototype

    Abstract interface to return the size of the specific abstract vector.

    Arguments

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

    Vectors whose dot product will be computed.

    Return Value integer

    Size of the vector

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(abstract_rand_csp), public, deferred, pass(self) :: rand

Creates a random abstract_vector_csp.

  • subroutine abstract_rand_csp(self, ifnorm) Prototype

    Abstract interface to generate a random (normalized) vector.

    Arguments

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

procedure(abstract_scal_csp), public, deferred, pass(self) :: scal

Compute the scalar-vector product.

  • subroutine abstract_scal_csp(self, alpha) Prototype

    Abstract interface to scale a vector.

    Arguments

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

    Input/Output vector.

    complex(kind=sp), intent(in) :: alpha

    Scaling factor.

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

Subtracts two abstract_vector.

  • 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(abstract_zero_csp), public, deferred, pass(self) :: zero

Sets an abstract_vector_csp to zero.

  • subroutine abstract_zero_csp(self) Prototype

    Abstract interface to zero-out a vector in-place.

    Arguments

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

    Vector to be zeroed-out.