TripletModule Module

A Module For Storing Triplets of Integer, Integer, Value.



Contents


Interfaces

public interface SetTriplet

  • private subroutine SetTriplet_r(this, index_column, index_row, point_value)

    Set the values of a triplet.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_r), intent(inout) :: this

    The triplet to set the values of.

    integer, intent(in) :: index_column

    The column value.

    integer, intent(in) :: index_row

    The row value.

    real(kind=NTREAL), intent(in) :: point_value

    The value at that point.

  • private subroutine SetTriplet_c(this, index_column, index_row, point_value)

    Set the values of a triplet.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_c), intent(inout) :: this

    The triplet to set the values of.

    integer, intent(in) :: index_column

    The column value.

    integer, intent(in) :: index_row

    The row value.

    complex(kind=NTCOMPLEX), intent(in) :: point_value

    The value at that point.

public interface GetTripletValues

  • private subroutine GetTripletValues_r(this, index_column, index_row, point_value)

    Get the values of a triplet.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_r), intent(in) :: this

    The triplet to extract the values of.

    integer, intent(out) :: index_column

    Column value.

    integer, intent(out) :: index_row

    Row value.

    real(kind=NTREAL), intent(out) :: point_value

    Actual stored value.

  • private subroutine GetTripletValues_c(this, index_column, index_row, point_value)

    Get the values of a triplet.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_c), intent(in) :: this

    The triplet to extract the values of.

    integer, intent(out) :: index_column

    Column value.

    integer, intent(out) :: index_row

    Row value.

    complex(kind=NTCOMPLEX), intent(out) :: point_value

    Actual stored value.

public interface CompareTriplets

  • private pure function CompareTriplets_r(tripA, tripB) result(islessthan)

    Compare two triplets based on their index values, first by column and second by row. Returns A < B.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_r), intent(in) :: tripA

    First triplet.

    type(Triplet_r), intent(in) :: tripB

    Second triplet.

    Return Value logical

    A < B.

  • private pure function CompareTriplets_c(tripA, tripB) result(islessthan)

    Compare two triplets based on their index values, first by column and second by row. Returns A < B.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_c), intent(in) :: tripA

    First triplet.

    type(Triplet_c), intent(in) :: tripB

    Second triplet.

    Return Value logical

    A < B.

public interface ConvertTripletType

  • private subroutine ConvertTripletToReal(cin_triplet, rout_triplet)

    Convert a complex triplet to a real triplet.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_c), intent(in) :: cin_triplet

    The starting triplet

    type(Triplet_r), intent(inout) :: rout_triplet

    Real valued triplet.

  • private subroutine ConvertTripletToComplex(rin_triplet, cout_triplet)

    Convert a real triplet to a complex triplet.

    Arguments

    Type IntentOptional AttributesName
    type(Triplet_r), intent(in) :: rin_triplet

    The starting triplet.

    type(Triplet_c), intent(inout) :: cout_triplet

    Complex valued triplet.


Derived Types

type, public :: Triplet_r

A data type for a triplet of integer, integer, double. As this is related to matrix multiplication, the referencing indices are rows and columns.

Components

TypeVisibility AttributesNameInitial
integer(kind=c_int), public :: index_column

column value.

integer(kind=c_int), public :: index_row

row value.

real(kind=NTREAL), public :: point_value

actual value at those indices.

type, public :: Triplet_c

A data type for a triplet of integer, integer, complex. As this is related to matrix multiplication, the referencing indices are rows and columns.

Components

TypeVisibility AttributesNameInitial
integer(kind=c_int), public :: index_column

column value.

integer(kind=c_int), public :: index_row

row value.

complex(kind=NTCOMPLEX), public :: point_value

actual value at those indices.


Functions

public function GetMPITripletType_r() result(mpi_triplet_type)

Returns an MPI Derived Data Type For A Triplet. We statically store this derived type so that we don't have to recreate it every time this function is called. Thus this functional call should add very little overhead.

Arguments

None

Return Value integer

MPI Derived Type

public function GetMPITripletType_c() result(mpi_triplet_type)

Returns an MPI Derived Data Type For A Triplet. We statically store this derived type so that we don't have to recreate it every time this function is called. Thus this functional call should add very little overhead.

Arguments

None

Return Value integer

MPI Derived Type