NTPoly
Data Types | Functions/Subroutines | Variables
tripletmodule Module Reference

A Module For Storing Triplets of Integer, Integer, Double. Contains a class Triplet and a means to compare them. More...

Data Types

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

Functions/Subroutines

pure subroutine, public settriplet (this, index_column, index_row, point_value)
 For error handling in this module. More...
 
pure subroutine, public gettripletvalues (this, index_column, index_row, point_value)
 Get the values of a triplet. More...
 
pure logical function, public comparetriplets (tripA, tripB)
 Compare two triplets based on their index values. Returns A < B. Used for sorting. More...
 
integer function, public getmpitriplettype ()
 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. More...
 

Variables

logical set_mpi_triplet_type = .FALSE.
 Flag about whether we've registered an mpi triplet type before.
 

Detailed Description

A Module For Storing Triplets of Integer, Integer, Double. Contains a class Triplet and a means to compare them.

Function/Subroutine Documentation

◆ comparetriplets()

pure logical function, public tripletmodule::comparetriplets ( type(triplet_t), intent(in)  tripA,
type(triplet_t), intent(in)  tripB 
)

Compare two triplets based on their index values. Returns A < B. Used for sorting.

Parameters
[in]tripAfirst triplet.
[in]tripBsecond triplet.
Returns
A < B.

◆ getmpitriplettype()

integer function, public tripletmodule::getmpitriplettype ( )

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.

Returns
the derived type

◆ gettripletvalues()

pure subroutine, public tripletmodule::gettripletvalues ( type(triplet_t), intent(in)  this,
integer, intent(out)  index_column,
integer, intent(out)  index_row,
real(ntreal), intent(out)  point_value 
)

Get the values of a triplet.

Parameters
[in]thisthe triplet to extract the values of.
[out]index_columncolumn value.
[out]index_rowrow value.
[out]point_valueactual stored value.

◆ settriplet()

pure subroutine, public tripletmodule::settriplet ( type(triplet_t), intent(inout)  this,
integer, intent(in)  index_column,
integer, intent(in)  index_row,
real(ntreal), intent(in)  point_value 
)

For error handling in this module.

Set the values of a triplet.

Parameters
[in,out]thisthe triplet to set the values of.
[in]index_columnthe column value.
[in]index_rowthe row value.
[in]point_valuethe value at that point.