matmul Interface

public interface matmul

This interface overloads the Fortran intrinsic matmul for a Poisson2D matrixn, both for matrix-vector and matrix-matrix products. For a matrix-matrix product , only the matrix has to be a Poisson2D matrix. Both and are standard Fortran rank-2 arrays.

Syntax

   y = matmul(A, x)

Functions

private module function spmv(A, x) result(y)

Compute the matrix-vector product for a Poisson2D matrix . Both x and y are rank-1 arrays with the same kind as A.

Arguments

Type IntentOptional Attributes Name
type(Poisson2D), intent(in) :: A

Input matrix.

real(kind=dp), intent(in), target :: x(:)

Input vector.

Return Value real(kind=dp), allocatable, target, (:)

Output vector.

private module function spmvs(A, x) result(y)

Compute the matrix-matrix product for a Poisson2D matrix . and are rank-2 arrays of appropriate size with the same kind as .

Arguments

Type IntentOptional Attributes Name
type(Poisson2D), intent(in) :: A

Input matrix.

real(kind=dp), intent(in), target, contiguous :: x(:,:)

Input vectors.

Return Value real(kind=dp), allocatable, target, (:,:)

Output vectors.