TripletListModule Module

A Module For Storing Lists of Triplets.



Contents


Interfaces

public interface TripletList_r

  • private pure function ConstructTripletList_r(size_in) result(this)

    Construct a triplet list.

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), optional :: size_in

    The length of the triplet list (default=0).

    Return Value type(TripletList_r)

    The triplet list to construct.

public interface TripletList_c

  • private pure function ConstructTripletList_c(size_in) result(this)

    Construct a triplet list.

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), optional :: size_in

    The length of the triplet list (default=0).

    Return Value type(TripletList_c)

    The triplet list to construct.

public interface ConstructTripletList

  • private subroutine ConstructTripletListSup_r(this, size_in)

    Subroutine wrapper for constructing a triplet list.

    Arguments

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

    The triplet list to construct.

    integer, intent(in), optional :: size_in

    The length of the triplet list (default=0).

  • private subroutine ConstructTripletListSup_c(this, size_in)

    Subroutine wrapper for constructing a triplet list.

    Arguments

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

    The triplet list to construct.

    integer, intent(in), optional :: size_in

    The length of the triplet list (default=0).

public interface DestructTripletList

  • private subroutine DestructTripletList_r(this)

    Destructs a triplet list.

    Arguments

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

    The triplet list to destruct.

  • private subroutine DestructTripletList_c(this)

    Destructs a triplet list.

    Arguments

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

    The triplet list to destruct.

public interface ResizeTripletList

  • private subroutine ResizeTripletList_r(this, size)

    Increase the size of a triplet list.

    Arguments

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

    The triplet list to resize.

    integer, intent(in) :: size

    Size to resize to.

  • private subroutine ResizeTripletList_c(this, size)

    Increase the size of a triplet list.

    Arguments

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

    The triplet list to resize.

    integer, intent(in) :: size

    Size to resize to.

public interface AppendToTripletList

  • private subroutine AppendToTripletList_r(this, triplet_value)

    Add a value to the end of the triplet list.

    Arguments

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

    This the triplet list to append to.

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

    The value to append.

  • private subroutine AppendToTripletList_c(this, triplet_value)

    Add a value to the end of the triplet list.

    Arguments

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

    This the triplet list to append to.

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

    The value to append.

public interface SetTripletAt

  • private subroutine SetTripletAt_r(this, index, triplet_value)

    Set the value of a triplet at a particular index.

    Arguments

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

    The triplet list to set.

    integer, intent(in) :: index

    The index at which to set the triplet.

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

    The value of the triplet to set.

  • private subroutine SetTripletAt_c(this, index, triplet_value)

    Set the value of a triplet at a particular index.

    Arguments

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

    The triplet list to set.

    integer, intent(in) :: index

    The index at which to set the triplet.

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

    The value of the triplet to set.

public interface GetTripletAt

  • private subroutine GetTripletAt_r(this, index, triplet_value)

    Get the value of a triplet at a particular index.

    Arguments

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

    The triplet list to get the value from.

    integer, intent(in) :: index

    The index from which to get the triplet.

    type(Triplet_r), intent(out) :: triplet_value

    The extracted triplet value.

  • private subroutine GetTripletAt_c(this, index, triplet_value)

    Get the value of a triplet at a particular index.

    Arguments

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

    The triplet list to get the value from.

    integer, intent(in) :: index

    The index from which to get the triplet.

    type(Triplet_c), intent(out) :: triplet_value

    The extracted triplet value.

public interface SortTripletList

  • private subroutine SortTripletList_r(input_list, matrix_columns, matrix_rows, sorted_list, bubble_in)

    Sorts a triplet list by index values. Implementation is based on bucket sort. This is why it needs the number of matrix columns. Bubble sort is used within a bucket.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_r), intent(in) :: input_list

    List to be sorted.

    integer, intent(in) :: matrix_columns

    This is the highest column value in the list.

    integer, intent(in) :: matrix_rows

    This is the highest row value in the list.

    type(TripletList_r), intent(out) :: sorted_list

    A now sorted version of the list. This routine will allocate it.

    logical, intent(in), optional :: bubble_in

    False if you do not need the final bubble sort.

  • private subroutine SortTripletList_c(input_list, matrix_columns, matrix_rows, sorted_list, bubble_in)

    Sorts a triplet list by index values. Implementation is based on bucket sort. This is why it needs the number of matrix columns. Bubble sort is used within a bucket.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_c), intent(in) :: input_list

    List to be sorted.

    integer, intent(in) :: matrix_columns

    This is the highest column value in the list.

    integer, intent(in) :: matrix_rows

    This is the highest row value in the list.

    type(TripletList_c), intent(out) :: sorted_list

    A now sorted version of the list. This routine will allocate it.

    logical, intent(in), optional :: bubble_in

    False if you do not need the final bubble sort.

public interface SymmetrizeTripletList

  • private subroutine SymmetrizeTripletList_r(triplet_list, pattern_type)

    Symmetrizes an unsymmetric triplet list according to the specified symmetry type.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_r), intent(inout) :: triplet_list

    List to be symmetrized.

    integer, intent(in) :: pattern_type

    Type of symmetry.

  • private subroutine SymmetrizeTripletList_c(triplet_list, pattern_type)

    Symmetrizes an unsymmetric triplet list according to the specified symmetry type.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_c), intent(inout) :: triplet_list

    List to be symmetrized.

    integer, intent(in) :: pattern_type

    Type of symmetry.

public interface GetTripletListSize

  • private pure function GetTripletListSize_r(triplet_list) result(list_size)

    Get the number of entries in a triplet list.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_r), intent(in) :: triplet_list

    List to get the size of.

    Return Value integer

    The number of entries in the triplet list.

  • private pure function GetTripletListSize_c(triplet_list) result(list_size)

    Get the number of entries in a triplet list.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_c), intent(in) :: triplet_list

    List to get the size of.

    Return Value integer

    The number of entries in the triplet list.

public interface RedistributeTripletLists

  • private subroutine RedistributeTripletLists_r(triplet_lists, comm, local_data_out)

    Redistribute some triplet lists amongst a set of processors. Takes in a list of triplet lists, one list for each processor. Then the all to all redistribution is performed along the given communicator.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_r), intent(in), DIMENSION(:):: triplet_lists

    A list of triplet lists, one for each process.

    integer, intent(inout) :: comm

    The mpi communicator to redistribute along.

    type(TripletList_r), intent(inout) :: local_data_out

    The resulting local triplet list.

  • private subroutine RedistributeTripletLists_c(triplet_lists, comm, local_data_out)

    Redistribute some triplet lists amongst a set of processors. Takes in a list of triplet lists, one list for each processor. Then the all to all redistribution is performed along the given communicator.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_c), intent(in), DIMENSION(:):: triplet_lists

    A list of triplet lists, one for each process.

    integer, intent(inout) :: comm

    The mpi communicator to redistribute along.

    type(TripletList_c), intent(inout) :: local_data_out

    The resulting local triplet list.

public interface ShiftTripletList

  • private subroutine ShiftTripletList_r(triplet_list, row_shift, column_shift)

    Shift the rows and columns of a triplet list by set values. Frequently, we have a triplet list that comes from the global matrix which we would like to shift into a local matrix. In that case, just pass the negative of the starting row and column (plus 1) to this routine.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_r), intent(inout) :: triplet_list

    The triplet list to shift.

    integer, intent(in) :: row_shift

    The row offset to shift by.

    integer, intent(in) :: column_shift

    The column offset to shift by.

  • private subroutine ShiftTripletList_c(triplet_list, row_shift, column_shift)

    Shift the rows and columns of a triplet list by set values. Frequently, we have a triplet list that comes from the global matrix which we would like to shift into a local matrix. In that case, just pass the negative of the starting row and column (plus 1) to this routine.

    Arguments

    Type IntentOptional AttributesName
    type(TripletList_c), intent(inout) :: triplet_list

    The triplet list to shift.

    integer, intent(in) :: row_shift

    The row offset to shift by.

    integer, intent(in) :: column_shift

    The column offset to shift by.

public interface ConvertTripletListType

  • private subroutine ConvertTripletListToReal(cin_triplet, rout_triplet)

    Convert a complex triplet list to a real triplet list.

    Arguments

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

    The starting triplet list.

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

    Real valued triplet list.

  • private subroutine ConvertTripletListToComplex(rin_triplet, cout_triplet)

    Convert a real triplet to a complex triplet list.

    Arguments

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

    The starting triplet list.

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

    Complex valued triplet list.


Derived Types

type, public :: TripletList_r

A data type for a list of triplets.

Components

TypeVisibility AttributesNameInitial
type(Triplet_r), public, DIMENSION(:), ALLOCATABLE:: DATA

Internal representation of the data.

integer, public :: CurrentSize

Current number of elements in the triplet list

Constructor

private pure function ConstructTripletList_r(size_in)

Construct a triplet list.

type, public :: TripletList_c

A data type for a list of triplets.

Components

TypeVisibility AttributesNameInitial
type(Triplet_c), public, DIMENSION(:), ALLOCATABLE:: DATA

Internal representation of the data.

integer, public :: CurrentSize

Current number of elements in the triplet list

Constructor

private pure function ConstructTripletList_c(size_in)

Construct a triplet list.