abstract_vector_cdp Derived Type

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

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


Type-Bound Procedures

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

Adds two abstract_vector.

  • private subroutine add_cdp(self, vec)

    Add two abstract_vector in-place.

    Arguments

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

    Input/Output vector.

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

    Vector to be added.

procedure(abstract_axpby_cdp), public, deferred, pass(self) :: axpby

In-place computation of .

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

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

    Arguments

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

    Input/Output vector.

    complex(kind=dp), intent(in) :: alpha
    class(abstract_vector_cdp), intent(in) :: vec

    Vector to be added/subtracted.

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

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

  • private subroutine chsgn_cdp(self)

    Changes the sign of the abstract_vector.

    Arguments

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

    Vector whose entries need to change sign.

procedure(abstract_dot_cdp), public, deferred, pass(self) :: dot

Computes the dot product between two abstract_vector_cdp.

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

    Abstract interface to compute the dot product.

    Arguments

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

    Vectors whose dot product will be computed.

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

    Vectors whose dot product will be computed.

    Return Value complex(kind=dp)

    Result of the dot product.

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

Return size of specific abstract vector

  • function abstract_get_size_cdp(self) result(N) Prototype

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

    Arguments

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

    Vectors whose dot product will be computed.

    Return Value integer

    Size of the vector

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

Computes the norm of the abstract_vector.

  • private function norm_cdp(self) result(alpha)

    Compute the norm of an abstract_vector.

    Arguments

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

    Vector whose norm needs to be computed.

    Return Value real(kind=dp)

    Norm of the vector.

procedure(abstract_rand_cdp), public, deferred, pass(self) :: rand

Creates a random abstract_vector_cdp.

  • subroutine abstract_rand_cdp(self, ifnorm) Prototype

    Abstract interface to generate a random (normalized) vector.

    Arguments

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

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

Compute the scalar-vector product.

  • subroutine abstract_scal_cdp(self, alpha) Prototype

    Abstract interface to scale a vector.

    Arguments

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

    Input/Output vector.

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

    Scaling factor.

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

Subtracts two abstract_vector.

  • private subroutine sub_cdp(self, vec)

    Subtract two abstract_vector in-place.

    Arguments

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

    Input/Output vector.

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

    Vector to be added.

procedure(abstract_zero_cdp), public, deferred, pass(self) :: zero

Sets an abstract_vector_cdp to zero.

  • subroutine abstract_zero_cdp(self) Prototype

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

    Arguments

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

    Vector to be zeroed-out.