SpM Handbook 1.2.4
Loading...
Searching...
No Matches
z_spm_print.c File Reference
#include "common.h"

Go to the source code of this file.

Functions

static void z_spm_print_elt_sym_diag (spm_int_t row, spm_int_t dofi, spm_zconj_fct_t conjfct, const spm_complex64_t *valptr, FILE *f)
 Print a diagonal element within a symmetric/hermitian matrix with column/row major storage.
 
static void z_spm_print_elt_gen_col (spm_int_t row, spm_int_t dofi, spm_int_t col, spm_int_t dofj, spm_zconj_fct_t conjfct, const spm_complex64_t *valptr, FILE *f)
 Print a general element matrix with column major storage.
 
static void z_spm_print_elt_gen_row (spm_int_t row, spm_int_t dofi, spm_int_t col, spm_int_t dofj, spm_zconj_fct_t conjfct, const spm_complex64_t *valptr, FILE *f)
 Print a general element matrix with row major storage.
 
static void z_spm_print_elt_gen (spm_layout_t layout, spm_int_t row, spm_int_t dofi, spm_int_t col, spm_int_t dofj, const spm_zconj_fct_t conjfct, const spm_complex64_t *valptr, FILE *f)
 Print a general element matrix.
 
static void z_spm_print_elt_sym_offd (spm_layout_t layout, spm_int_t row, spm_int_t dofi, spm_int_t col, spm_int_t dofj, spm_zconj_fct_t conjfct, const spm_complex64_t *valptr, FILE *f)
 Print an off-diagonal element matrix in the symmetric/hermitian case.
 
static void z_spm_print_elt (spm_mtxtype_t mtxtype, spm_layout_t layout, spm_int_t row, spm_int_t dofi, spm_int_t col, spm_int_t dofj, const spm_complex64_t *valptr, FILE *f)
 Print an element matrix.
 
void z_spmCSCPrint (FILE *f, const spmatrix_t *spm)
 Write CSC matrix in a file.
 
void z_spmCSRPrint (FILE *f, const spmatrix_t *spm)
 Write CSR matrix in a file.
 
void z_spmIJVPrint (FILE *f, const spmatrix_t *spm)
 Write IJV matrix in a file.
 
void z_spmPrint (FILE *f, const spmatrix_t *spm)
 Write a spm matrix in a file.
 
void z_spmPrintRHS (FILE *f, const spmatrix_t *spm, int nrhs, const void *x, spm_int_t ldx)
 Write into a file the vectors associated to a spm.
 

Detailed Description

SParse Matrix package printing routines.

Version
1.2.4
Author
Mathieu Faverge
Alban Bellot
Matias Hastaran
Tony Delarue
Alycia Lisito
Date
2024-06-25
Generated arithmetic file from /builds/2mk6rsew/0/fpruvost/spm/src/z_spm_print.c, normal z -> z, Fri Nov 29 11:34:31 2024

Definition in file z_spm_print.c.

Function Documentation

◆ z_spm_print_elt_sym_diag()

static void z_spm_print_elt_sym_diag ( spm_int_t  row,
spm_int_t  dofi,
spm_zconj_fct_t  conjfct,
const spm_complex64_t *  valptr,
FILE *  f 
)
static

Print a diagonal element within a symmetric/hermitian matrix with column/row major storage.

Note that column major is using the low triangular part only of the diagonal element matrices, and row major, by symmetry, is using only the upper triangular part.

The comments in the code are made for column major storage.

Parameters
[in]rowTODO
[in]dofiTODO
[in]conjfctTODO
[in]valptrTODO
[in,out]fTODO

Definition at line 57 of file z_spm_print.c.

References z_spmPrintElt().

Referenced by z_spm_print_elt().

◆ z_spm_print_elt_gen_col()

static void z_spm_print_elt_gen_col ( spm_int_t  row,
spm_int_t  dofi,
spm_int_t  col,
spm_int_t  dofj,
spm_zconj_fct_t  conjfct,
const spm_complex64_t *  valptr,
FILE *  f 
)
static

Print a general element matrix with column major storage.

Parameters
[in]rowTODO
[in]dofiTODO
[in]colTODO
[in]dofjTODO
[in]conjfctTODO
[in]valptrTODO
[in,out]fTODO

Definition at line 117 of file z_spm_print.c.

References z_spmPrintElt().

Referenced by z_spm_print_elt_gen(), and z_spm_print_elt_sym_offd().

◆ z_spm_print_elt_gen_row()

static void z_spm_print_elt_gen_row ( spm_int_t  row,
spm_int_t  dofi,
spm_int_t  col,
spm_int_t  dofj,
spm_zconj_fct_t  conjfct,
const spm_complex64_t *  valptr,
FILE *  f 
)
static

Print a general element matrix with row major storage.

Parameters
[in]rowTODO
[in]dofiTODO
[in]colTODO
[in]dofjTODO
[in]conjfctTODO
[in]valptrTODO
[in,out]fTODO

Definition at line 167 of file z_spm_print.c.

References z_spmPrintElt().

Referenced by z_spm_print_elt_gen(), and z_spm_print_elt_sym_offd().

◆ z_spm_print_elt_gen()

static void z_spm_print_elt_gen ( spm_layout_t  layout,
spm_int_t  row,
spm_int_t  dofi,
spm_int_t  col,
spm_int_t  dofj,
const spm_zconj_fct_t  conjfct,
const spm_complex64_t *  valptr,
FILE *  f 
)
static

Print a general element matrix.

Parameters
[in]layoutTODO
[in]rowTODO
[in]dofiTODO
[in]colTODO
[in]dofjTODO
[in]conjfctTODO
[in]valptrTODO
[in,out]fTODO

Definition at line 220 of file z_spm_print.c.

References SpmColMajor, z_spm_print_elt_gen_col(), and z_spm_print_elt_gen_row().

Referenced by z_spm_print_elt().

◆ z_spm_print_elt_sym_offd()

static void z_spm_print_elt_sym_offd ( spm_layout_t  layout,
spm_int_t  row,
spm_int_t  dofi,
spm_int_t  col,
spm_int_t  dofj,
spm_zconj_fct_t  conjfct,
const spm_complex64_t *  valptr,
FILE *  f 
)
static

Print an off-diagonal element matrix in the symmetric/hermitian case.

Parameters
[in]layoutTODO
[in]rowTODO
[in]dofiTODO
[in]colTODO
[in]dofjTODO
[in]conjfctTODO
[in]valptrTODO
[in,out]fTODO

Definition at line 270 of file z_spm_print.c.

References SpmColMajor, z_spm_print_elt_gen_col(), and z_spm_print_elt_gen_row().

Referenced by z_spm_print_elt().

◆ z_spm_print_elt()

static void z_spm_print_elt ( spm_mtxtype_t  mtxtype,
spm_layout_t  layout,
spm_int_t  row,
spm_int_t  dofi,
spm_int_t  col,
spm_int_t  dofj,
const spm_complex64_t *  valptr,
FILE *  f 
)
static

Print an element matrix.

Parameters
[in]mtxtypeTODO
[in]layoutTODO
[in]rowTODO
[in]dofiTODO
[in]colTODO
[in]dofjTODO
[in]valptrTODO
[in,out]fTODO

Definition at line 327 of file z_spm_print.c.

References SpmGeneral, SpmHermitian, z_spm_print_elt_gen(), z_spm_print_elt_sym_diag(), and z_spm_print_elt_sym_offd().

Referenced by z_spmCSCPrint(), z_spmCSRPrint(), and z_spmIJVPrint().

◆ z_spmCSCPrint()

void z_spmCSCPrint ( FILE *  f,
const spmatrix_t spm 
)

Write CSC matrix in a file.

Parameters
[in,out]fOutput file
[in]spmThe spm structure describing the matrix.

Definition at line 377 of file z_spm_print.c.

References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::dof, spmatrix_s::dofs, spmatrix_s::flttype, spmatrix_s::fmttype, spmatrix_s::layout, spmatrix_s::loc2glob, spmatrix_s::mtxtype, spmatrix_s::n, spmatrix_s::replicated, spmatrix_s::rowptr, SpmComplex64, SpmCSC, spmatrix_s::values, and z_spm_print_elt().

Referenced by z_spmPrint().

◆ z_spmCSRPrint()

void z_spmCSRPrint ( FILE *  f,
const spmatrix_t spm 
)

Write CSR matrix in a file.

Parameters
[in]fOutput file
[in]spmThe spm structure describing the matrix.

Definition at line 444 of file z_spm_print.c.

References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::dof, spmatrix_s::dofs, spmatrix_s::flttype, spmatrix_s::fmttype, spmatrix_s::layout, spmatrix_s::loc2glob, spmatrix_s::mtxtype, spmatrix_s::n, spmatrix_s::replicated, spmatrix_s::rowptr, SpmComplex64, SpmCSR, spmatrix_s::values, and z_spm_print_elt().

Referenced by z_spmPrint().

◆ z_spmIJVPrint()

void z_spmIJVPrint ( FILE *  f,
const spmatrix_t spm 
)

Write IJV matrix in a file.

Parameters
[in]fOutput file
[in]spmThe spm structure describing the matrix.

Definition at line 515 of file z_spm_print.c.

References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::dof, spmatrix_s::dofs, spmatrix_s::flttype, spmatrix_s::fmttype, spmatrix_s::layout, spmatrix_s::mtxtype, spmatrix_s::nnz, spmatrix_s::rowptr, SpmComplex64, SpmIJV, spmatrix_s::values, and z_spm_print_elt().

Referenced by z_spmPrint().