abstract_vector_rsp Derived Type

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

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


Type-Bound Procedures

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

Adds two abstract_vector.

  • private subroutine add_rsp(self, vec)

    Add two abstract_vector in-place.

    Arguments

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

    Input/Output vector.

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

    Vector to be added.

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

In-place computation of .

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

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

    Arguments

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

    Input/Output vector.

    real(kind=sp), intent(in) :: alpha
    class(abstract_vector_rsp), intent(in) :: vec

    Vector to be added/subtracted.

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

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

  • private subroutine chsgn_rsp(self)

    Changes the sign of the abstract_vector.

    Arguments

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

    Vector whose entries need to change sign.

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

Computes the dot product between two abstract_vector_rsp.

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

    Abstract interface to compute the dot product.

    Arguments

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

    Vectors whose dot product will be computed.

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

    Vectors whose dot product will be computed.

    Return Value real(kind=sp)

    Result of the dot product.

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

Return size of specific abstract vector

  • function abstract_get_size_rsp(self) result(N) Prototype

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

    Arguments

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

    Vectors whose dot product will be computed.

    Return Value integer

    Size of the vector

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

Computes the norm of the abstract_vector.

  • private function norm_rsp(self) result(alpha)

    Compute the norm of an abstract_vector.

    Arguments

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

    Vector whose norm needs to be computed.

    Return Value real(kind=sp)

    Norm of the vector.

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

Creates a random abstract_vector_rsp.

  • subroutine abstract_rand_rsp(self, ifnorm) Prototype

    Abstract interface to generate a random (normalized) vector.

    Arguments

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

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

Compute the scalar-vector product.

  • subroutine abstract_scal_rsp(self, alpha) Prototype

    Abstract interface to scale a vector.

    Arguments

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

    Input/Output vector.

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

    Scaling factor.

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

Subtracts two abstract_vector.

  • private subroutine sub_rsp(self, vec)

    Subtract two abstract_vector in-place.

    Arguments

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

    Input/Output vector.

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

    Vector to be added.

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

Sets an abstract_vector_rsp to zero.

  • subroutine abstract_zero_rsp(self) Prototype

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

    Arguments

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

    Vector to be zeroed-out.