Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
Derived types and interfaces | Functions/Subroutines
sll_m_matrix_csr Module Reference

Description

module for Compressed Sparse Row Matrix (CSR)

Todo:
must use is_allocated in the create of csr matrices (probably we won't create the graph etc ...)

Maintainer ARA Modified by Benedikt Perse Stability stable

Derived types and interfaces

type  sll_t_matrix_csr
 class for a csr matrix More...
 

Functions/Subroutines

subroutine create_matrix_csr (self, n_rows, n_cols, n_nnz, n_block_rows, n_block_cols)
 creates a csr matrix More...
 
subroutine allocate_matrix_csr (self, n_rows, n_cols, n_nnz, n_block_rows, n_block_cols)
 allocates a csr matrix More...
 
subroutine free_matrix_csr (self)
 destroys the current object More...
 
subroutine dot_matrix_csr (self, x, y)
 apply the dot operation of real vector More...
 
subroutine dot_vector_default (self, x, y)
 sequential dot operation More...
 
subroutine add_values_matrix_csr (self, i_row, i_col, arr_x)
 adds values to the matrix More...
 
subroutine set_values_matrix_csr (self, i_row, i_col, arr_x)
 sets values to the matrix More...
 
subroutine get_diagonal_default_matrix_csr (self, diag, i_diag)
 extracts a specified diagonal from a matrix IMPORTANT: diag is a 1-rank array More...
 
subroutine get_diagonal_block_matrix_csr (self, diag, i_diag)
 extracts a specified block diagonal from a matrix IMPORTANT: diag is a 3-rank array More...
 
subroutine print_info_matrix_csr (self)
 prints the current object More...
 
subroutine multiply_matrix_csr (self, mat_a, mat_b)
 performs the matrix by matrix product More...
 

Function/Subroutine Documentation

◆ add_values_matrix_csr()

subroutine sll_m_matrix_csr::add_values_matrix_csr ( class(sll_t_matrix_csr), intent(inout)  self,
intent(in)  i_row,
intent(in)  i_col,
intent(in)  arr_x 
)
private

adds values to the matrix

Parameters
[in,out]selfthe current object
[in]i_rowrow index
[in]i_colcol index
[in]arr_xvalues to add

Definition at line 343 of file sll_m_matrix_csr.F90.

◆ allocate_matrix_csr()

subroutine sll_m_matrix_csr::allocate_matrix_csr ( class(sll_t_matrix_csr), intent(inout)  self,
intent(in)  n_rows,
intent(in)  n_cols,
intent(in)  n_nnz,
intent(in)  n_block_rows,
intent(in)  n_block_cols 
)
private

allocates a csr matrix

Parameters
[in,out]selfthe current object
[in]n_rowsnumber of rows
[in]n_colsnumber of cols
[in]n_nnznumber of nonzero elements
[in,out]selfparam[inout] self : csr matrix structure

param[in] n_cols : number of columns

param[in] n_rows : number of rows

param[in] n_nnz : number of non zero elements

Definition at line 134 of file sll_m_matrix_csr.F90.

Here is the caller graph for this function:

◆ create_matrix_csr()

subroutine sll_m_matrix_csr::create_matrix_csr ( class(sll_t_matrix_csr), intent(inout)  self,
intent(in)  n_rows,
intent(in)  n_cols,
intent(in)  n_nnz,
intent(in)  n_block_rows,
intent(in)  n_block_cols 
)
private

creates a csr matrix

Parameters
[in,out]selfthe current object
[in]n_rowsnumber of rows
[in]n_colsnumber of cols
[in]n_nnznumber of nonzero elements
[in]n_block_rows[optional] number of rows blocks, default value: 1
[in]n_block_cols[optional] number of cols blocks, default value: 1
[in,out]selfparam[inout] self : csr matrix structure

param[in] n_cols : number of columns

param[in] n_rows : number of rows

param[in] n_nnz : number of non zero elements

Definition at line 69 of file sll_m_matrix_csr.F90.

Here is the call graph for this function:

◆ dot_matrix_csr()

subroutine sll_m_matrix_csr::dot_matrix_csr ( class(sll_t_matrix_csr), intent(in)  self,
intent(in)  x,
intent(out)  y 
)
private

apply the dot operation of real vector

Parameters
[in,out]selfthe current object
[in]xa real valued vector
[out]ya real valued vector

Definition at line 227 of file sll_m_matrix_csr.F90.

Here is the call graph for this function:

◆ dot_vector_default()

subroutine sll_m_matrix_csr::dot_vector_default ( class(sll_t_matrix_csr), intent(in)  self,
intent(in)  x,
intent(out)  y 
)
private

sequential dot operation

Parameters
[in,out]selfthe current object
[in]xa real valued vector
[in,out]ya real valued vector

Definition at line 245 of file sll_m_matrix_csr.F90.

Here is the caller graph for this function:

◆ free_matrix_csr()

subroutine sll_m_matrix_csr::free_matrix_csr ( class(sll_t_matrix_csr), intent(inout)  self)
private

destroys the current object

Parameters
[in,out]selfthe current object

Definition at line 195 of file sll_m_matrix_csr.F90.

◆ get_diagonal_block_matrix_csr()

subroutine sll_m_matrix_csr::get_diagonal_block_matrix_csr ( class(sll_t_matrix_csr), intent(in)  self,
intent(inout)  diag,
intent(in)  i_diag 
)
private

extracts a specified block diagonal from a matrix IMPORTANT: diag is a 3-rank array

Parameters
[in]selfthe current object
[in,out]diagthe extracted diagonal (3-rank array)
[in]i_diagdiagonal index

Definition at line 466 of file sll_m_matrix_csr.F90.

◆ get_diagonal_default_matrix_csr()

subroutine sll_m_matrix_csr::get_diagonal_default_matrix_csr ( class(sll_t_matrix_csr), intent(in)  self,
intent(inout)  diag,
intent(in)  i_diag 
)
private

extracts a specified diagonal from a matrix IMPORTANT: diag is a 1-rank array

Parameters
[in]selfthe current object
[in,out]diagthe extracted diagonal (1-rank array)
[in]i_diagdiagonal index

Definition at line 400 of file sll_m_matrix_csr.F90.

◆ multiply_matrix_csr()

subroutine sll_m_matrix_csr::multiply_matrix_csr ( class(sll_t_matrix_csr), intent(in)  self,
class(sll_t_matrix_abstract), intent(in)  mat_a,
class(sll_t_matrix_abstract), intent(inout)  mat_b 
)
private

performs the matrix by matrix product

Parameters
[in]selfthe current object
[in]mat_acsr matrix (A)
[in,out]mat_bcsr matrix (B)

Definition at line 560 of file sll_m_matrix_csr.F90.

◆ print_info_matrix_csr()

subroutine sll_m_matrix_csr::print_info_matrix_csr ( class(sll_t_matrix_csr), intent(in)  self)
private

prints the current object

Parameters
[in]selfthe current object

Definition at line 535 of file sll_m_matrix_csr.F90.

◆ set_values_matrix_csr()

subroutine sll_m_matrix_csr::set_values_matrix_csr ( class(sll_t_matrix_csr), intent(inout)  self,
intent(in)  i_row,
intent(in)  i_col,
intent(in)  arr_x 
)
private

sets values to the matrix

Parameters
[in,out]selfthe current object
[in]i_rowrow index
[in]i_colcol index
[in]arr_xvalues to set

Definition at line 372 of file sll_m_matrix_csr.F90.

    Report Typos and Errors