TripletListModule Module

A Module For Storing Lists of Triplets.



Contents


Interfaces

public interface TripletList_r

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

    Construct a triplet list.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=c_int), 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

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

    Construct a triplet list.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=c_int), 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

  • public 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(kind=c_int), intent(in), optional :: size_in

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

  • public 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(kind=c_int), intent(in), optional :: size_in

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

public interface DestructTripletList

  • public subroutine DestructTripletList_r(this)

    Destructs a triplet list.

    Arguments

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

    The triplet list to destruct.

  • public 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

  • public 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(kind=c_int), intent(in) :: size

    Size to resize to.

  • public 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(kind=c_int), intent(in) :: size

    Size to resize to.

public interface AppendToTripletList

  • public 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.

  • public 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 AccumulateTripletList

  • public subroutine AccumulateTripletList_r(this, triplet_value)

    (Just for a related project)

    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 add in.

  • public subroutine AccumulateTripletList_c(this, triplet_value)

    (Just for a related project)

    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 add in.

public interface SetTripletAt

  • public 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(kind=c_int), 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.

  • public 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(kind=c_int), 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

  • public 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(kind=c_int), intent(in) :: index

    The index from which to get the triplet.

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

    The extracted triplet value.

  • public 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(kind=c_int), 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

  • public 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 don't need the final bubble sort.

  • public 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 don't need the final bubble sort.

public interface SortDenseTripletList

  • public subroutine SortDenseTripletList_r(input_list, matrix_columns, matrix_rows, sorted_list)

    Sort a triplet list assuming that the matrix it corresponds to is nearly dense.

    Arguments

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

    The list to sort.

    integer, intent(in) :: matrix_columns

    Number of columns for the corresponding matrix.

    integer, intent(in) :: matrix_rows

    Number of rows for the corresponding matrix.

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

    Sorted and ready to use for building matrices.

  • public subroutine SortDenseTripletList_c(input_list, matrix_columns, matrix_rows, sorted_list)

    Sort a triplet list assuming that the matrix it corresponds to is nearly dense.

    Arguments

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

    The list to sort.

    integer, intent(in) :: matrix_columns

    Number of columns for the corresponding matrix.

    integer, intent(in) :: matrix_rows

    Number of rows for the corresponding matrix.

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

    Sorted and ready to use for building matrices.

public interface SymmetrizeTripletList

  • public 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.

  • public 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

  • public 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.

  • public 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

  • public 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.

  • public 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

  • public 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.

  • public 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

  • public 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.

  • public 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

public 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

public pure function ConstructTripletList_c(size_in)

Construct a triplet list.


Functions

public pure function ConstructTripletList_r(size_in) result(this)

Construct a triplet list.

Arguments

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

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

Return Value type(TripletList_r)

The triplet list to construct.

public pure function ConstructTripletList_c(size_in) result(this)

Construct a triplet list.

Arguments

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

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

Return Value type(TripletList_c)

The triplet list to construct.

public 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.

public 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.


Subroutines

public 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(kind=c_int), intent(in), optional :: size_in

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

public 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(kind=c_int), intent(in), optional :: size_in

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

public subroutine DestructTripletList_r(this)

Destructs a triplet list.

Arguments

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

The triplet list to destruct.

public subroutine DestructTripletList_c(this)

Destructs a triplet list.

Arguments

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

The triplet list to destruct.

public 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(kind=c_int), intent(in) :: size

Size to resize to.

public 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(kind=c_int), intent(in) :: size

Size to resize to.

public 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.

public 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 subroutine AccumulateTripletList_r(this, triplet_value)

(Just for a related project)

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 add in.

public subroutine AccumulateTripletList_c(this, triplet_value)

(Just for a related project)

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 add in.

public 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(kind=c_int), 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.

public 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(kind=c_int), 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 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(kind=c_int), intent(in) :: index

The index from which to get the triplet.

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

The extracted triplet value.

public 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(kind=c_int), intent(in) :: index

The index from which to get the triplet.

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

The extracted triplet value.

public 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 don't need the final bubble sort.

public 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 don't need the final bubble sort.

public 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.

public 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 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.

public 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 subroutine SortDenseTripletList_r(input_list, matrix_columns, matrix_rows, sorted_list)

Sort a triplet list assuming that the matrix it corresponds to is nearly dense.

Arguments

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

The list to sort.

integer, intent(in) :: matrix_columns

Number of columns for the corresponding matrix.

integer, intent(in) :: matrix_rows

Number of rows for the corresponding matrix.

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

Sorted and ready to use for building matrices.

public subroutine SortDenseTripletList_c(input_list, matrix_columns, matrix_rows, sorted_list)

Sort a triplet list assuming that the matrix it corresponds to is nearly dense.

Arguments

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

The list to sort.

integer, intent(in) :: matrix_columns

Number of columns for the corresponding matrix.

integer, intent(in) :: matrix_rows

Number of rows for the corresponding matrix.

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

Sorted and ready to use for building matrices.

public 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.

public 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 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.

public 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.