A Module For Storing Lists of Triplets.
Construct a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | size_in | The length of the triplet list (default=0). |
The triplet list to construct.
Construct a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | size_in | The length of the triplet list (default=0). |
The triplet list to construct.
Subroutine wrapper for constructing a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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). |
Subroutine wrapper for constructing a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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). |
Destructs a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_r), | intent(inout) | :: | this | The triplet list to destruct. |
Destructs a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_c), | intent(inout) | :: | this | The triplet list to destruct. |
Increase the size of a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_r), | intent(inout) | :: | this | The triplet list to resize. |
||
integer, | intent(in) | :: | size | Size to resize to. |
Increase the size of a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_c), | intent(inout) | :: | this | The triplet list to resize. |
||
integer, | intent(in) | :: | size | Size to resize to. |
Add a value to the end of the triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_r), | intent(inout) | :: | this | This the triplet list to append to. |
||
type(Triplet_r), | intent(in) | :: | triplet_value | The value to append. |
Add a value to the end of the triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_c), | intent(inout) | :: | this | This the triplet list to append to. |
||
type(Triplet_c), | intent(in) | :: | triplet_value | The value to append. |
Set the value of a triplet at a particular index.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Set the value of a triplet at a particular index.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Get the value of a triplet at a particular index.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Get the value of a triplet at a particular index.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Symmetrizes an unsymmetric triplet list according to the specified symmetry type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_r), | intent(inout) | :: | triplet_list | List to be symmetrized. |
||
integer, | intent(in) | :: | pattern_type | Type of symmetry. |
Symmetrizes an unsymmetric triplet list according to the specified symmetry type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_c), | intent(inout) | :: | triplet_list | List to be symmetrized. |
||
integer, | intent(in) | :: | pattern_type | Type of symmetry. |
Get the number of entries in a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_r), | intent(in) | :: | triplet_list | List to get the size of. |
The number of entries in the triplet list.
Get the number of entries in a triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_c), | intent(in) | :: | triplet_list | List to get the size of. |
The number of entries in the triplet list.
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Convert a complex triplet list to a real triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_c), | intent(in) | :: | cin_triplet | The starting triplet list. |
||
type(TripletList_r), | intent(inout) | :: | rout_triplet | Real valued triplet list. |
Convert a real triplet to a complex triplet list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TripletList_r), | intent(in) | :: | rin_triplet | The starting triplet list. |
||
type(TripletList_c), | intent(inout) | :: | cout_triplet | Complex valued triplet list. |
A data type for a list of triplets.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(Triplet_r), | public, | DIMENSION(:), ALLOCATABLE | :: | DATA | Internal representation of the data. |
||
integer, | public | :: | CurrentSize | Current number of elements in the triplet list |
private pure function ConstructTripletList_r(size_in) | Construct a triplet list. |
A data type for a list of triplets.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(Triplet_c), | public, | DIMENSION(:), ALLOCATABLE | :: | DATA | Internal representation of the data. |
||
integer, | public | :: | CurrentSize | Current number of elements in the triplet list |
private pure function ConstructTripletList_c(size_in) | Construct a triplet list. |