dense_vector_rdp Derived Type

type, public, extends(abstract_vector_rdp) :: dense_vector_rdp


Components

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

Type-Bound Procedures

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

Adds two abstract_vector, i.e. .

  • private subroutine add_rdp(self, vec)

    Add two abstract_vector in-place.

    Arguments

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

    Input/Output vector.

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

    Vector to be added.

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

In-place computation of .

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

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: alpha
    class(abstract_vector_rdp), intent(in) :: vec
    real(kind=dp), intent(in) :: beta
    class(dense_vector_rdp), intent(inout) :: self

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

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

  • private subroutine chsgn_rdp(self)

    Changes the sign of the abstract_vector.

    Arguments

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

    Vector whose entries need to change sign.

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

Computes the dot product between two abstract_vector_rdp.

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

    Arguments

    Type IntentOptional Attributes Name
    class(dense_vector_rdp), intent(in) :: self
    class(abstract_vector_rdp), intent(in) :: vec

    Return Value real(kind=dp)

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

Return size of specific abstract vector

  • private function dense_get_size_rdp(self) result(n)

    Arguments

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

    Return Value integer

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

Computes the norm of the abstract_vector.

  • private function norm_rdp(self) result(alpha)

    Compute the norm of an abstract_vector.

    Arguments

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

    Vector whose norm needs to be computed.

    Return Value real(kind=dp)

    Norm of the vector.

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

Creates a random abstract_vector_rdp.

  • private subroutine dense_rand_rdp(self, ifnorm)

    Arguments

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

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

Compute the scalar-vector product.

  • private subroutine dense_scal_rdp(self, alpha)

    Arguments

    Type IntentOptional Attributes Name
    class(dense_vector_rdp), intent(inout) :: self
    real(kind=dp), intent(in) :: alpha

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

Subtracts two abstract_vector, i.e. .

  • private subroutine sub_rdp(self, vec)

    Subtract two abstract_vector in-place.

    Arguments

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

    Input/Output vector.

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

    Vector to be added.

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

Sets an abstract_vector_rdp to zero.

  • private subroutine dense_zero_rdp(self)

    Arguments

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