NTPoly
Data Types | Functions/Subroutines
tripletlistmodule Module Reference

A Module For Storing Lists of triplets. More...

Data Types

type  tripletlist_t
 A data type for a list of triplets. As this is related to matrix multiplication, the referencing indices are rows and columns. More...
 

Functions/Subroutines

pure subroutine, public constructtripletlist (this, size_in)
 Construct a triplet list. More...
 
pure subroutine, public destructtripletlist (this)
 Destructs a triplet list. More...
 
pure subroutine, public resizetripletlist (this, size)
 Increase the size of a triplet list. More...
 
pure subroutine, public appendtotripletlist (this, triplet_value)
 Add a value to the end of the triplet list. More...
 
pure subroutine, public settripletat (this, index, triplet_value)
 Set the value of a triplet at a particular index. More...
 
pure subroutine, public gettripletat (this, index, triplet_value)
 Get the value of a triplet at a particular index. More...
 
pure subroutine, public sorttripletlist (input_list, matrix_columns, 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. More...
 
subroutine, public symmetrizetripletlist (triplet_list, pattern_type)
 Symmetrizes an unsymmetric triplet list according to the specified symmetry type. More...
 
pure integer function, public gettripletlistsize (triplet_list)
 Get the number of entries in a triplet list. More...
 
subroutine, public redistributetripletlists (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. More...
 
pure subroutine, public shifttripletlist (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.
 

Detailed Description

A Module For Storing Lists of triplets.

Function/Subroutine Documentation

◆ appendtotripletlist()

pure subroutine, public tripletlistmodule::appendtotripletlist ( type(tripletlist_t), intent(inout)  this,
type(triplet_t), intent(in)  triplet_value 
)

Add a value to the end of the triplet list.

Parameters
[in,out]thisthe triplet list to append to.
[in]triplet_valuethe value to append.

◆ constructtripletlist()

pure subroutine, public tripletlistmodule::constructtripletlist ( type(tripletlist_t), intent(inout)  this,
integer(kind=c_int), intent(in), optional  size_in 
)

Construct a triplet list.

Parameters
[in,out]thisthe triplet list to construct.
[in]size_inthe length of the triplet list (optional, default=0).

◆ destructtripletlist()

pure subroutine, public tripletlistmodule::destructtripletlist ( type(tripletlist_t), intent(inout)  this)

Destructs a triplet list.

Parameters
[in,out]thisthe triplet list to destruct.

◆ gettripletat()

pure subroutine, public tripletlistmodule::gettripletat ( type(tripletlist_t), intent(in)  this,
integer(kind=c_int), intent(in)  index,
type(triplet_t), intent(out)  triplet_value 
)

Get the value of a triplet at a particular index.

Parameters
[in]thisthe triplet list to get the value from.
[in]indexthe index from which to get the triplet.
[out]triplet_valuethe extracted triplet value.

◆ gettripletlistsize()

pure integer function, public tripletlistmodule::gettripletlistsize ( type(tripletlist_t), intent(in)  triplet_list)

Get the number of entries in a triplet list.

Parameters
[in]triplet_listlist to get the size of.
Returns
list_size the number of entries in the triplet list.

◆ redistributetripletlists()

subroutine, public tripletlistmodule::redistributetripletlists ( type(tripletlist_t), dimension(:), intent(in)  triplet_lists,
integer, intent(inout)  comm,
type(tripletlist_t), intent(inout)  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.

Parameters
[in]triplet_listsa list of triplet lists, one for each process.
[in,out]commthe mpi communicator to redistribute along.
[out]local_data_outthe resulting local triplet list.

◆ resizetripletlist()

pure subroutine, public tripletlistmodule::resizetripletlist ( type(tripletlist_t), intent(inout)  this,
integer(kind=c_int), intent(in)  size 
)

Increase the size of a triplet list.

Parameters
[in,out]thisthe triplet list to resize.
[in]sizeto resize to.

◆ settripletat()

pure subroutine, public tripletlistmodule::settripletat ( type(tripletlist_t), intent(inout)  this,
integer(kind=c_int), intent(in)  index,
type(triplet_t), intent(in)  triplet_value 
)

Set the value of a triplet at a particular index.

Parameters
[in,out]thisthe triplet list to set.
[in]indexthe index at which to set the triplet.
[in]triplet_valuethe value of the triplet to set.

◆ sorttripletlist()

pure subroutine, public tripletlistmodule::sorttripletlist ( type(tripletlist_t), intent(in)  input_list,
integer, intent(in)  matrix_columns,
type(tripletlist_t), intent(out)  sorted_list,
logical, intent(in), optional  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.

Parameters
[in]input_listlist to be sorted.
[in]matrix_columnsthis is the highest column value in the list.
[in]bubble_infalse if you don't need the final bubble sort.
[out]sorted_lista now sorted version of the list. This routine will allocate it.

◆ symmetrizetripletlist()

subroutine, public tripletlistmodule::symmetrizetripletlist ( type(tripletlist_t), intent(inout)  triplet_list,
integer, intent(in)  pattern_type 
)

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

Parameters
[in,out]triplet_listlist to be symmetrized.
[in]pattern_typetype of symmetry.