OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
triplet< T, PETSC_BASE > Class Template Reference

It store one non-zero element in the sparse matrix. More...

Detailed Description

template<typename T>
class triplet< T, PETSC_BASE >

It store one non-zero element in the sparse matrix.

Given a row, and a column, store a value

Definition at line 25 of file SparseMatrix_petsc.hpp.

#include <SparseMatrix_petsc.hpp>

Public Member Functions

PetscInt & row ()
 Return the row of the triplet. More...
 
PetscInt & col ()
 Return the colum of the triplet. More...
 
PetscScalar & value ()
 Return the value of the triplet. More...
 
 triplet (long int i, long int j, T val)
 Constructor from row, colum and value. More...
 

Private Attributes

PetscInt row_
 Row of the sparse matrix.
 
PetscInt col_
 Colum of the sparse matrix.
 
PetscScalar val_
 Value of the Matrix.
 

Constructor & Destructor Documentation

template<typename T >
triplet< T, PETSC_BASE >::triplet ( long int  i,
long int  j,
val 
)
inline

Constructor from row, colum and value.

Parameters
irow
jcolum
valvalue

Definition at line 75 of file SparseMatrix_petsc.hpp.

Member Function Documentation

template<typename T >
PetscInt& triplet< T, PETSC_BASE >::col ( )
inline

Return the colum of the triplet.

Returns
the colum index

Definition at line 53 of file SparseMatrix_petsc.hpp.

template<typename T >
PetscInt& triplet< T, PETSC_BASE >::row ( )
inline

Return the row of the triplet.

Returns
the row index

Definition at line 43 of file SparseMatrix_petsc.hpp.

template<typename T >
PetscScalar& triplet< T, PETSC_BASE >::value ( )
inline

Return the value of the triplet.

Returns
the value

Definition at line 63 of file SparseMatrix_petsc.hpp.


The documentation for this class was generated from the following file: