HLIBpro  2.8.1
C Bindings

Classes

struct  hlib_acc_fixed_eps_t
 
struct  hlib_acc_fixed_rank_t
 
struct  hlib_acc_blocked_t
 
union  hlib_acc_u
 

Typedefs

typedef union hlib_acc_u hlib_acc_t
 
typedef void(* hlib_errorfn_t) (const int errcode, const char *errmsg)
 
typedef void(* hlib_progressfn_t) (const double *values, int *cancel, void *arg)
 

Enumerations

enum  hlib_matop_t { HLIB_MATOP_NORM = 'N', HLIB_MATOP_TRANS = 'T', HLIB_MATOP_ADJ = 'C' }
 
enum  hlib_bsp_t {
  HLIB_BSP_AUTO, HLIB_BSP_GEOM_MAX, HLIB_BSP_GEOM_REG, HLIB_BSP_CARD_MAX,
  HLIB_BSP_CARD_REG, HLIB_BSP_PCA, HLIB_BSP_GEOM, HLIB_BSP_CARD,
  HLIB_BSP_REGULAR
}
 
enum  hlib_alg_t {
  HLIB_ALG_AUTO, HLIB_ALG_BFS, HLIB_ALG_ML, HLIB_ALG_METIS,
  HLIB_ALG_SCOTCH
}
 
enum  hlib_adm_t { HLIB_ADM_AUTO, HLIB_ADM_STD_MIN, HLIB_ADM_STD_MAX, HLIB_ADM_WEAK }
 
enum  hlib_acc_type_t { HLIB_ACC_FIXED_EPS, HLIB_ACC_FIXED_RANK, HLIB_ACC_BLOCKED, HLIB_ACC_STRING }
 
enum  hlib_lrapx_t {
  HLIB_LRAPX_SVD, HLIB_LRAPX_ACA, HLIB_LRAPX_ACAPLUS, HLIB_LRAPX_ACAFULL,
  HLIB_LRAPX_HCA, HLIB_LRAPX_ZERO, HLIB_LRAPX_RANDSVD, HLIB_LRAPX_RRQR
}
 
enum  { HLIB_MATIO_SVD = 0x1, HLIB_MATIO_ENTRY = 0x2, HLIB_MATIO_PATTERN = 0x4 }
 
enum  {
  HLIB_NO_ERROR = 0, HLIB_ERR_INIT = 100, HLIB_ERR_LICENSE = 101, HLIB_ERR_NOT_IMPL = 102,
  HLIB_ERR_CONSISTENCY = 103, HLIB_ERR_COMM = 104, HLIB_ERR_PERM = 105, HLIB_ERR_REAL = 200,
  HLIB_ERR_NREAL = 201, HLIB_ERR_COMPLEX = 202, HLIB_ERR_NCOMPLEX = 203, HLIB_ERR_REAL_CMPLX = 204,
  HLIB_ERR_DIV_ZERO = 205, HLIB_ERR_NEG_SQRT = 206, HLIB_ERR_INF = 207, HLIB_ERR_NAN = 208,
  HLIB_ERR_NCONVERGED = 209, HLIB_ERR_ARG = 300, HLIB_ERR_MEM = 301, HLIB_ERR_NULL = 302,
  HLIB_ERR_SIZE = 303, HLIB_ERR_INDEXSET = 304, HLIB_ERR_DIM = 305, HLIB_ERR_ARR_BOUND = 306,
  HLIB_ERR_DIAG_ENTRY = 307, HLIB_ERR_COORD_INVALID = 400, HLIB_ERR_CT_INVALID = 500, HLIB_ERR_CT_TYPE = 501,
  HLIB_ERR_CT_STRUCT = 502, HLIB_ERR_CT_INCOMP = 503, HLIB_ERR_CT_SPARSE = 504, HLIB_ERR_BCT_INVALID = 600,
  HLIB_ERR_BCT_STRUCT = 601, HLIB_ERR_VEC_INVALID = 700, HLIB_ERR_VEC_TYPE = 701, HLIB_ERR_VEC_STRUCT = 702,
  HLIB_ERR_VEC_SIZE = 703, HLIB_ERR_VEC_INCOMP = 704, HLIB_ERR_VEC_NSCALAR = 705, HLIB_ERR_MAT_TYPE = 800,
  HLIB_ERR_MAT_STRUCT = 801, HLIB_ERR_MAT_SIZE = 802, HLIB_ERR_MAT_SINGULAR = 803, HLIB_ERR_MAT_NSPARSE = 804,
  HLIB_ERR_MAT_NDENSE = 805, HLIB_ERR_MAT_NHMAT = 806, HLIB_ERR_MAT_INCOMP_TYPE = 807, HLIB_ERR_MAT_INCOMP_CT = 808,
  HLIB_ERR_MAT_INVALID = 809, HLIB_ERR_MAT_NSYM = 810, HLIB_ERR_MAT_NHERM = 811, HLIB_ERR_MAT_NPOSDEF = 812,
  HLIB_ERR_FMT_UNKNOWN = 900, HLIB_ERR_FMT_HFORMAT = 901, HLIB_ERR_FMT_SAMG = 902, HLIB_ERR_FMT_MATLAB = 903,
  HLIB_ERR_FMT_PLTMG = 904, HLIB_ERR_FMT_HB = 905, HLIB_ERR_FMT_MTX = 906, HLIB_ERR_FMT_PLY = 907,
  HLIB_ERR_GRID_FORMAT = 1000, HLIB_ERR_GRID_DATA = 1001, HLIB_ERR_FOPEN = 1100, HLIB_ERR_FCLOSE = 1101,
  HLIB_ERR_FWRITE = 1102, HLIB_ERR_FREAD = 1103, HLIB_ERR_FSEEK = 1104, HLIB_ERR_FNEXISTS = 1105,
  HLIB_ERR_BS_SIZE = 1200, HLIB_ERR_BS_WRITE = 1201, HLIB_ERR_BS_READ = 1202, HLIB_ERR_BS_TYPE = 1203,
  HLIB_ERR_BS_DATA = 1204, HLIB_ERR_NOZLIB = 1300, HLIB_ERR_ZLIB_UNZIP = 1301, HLIB_ERR_NOMETIS = 1302,
  HLIB_ERR_NOSCOTCH = 1303, HLIB_ERR_SCOTCH = 1304, HLIB_ERR_NOCHACO = 1305, HLIB_ERR_NOLIBGRAPH = 1306,
  HLIB_ERR_NOFFTW3 = 1307, HLIB_ERR_NOCAIRO = 1308, HLIB_ERR_NOHDF5 = 1309, HLIB_ERR_MPI = 1400,
  HLIB_ERR_SOLVER_INVALID = 1500, HLIB_ERR_LRAPX_INVALID = 1501, HLIB_ERR_GRID_INVALID = 1502, HLIB_ERR_FNSPACE_INVALID = 1503
}
 
enum  { HLIB_PROGRESS_MIN = 0, HLIB_PROGRESS_MAX = 1, HLIB_PROGRESS_VAL = 2 }
 

Functions

HLIB_FNDECL void hlib_init (int *info)
 
HLIB_FNDECL void hlib_done (int *info)
 
HLIB_FNDECL int hlib_is_init ()
 
HLIB_FNDECL void hlib_error_desc (char *desc, const size_t size)
 

Coordinates

HLIB_FNDECL hlib_coord_t hlib_coord_import (const size_t n, const unsigned int dim, double **coord, const double *period, int *info)
 
HLIB_FNDECL size_t hlib_coord_ncoord (const hlib_coord_t coord, int *info)
 
HLIB_FNDECL unsigned int hlib_coord_dim (const hlib_coord_t coord, int *info)
 
HLIB_FNDECL double * hlib_coord_get (const hlib_coord_t coord, const size_t i, int *info)
 
HLIB_FNDECL double * hlib_coord_bbmin (const hlib_coord_t coord, const size_t i, int *info)
 
HLIB_FNDECL double * hlib_coord_bbmax (const hlib_coord_t coord, const size_t i, int *info)
 
HLIB_FNDECL int hlib_coord_has_bbox (const hlib_coord_t coord, int *info)
 
HLIB_FNDECL void hlib_coord_set_period (hlib_coord_t coord, const double period[], int *info)
 
HLIB_FNDECL void hlib_coord_get_period (hlib_coord_t coord, double period[], int *info)
 
HLIB_FNDECL void hlib_coord_free (hlib_coord_t coord, int *info)
 
HLIB_FNDECL size_t hlib_coord_bytesize (const hlib_coord_t coord, int *info)
 
HLIB_FNDECL void hlib_coord_print_vrml (const hlib_coord_t coord, const char *filename, int *info)
 
HLIB_FNDECL void hlib_coord_print_vtk (const hlib_coord_t coord, const char *filename, int *info)
 

Admissibility condition

HLIB_FNDECL hlib_admcond_t hlib_admcond_geom (const hlib_adm_t crit, const double eta, int *info)
 
HLIB_FNDECL hlib_admcond_t hlib_admcond_geom_period (const hlib_adm_t crit, const double eta, const double *period, const unsigned int dim, int *info)
 
HLIB_FNDECL hlib_admcond_t hlib_admcond_geom_hilo (const hlib_complex_t kappa, const unsigned int nwaves, const double eta, int *info)
 
HLIB_FNDECL hlib_admcond_t hlib_admcond_alg (const hlib_adm_t crit, const double eta, const hlib_matrix_t S, const hlib_permutation_t row_perm, const hlib_permutation_t col_perm, int *info)
 
HLIB_FNDECL void hlib_admcond_free (const hlib_admcond_t ac, int *info)
 

Clusters

Nodes and sub trees in a cluster tree.

HLIB_FNDECL int hlib_cl_first (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL int hlib_cl_last (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL size_t hlib_cl_size (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL size_t hlib_cl_nsons (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL hlib_cluster_t hlib_cl_son (const hlib_cluster_t cl, const unsigned int i, int *info)
 
HLIB_FNDECL int hlib_cl_is_leaf (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL size_t hlib_cl_nnodes (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL size_t hlib_cl_depth (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL hlib_cluster_t hlib_cl_copy (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL void hlib_cl_free (hlib_cluster_t cl, int *info)
 
HLIB_FNDECL size_t hlib_cl_bytesize (const hlib_cluster_t cl, int *info)
 
HLIB_FNDECL void hlib_cl_print_ps (const hlib_cluster_t cl, const char *filename, int *info)
 

Cluster Trees

Root of a cluster tree with stored index permutations.

HLIB_FNDECL hlib_clustertree_t hlib_clt_build_bsp (const hlib_coord_t coord, const hlib_bsp_t bsptype, const unsigned int nmin, int *info)
 
HLIB_FNDECL hlib_clustertree_t hlib_clt_build_bsp_nd (const hlib_coord_t coord, const hlib_matrix_t S, const hlib_bsp_t bsptype, const unsigned int nmin, int *info)
 
HLIB_FNDECL hlib_clustertree_t hlib_clt_build_bsp_part (const hlib_coord_t coord, const unsigned int *partition, const int eq_depth, const hlib_bsp_t bsptype, const unsigned int nmin, int *info)
 
HLIB_FNDECL hlib_clustertree_t hlib_clt_build_alg (const hlib_matrix_t S, const hlib_alg_t algtype, const unsigned int nmin, int *info)
 
HLIB_FNDECL hlib_clustertree_t hlib_clt_build_alg_nd (const hlib_matrix_t S, const hlib_alg_t algtype, const unsigned int nmin, int *info)
 
HLIB_FNDECL hlib_clustertree_t hlib_clt_build_alg_part (const hlib_matrix_t S, const unsigned int *partition, const hlib_alg_t algtype, const unsigned int nmin, int *info)
 
HLIB_FNDECL hlib_cluster_t hlib_clt_root (hlib_clustertree_t ct, int *info)
 
HLIB_FNDECL hlib_permutation_t hlib_clt_perm_i2e (hlib_clustertree_t ct, int *info)
 
HLIB_FNDECL hlib_permutation_t hlib_clt_perm_e2i (hlib_clustertree_t ct, int *info)
 
HLIB_FNDECL void hlib_clt_free (hlib_clustertree_t ct, int *info)
 
HLIB_FNDECL size_t hlib_clt_bytesize (const hlib_clustertree_t ct, int *info)
 
HLIB_FNDECL size_t hlib_clt_nnodes (const hlib_clustertree_t ct, int *info)
 
HLIB_FNDECL size_t hlib_clt_depth (const hlib_clustertree_t ct, int *info)
 
HLIB_FNDECL void hlib_clt_print_ps (const hlib_clustertree_t ct, const char *filename, int *info)
 

Block Clusters

Nodes and sub trees of block cluster trees.

HLIB_FNDECL hlib_blockcluster_t hlib_bc_parent (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL size_t hlib_bc_nsons (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL hlib_blockcluster_t hlib_bc_son (const hlib_blockcluster_t bc, const unsigned int i, const unsigned int j, int *info)
 
HLIB_FNDECL int hlib_bc_is_leaf (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL int hlib_bc_is_adm (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL size_t hlib_bc_nnodes (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL size_t hlib_bc_depth (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL hlib_cluster_t hlib_bc_rowcl (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL hlib_cluster_t hlib_bc_colcl (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL hlib_blockcluster_t hlib_bc_copy (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL void hlib_bc_free (hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL size_t hlib_bc_bytesize (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL int hlib_bc_csp (const hlib_blockcluster_t bc, int *info)
 
HLIB_FNDECL void hlib_bc_print_ps (const hlib_blockcluster_t bc, const char *filename, int *info)
 

Block Cluster Trees

Root of block cluster trees with access to index permutations.

HLIB_FNDECL hlib_blockclustertree_t hlib_bct_build (const hlib_clustertree_t rowct, const hlib_clustertree_t colct, const hlib_admcond_t ac, int *info)
 
HLIB_FNDECL size_t hlib_bct_nnodes (const hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL size_t hlib_bct_depth (const hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL hlib_clustertree_t hlib_bct_rowct (const hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL hlib_clustertree_t hlib_bct_colct (const hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL void hlib_bct_free (hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL size_t hlib_bct_bytesize (const hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL void hlib_bct_distribute_block (hlib_blockclustertree_t bct, const unsigned int p, const unsigned int min_lvl, const int symmetric, int *info)
 
HLIB_FNDECL int hlib_bct_csp (const hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL void hlib_bct_print_ps (const hlib_blockclustertree_t bct, const char *filename, int *info)
 

Vectors

HLIB_FNDECL size_t hlib_vector_size (const hlib_vector_t v, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_vector_copy (const hlib_vector_t v, int *info)
 
HLIB_FNDECL size_t hlib_vector_bytesize (const hlib_vector_t v, int *info)
 
HLIB_FNDECL void hlib_vector_free (hlib_vector_t v, int *info)
 
HLIB_FNDECL hlib_real_t hlib_vector_entry_get (const hlib_vector_t x, const size_t i, int *info)
 
HLIB_FNDECL hlib_complex_t hlib_vector_centry_get (const hlib_vector_t x, const size_t i, int *info)
 
HLIB_FNDECL void hlib_vector_entry_set (const hlib_vector_t x, const size_t i, const hlib_real_t f, int *info)
 
HLIB_FNDECL void hlib_vector_centry_set (const hlib_vector_t x, const size_t i, const hlib_complex_t f, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_vector_build (const size_t size, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_vector_cbuild (const size_t size, int *info)
 
HLIB_FNDECL void hlib_vector_import (hlib_vector_t v, const hlib_real_t *arr, int *info)
 
HLIB_FNDECL void hlib_vector_cimport (hlib_vector_t v, const hlib_complex_t *arr, int *info)
 
HLIB_FNDECL void hlib_vector_export (const hlib_vector_t v, hlib_real_t *arr, int *info)
 
HLIB_FNDECL void hlib_vector_cexport (const hlib_vector_t v, hlib_complex_t *arr, int *info)
 
HLIB_FNDECL void hlib_vector_fill (hlib_vector_t x, const hlib_real_t f, int *info)
 
HLIB_FNDECL void hlib_vector_cfill (hlib_vector_t x, const hlib_complex_t f, int *info)
 
HLIB_FNDECL void hlib_vector_fill_rand (hlib_vector_t x, int *info)
 
HLIB_FNDECL void hlib_vector_assign (hlib_vector_t y, const hlib_vector_t x, int *info)
 
HLIB_FNDECL void hlib_vector_scale (hlib_vector_t x, const hlib_real_t f, int *info)
 
HLIB_FNDECL void hlib_vector_cscale (hlib_vector_t x, const hlib_complex_t f, int *info)
 
HLIB_FNDECL void hlib_vector_axpy (const hlib_real_t alpha, const hlib_vector_t x, hlib_vector_t y, int *info)
 
HLIB_FNDECL void hlib_vector_caxpy (const hlib_complex_t alpha, const hlib_vector_t x, hlib_vector_t y, int *info)
 
HLIB_FNDECL hlib_complex_t hlib_vector_dot (const hlib_vector_t x, const hlib_vector_t y, int *info)
 
HLIB_FNDECL hlib_real_t hlib_vector_norm2 (const hlib_vector_t x, int *info)
 
HLIB_FNDECL hlib_real_t hlib_vector_norm_inf (const hlib_vector_t x, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_vector_restrict_re (const hlib_vector_t v, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_vector_restrict_im (const hlib_vector_t v, int *info)
 
HLIB_FNDECL void hlib_vector_permute (hlib_vector_t v, const hlib_permutation_t perm, int *info)
 
HLIB_FNDECL void hlib_vector_fft (const hlib_vector_t v, int *info)
 
HLIB_FNDECL void hlib_vector_ifft (const hlib_vector_t v, int *info)
 

Matrices

HLIB_FNDECL void hlib_linearoperator_free (hlib_linearoperator_t A, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_linearoperator_range_vector (const hlib_linearoperator_t A, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_linearoperator_domain_vector (const hlib_linearoperator_t A, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_perm_linearoperator (const hlib_permutation_t P, const hlib_linearoperator_t A, const hlib_permutation_t R, int *info)
 
HLIB_FNDECL void hlib_linearoperator_apply (const hlib_linearoperator_t A, const hlib_vector_t x, hlib_vector_t y, const hlib_matop_t matop, int *info)
 
HLIB_FNDECL void hlib_linearoperator_apply_add (const hlib_real_t alpha, const hlib_linearoperator_t A, const hlib_vector_t x, hlib_vector_t y, const hlib_matop_t matop, int *info)
 
HLIB_FNDECL void hlib_linearoperator_capply_add (const hlib_complex_t alpha, const hlib_linearoperator_t A, const hlib_vector_t x, hlib_vector_t y, const hlib_matop_t matop, int *info)
 
HLIB_FNDECL size_t hlib_matrix_rows (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL size_t hlib_matrix_cols (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_copy (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_acc (const hlib_matrix_t A, const hlib_acc_t acc, const int coarsen, int *info)
 
HLIB_FNDECL void hlib_matrix_copyto (const hlib_matrix_t A, hlib_matrix_t B, int *info)
 
HLIB_FNDECL void hlib_matrix_copyto_acc (const hlib_matrix_t A, hlib_matrix_t B, const hlib_acc_t acc, const int coarsen, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_blockdiag (const hlib_matrix_t A, const unsigned int lvl, const size_t blocksize, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_blockdiag_acc (const hlib_matrix_t A, const hlib_acc_t acc, const unsigned int lvl, const size_t blocksize, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_nearfield (const hlib_matrix_t A, const int without_farfield, int *info)
 
HLIB_FNDECL void hlib_matrix_restrict_nearfield (hlib_matrix_t A, const int delete_farfield, int *info)
 
HLIB_FNDECL void hlib_matrix_nearfield_to_crs (const hlib_matrix_t A, size_t *nnz, int **rowptr, int **colind, hlib_real_t **coeffs, int *info)
 
HLIB_FNDECL void hlib_matrix_nearfield_to_ccrs (const hlib_matrix_t A, size_t *nnz, int **rowptr, int **colind, hlib_complex_t **coeffs, int *info)
 
HLIB_FNDECL size_t hlib_matrix_bytesize (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL void hlib_matrix_free (hlib_matrix_t A, int *info)
 
HLIB_FNDECL int hlib_matrix_is_sym (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL int hlib_matrix_is_herm (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL int hlib_matrix_is_complex (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL void hlib_matrix_to_real (const hlib_matrix_t A, const int force, int *info)
 
HLIB_FNDECL void hlib_matrix_to_complex (const hlib_matrix_t A, const int force, int *info)
 
HLIB_FNDECL hlib_real_t hlib_matrix_entry_get (const hlib_matrix_t A, const size_t i, const size_t j, int *info)
 
HLIB_FNDECL hlib_complex_t hlib_matrix_centry_get (const hlib_matrix_t A, const size_t i, const size_t j, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_matrix_row_vector (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_matrix_col_vector (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_import_crs (const size_t rows, const size_t cols, const size_t nnz, const int *rowptr, const int *colind, const hlib_real_t *coeffs, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_import_ccrs (const size_t rows, const size_t cols, const size_t nnz, const int *rowptr, const int *colind, const hlib_complex_t *coeffs, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_import_ccs (const size_t rows, const size_t cols, const size_t nnz, const int *colptr, const int *rowind, const hlib_real_t *coeffs, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_import_cccs (const size_t rows, const size_t cols, const size_t nnz, const int *colptr, const int *rowind, const hlib_complex_t *coeffs, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_import_dense (const size_t rows, const size_t cols, const hlib_real_t *D, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_import_cdense (const size_t rows, const size_t cols, const hlib_complex_t *D, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_build_sparse (const hlib_blockclustertree_t bct, const hlib_matrix_t S, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_build_dense (const hlib_blockclustertree_t bct, const hlib_matrix_t D, const hlib_lrapx_t lrapx, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_build_coeff (const hlib_blockclustertree_t bct, const hlib_coeff_t f, void *arg, const hlib_lrapx_t lrapx, const hlib_acc_t acc, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_build_ccoeff (const hlib_blockclustertree_t bct, const hlib_ccoeff_t f, void *arg, const hlib_lrapx_t lrapx, const hlib_acc_t acc, const int sym, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_build_identity (const hlib_blockclustertree_t bct, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_assemble_block (const size_t brows, const size_t bcols, hlib_matrix_t *submat, const int copy, int *info)
 
HLIB_FNDECL hlib_permutation_t hlib_matrix_row_perm_i2e (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_permutation_t hlib_matrix_col_perm_i2e (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_permutation_t hlib_matrix_row_perm_e2i (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_permutation_t hlib_matrix_col_perm_e2i (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL void hlib_matrix_permute (hlib_matrix_t A, const hlib_permutation_t row_perm, const hlib_permutation_t col_perm, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_perm_matrix (const hlib_permutation_t P, const hlib_matrix_t A, const hlib_permutation_t R, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_product2 (const hlib_matop_t matop1, const hlib_linearoperator_t A1, const hlib_matop_t matop2, const hlib_linearoperator_t A2, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_product3 (const hlib_matop_t matop1, const hlib_linearoperator_t A1, const hlib_matop_t matop2, const hlib_linearoperator_t A2, const hlib_matop_t matop3, const hlib_linearoperator_t A3, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_sum2 (const hlib_real_t alpha1, const hlib_matop_t matop1, const hlib_linearoperator_t A1, const hlib_real_t alpha2, const hlib_matop_t matop2, const hlib_linearoperator_t A2, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_sum3 (const hlib_real_t alpha1, const hlib_matop_t matop1, const hlib_linearoperator_t A1, const hlib_real_t alpha2, const hlib_matop_t matop2, const hlib_linearoperator_t A2, const hlib_real_t alpha3, const hlib_matop_t matop3, const hlib_linearoperator_t A3, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_to_dense (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_to_rank (const hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_approx_rank_aca (const hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL void hlib_matrix_print_ps (const hlib_matrix_t A, const char *filename, const int options, int *info)
 

Algebra

HLIB_FNDECL void hlib_matrix_mulvec (const hlib_real_t alpha, const hlib_matrix_t A, const hlib_vector_t x, const hlib_real_t beta, hlib_vector_t y, const hlib_matop_t matop, int *info)
 
HLIB_FNDECL void hlib_matrix_cmulvec (const hlib_complex_t alpha, const hlib_matrix_t A, const hlib_vector_t x, const hlib_complex_t beta, hlib_vector_t y, const hlib_matop_t matop, int *info)
 
HLIB_FNDECL void hlib_matrix_transpose (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL void hlib_matrix_conjugate (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL void hlib_matrix_scale (const hlib_real_t f, const hlib_matrix_t A, int *info)
 
HLIB_FNDECL void hlib_matrix_cscale (const hlib_complex_t f, const hlib_matrix_t A, int *info)
 
HLIB_FNDECL void hlib_matrix_add (const hlib_real_t alpha, const hlib_matrix_t A, const hlib_real_t beta, hlib_matrix_t B, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL void hlib_matrix_cadd (const hlib_complex_t alpha, const hlib_matrix_t A, const hlib_complex_t beta, hlib_matrix_t B, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL void hlib_matrix_mul (const hlib_real_t alpha, const hlib_matop_t matop_A, const hlib_matrix_t A, const hlib_matop_t matop_B, const hlib_matrix_t B, const hlib_real_t beta, hlib_matrix_t C, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL void hlib_matrix_cmul (const hlib_complex_t alpha, const hlib_matop_t matop_A, const hlib_matrix_t A, const hlib_matop_t matop_B, const hlib_matrix_t B, const hlib_complex_t beta, hlib_matrix_t C, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matrix_inv (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_matrix_inv_diag (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_factorise (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_factorise_inv (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_lu (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ldl (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ll (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_chol (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_waz (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_lu_inv (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ldl_inv (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ll_inv (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_matrix_chol_inv (hlib_matrix_t A, const hlib_acc_t acc, int *info)
 
HLIB_FNDECL void hlib_matrix_solve_lower_left (const hlib_matrix_t L, const hlib_matop_t op_L, hlib_matrix_t A, const hlib_acc_t acc, const int pointwise, const int unit_diag, int *info)
 
HLIB_FNDECL void hlib_matrix_solve_lower_right (hlib_matrix_t A, const hlib_matrix_t L, const hlib_matop_t op_L, const hlib_acc_t acc, const int pointwise, const int unit_diag, int *info)
 
HLIB_FNDECL void hlib_matrix_solve_upper_right (hlib_matrix_t A, const hlib_matrix_t U, const hlib_acc_t acc, const int pointwise, const int unit_diag, int *info)
 
HLIB_FNDECL void hlib_matrix_solve_diag_left (const hlib_matrix_t D, const hlib_matop_t op_D, hlib_matrix_t A, const hlib_acc_t acc, const int pointwise, int *info)
 
HLIB_FNDECL void hlib_matrix_solve_diag_right (hlib_matrix_t A, const hlib_matrix_t D, const hlib_matop_t op_D, const hlib_acc_t acc, const int pointwise, int *info)
 
HLIB_FNDECL void hlib_matrix_add_identity (hlib_matrix_t A, const hlib_real_t lambda, int *info)
 
HLIB_FNDECL void hlib_matrix_cadd_identity (hlib_matrix_t A, const hlib_complex_t lambda, int *info)
 
HLIB_FNDECL hlib_real_t hlib_matrix_norm_frobenius (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_real_t hlib_matrix_norm_frobenius_diff (const hlib_matrix_t A, const hlib_matrix_t B, int *info)
 
HLIB_FNDECL hlib_real_t hlib_matrix_norm_spectral (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_real_t hlib_matrix_norm_spectral_inv (const hlib_matrix_t A, int *info)
 
HLIB_FNDECL hlib_real_t hlib_matrix_norm_spectral_diff (const hlib_matrix_t A, const hlib_matrix_t B, int *info)
 
HLIB_FNDECL hlib_real_t hlib_matrix_norm_inv_approx (const hlib_matrix_t A, const hlib_matrix_t B, int *info)
 
HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_spectral (const hlib_linearoperator_t A, int *info)
 
HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_spectral_inv (const hlib_linearoperator_t A, int *info)
 
HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_spectral_diff (const hlib_linearoperator_t A, const hlib_linearoperator_t B, int *info)
 
HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_inv_approx (const hlib_linearoperator_t A, const hlib_linearoperator_t B, int *info)
 

Solver

HLIB_FNDECL hlib_solver_t hlib_solver_auto (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_linear_iteration (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_richardson (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_cg (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_cgs (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_bicgstab (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_tfqmr (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_minres (int *info)
 
HLIB_FNDECL hlib_solver_t hlib_solver_gmres (const int restart, int *info)
 
HLIB_FNDECL void hlib_solver_solve (const hlib_solver_t solver, const hlib_linearoperator_t A, hlib_vector_t x, const hlib_vector_t b, const hlib_linearoperator_t W, hlib_solve_info_t *solve_info, int *info)
 
HLIB_FNDECL void hlib_solver_stopcrit (hlib_solver_t solver, const int maxit, const hlib_real_t abs_red, const hlib_real_t rel_red, int *info)
 
HLIB_FNDECL void hlib_solver_initialise_start_value (hlib_solver_t solver, const int flag, int *info)
 
HLIB_FNDECL void hlib_solver_use_exact_residual (hlib_solver_t solver, const int flag, int *info)
 
HLIB_FNDECL void hlib_solver_free (hlib_solver_t solver, int *info)
 

Input/Output

HLIB_FNDECL hlib_matrix_t hlib_hformat_load_matrix (const char *filename, int *info)
 
HLIB_FNDECL hlib_linearoperator_t hlib_hformat_load_linearoperator (const char *filename, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_hformat_load_vector (const char *filename, int *info)
 
HLIB_FNDECL void hlib_hformat_save_linearoperator (const hlib_linearoperator_t A, const char *filename, int *info)
 
HLIB_FNDECL void hlib_hformat_save_matrix (const hlib_matrix_t A, const char *filename, int *info)
 
HLIB_FNDECL void hlib_hformat_save_vector (const hlib_vector_t v, const char *filename, int *info)
 
HLIB_FNDECL hlib_coord_t hlib_hformat_load_coord (const char *filename, int *info)
 
HLIB_FNDECL void hlib_hformat_save_coord (const hlib_coord_t coord, const char *filename, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_samg_load_matrix (const char *filename, int *info)
 
HLIB_FNDECL void hlib_samg_save_matrix (const hlib_matrix_t A, const char *filename, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_samg_load_vector (const char *filename, int *info)
 
HLIB_FNDECL void hlib_samg_save_vector (const hlib_vector_t x, const char *filename, int *info)
 
HLIB_FNDECL void hlib_samg_save_coord (const hlib_coord_t coord, const char *filename, int *info)
 
HLIB_FNDECL hlib_coord_t hlib_samg_load_coord (const char *filename, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_matlab_load_matrix (const char *filename, const char *matname, int *info)
 
HLIB_FNDECL void hlib_matlab_save_matrix (const hlib_matrix_t M, const char *filename, const char *matname, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_matlab_load_vector (const char *filename, const char *vecname, int *info)
 
HLIB_FNDECL void hlib_matlab_save_vector (const hlib_vector_t v, const char *filename, const char *vecname, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_pltmg_load_matrix (const char *filename, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_hb_load_matrix (const char *filename, int *info)
 
HLIB_FNDECL void hlib_hb_save_matrix (const hlib_matrix_t M, const char *filename, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_mm_load_matrix (const char *filename, int *info)
 
HLIB_FNDECL hlib_matrix_t hlib_load_matrix (const char *filename, int *info)
 
HLIB_FNDECL hlib_vector_t hlib_load_vector (const char *filename, int *info)
 
HLIB_FNDECL hlib_coord_t hlib_load_coord (const char *filename, int *info)
 

Accuracy Management

HLIB_FNDECL hlib_acc_t hlib_acc_fixed_eps (const hlib_real_t eps)
 
HLIB_FNDECL hlib_acc_t hlib_acc_fixed_rank (const unsigned int k)
 
HLIB_FNDECL hlib_acc_t hlib_acc_blocked (const hlib_acc_t *blockacc)
 

Misc.

HLIB_FNDECL double hlib_walltime ()
 
HLIB_FNDECL double hlib_cputime ()
 
HLIB_FNDECL void hlib_set_n_min (const unsigned int n)
 
HLIB_FNDECL void hlib_set_verbosity (const unsigned int verb)
 
HLIB_FNDECL void hlib_set_abs_eps (const hlib_real_t eps)
 
HLIB_FNDECL void hlib_set_coarsening (const int build, const int arith)
 
HLIB_FNDECL void hlib_set_recompress (const int recompress)
 
HLIB_FNDECL void hlib_set_diag_scale (const int scale)
 
HLIB_FNDECL void hlib_set_nthreads (const unsigned int p)
 
HLIB_FNDECL void hlib_set_progress_cb (hlib_progressfn_t fn, void *arg)
 
HLIB_FNDECL void hlib_set_config (const char *option, const char *value, int *info)
 
HLIB_FNDECL void hlib_get_config (const char *option, char *value, const size_t len, int *info)
 
HLIB_FNDECL void hlib_print_parameters ()
 
HLIB_FNDECL void hlib_set_error_fn (const hlib_errorfn_t errorfn)
 
HLIB_FNDECL void hlib_set_warning_fn (const hlib_errorfn_t warnfn)
 
HLIB_FNDECL unsigned int hlib_major_version ()
 
HLIB_FNDECL unsigned int hlib_minor_version ()
 

Functions for hlib_complex_t

hlib_complex_t hlib_complex (const hlib_real_t re, const hlib_real_t im)
 
hlib_complex_t hlib_cmplx_add (const hlib_complex_t a, const hlib_complex_t b)
 
hlib_complex_t hlib_cmplx_sub (const hlib_complex_t a, const hlib_complex_t b)
 
hlib_complex_t hlib_cmplx_mul (const hlib_complex_t a, const hlib_complex_t b)
 
hlib_complex_t hlib_cmplx_div (const hlib_complex_t a, const hlib_complex_t b)
 
hlib_complex_t hlib_cmplx_conj (const hlib_complex_t a)
 
hlib_real_t hlib_cmplx_abs (const hlib_complex_t a)
 
hlib_complex_t hlib_cmplx_sqrt (const hlib_complex_t a)
 
hlib_complex_t hlib_cmplx_exp (const hlib_complex_t a)
 

Detailed Description

This modules defines functions for the usage of 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 in C programs instead of C++.

To include all standard H-matrix related functions add

#include <hlib-c.h>

to your source files. For using BEM functions in C, you also have to add

#include <hlib-c-bem.h>

Typedef Documentation

◆ hlib_acc_t

typedef union hlib_acc_u hlib_acc_t

general accuracy description type

◆ hlib_errorfn_t

typedef void(* hlib_errorfn_t) (const int errcode, const char *errmsg)

error/warning handler function types

◆ hlib_progressfn_t

typedef void(* hlib_progressfn_t) (const double *values, int *cancel, void *arg)

callback function for progress information

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

matrix printing options (can be combined)

Enumerator
HLIB_MATIO_SVD 

print singular value decomposition in each block

HLIB_MATIO_ENTRY 

print each entry of matrix

HLIB_MATIO_PATTERN 

print sparsity pattern (non-zero entries)

◆ anonymous enum

anonymous enum

list of error codes

Enumerator
HLIB_NO_ERROR 

no error occured

HLIB_ERR_INIT 

not initialised

HLIB_ERR_LICENSE 

invalid license

HLIB_ERR_NOT_IMPL 

functionality not implemented

HLIB_ERR_CONSISTENCY 

general consistency error

HLIB_ERR_COMM 

communication error

HLIB_ERR_PERM 

permission denied

HLIB_ERR_REAL 

data is real valued

HLIB_ERR_NREAL 

data is not real valued

HLIB_ERR_COMPLEX 

data is complex valued

HLIB_ERR_NCOMPLEX 

data is not complex valued

HLIB_ERR_REAL_CMPLX 

invalid mixing of real and complex data

HLIB_ERR_DIV_ZERO 

division by zero

HLIB_ERR_NEG_SQRT 

sqrt of negative number

HLIB_ERR_INF 

infinity occured

HLIB_ERR_NAN 

not-a-number occured

HLIB_ERR_NCONVERGED 

iteration did not converge

HLIB_ERR_ARG 

error with argument

HLIB_ERR_MEM 

insufficient memory available

HLIB_ERR_NULL 

null pointer encountered

HLIB_ERR_SIZE 

size of data incorrect

HLIB_ERR_INDEXSET 

size of data incorrect

HLIB_ERR_DIM 

invalid or incompatible dimension

HLIB_ERR_ARR_BOUND 

out-of-bound error in array

HLIB_ERR_DIAG_ENTRY 

entry is not on diagonal

HLIB_ERR_COORD_INVALID 

invalid coordinates

HLIB_ERR_CT_INVALID 

invalid cluster tree

HLIB_ERR_CT_TYPE 

wrong type of cluster tree

HLIB_ERR_CT_STRUCT 

invalid structure of cluster tree

HLIB_ERR_CT_INCOMP 

given cluster trees are incompatible

HLIB_ERR_CT_SPARSE 

missing sparse matrix for given cluster tree

HLIB_ERR_BCT_INVALID 

invalid block cluster tree

HLIB_ERR_BCT_STRUCT 

invalid block cluster tree structure

HLIB_ERR_VEC_INVALID 

invalid vector

HLIB_ERR_VEC_TYPE 

wrong vector type

HLIB_ERR_VEC_STRUCT 

invalid vector structure

HLIB_ERR_VEC_SIZE 

invalid size of vector

HLIB_ERR_VEC_INCOMP 

vector with incompatible dimension

HLIB_ERR_VEC_NSCALAR 

vector is not a scalar vector

HLIB_ERR_MAT_TYPE 

invalid matrix type

HLIB_ERR_MAT_STRUCT 

invalid structure of matrix

HLIB_ERR_MAT_SIZE 

invalid size of matrix

HLIB_ERR_MAT_SINGULAR 

singular matrix detected

HLIB_ERR_MAT_NSPARSE 

matrix not a sparse matrix

HLIB_ERR_MAT_NDENSE 

matrix not a dense matrix

HLIB_ERR_MAT_NHMAT 

matrix not an H-matrix

HLIB_ERR_MAT_INCOMP_TYPE 

matrices with incompatible type

HLIB_ERR_MAT_INCOMP_CT 

matrices with incompatible cluster tree

HLIB_ERR_MAT_INVALID 

invalid matrix

HLIB_ERR_MAT_NSYM 

matrix not symmetric

HLIB_ERR_MAT_NHERM 

matrix not hermitian

HLIB_ERR_MAT_NPOSDEF 

matrix not positiv definite

HLIB_ERR_FMT_UNKNOWN 

error while parsing HLIBpro format

HLIB_ERR_FMT_HFORMAT 

error while parsing HLIBpro format

HLIB_ERR_FMT_SAMG 

error while parsing SAMG format

HLIB_ERR_FMT_MATLAB 

error while parsing Matlab format

HLIB_ERR_FMT_PLTMG 

error while parsing PLTMG format

HLIB_ERR_FMT_HB 

error while parsing Harwell Boeing format

HLIB_ERR_FMT_MTX 

error while parsing Matrix Market format

HLIB_ERR_FMT_PLY 

error while parsing Ply format

HLIB_ERR_GRID_FORMAT 

invalid format of grid file

HLIB_ERR_GRID_DATA 

invalid data in grid file

HLIB_ERR_FOPEN 

could not open file

HLIB_ERR_FCLOSE 

could not close file

HLIB_ERR_FWRITE 

could not write to file

HLIB_ERR_FREAD 

could not read from file

HLIB_ERR_FSEEK 

could not seek in file

HLIB_ERR_FNEXISTS 

file does not exists

HLIB_ERR_BS_SIZE 

size of bytestream too small

HLIB_ERR_BS_WRITE 

error while writing to bytestream

HLIB_ERR_BS_READ 

error while reading from bytestream

HLIB_ERR_BS_TYPE 

type error in bytestream

HLIB_ERR_BS_DATA 

general data error in bytestream

HLIB_ERR_NOZLIB 

no zlib support compiled in

HLIB_ERR_ZLIB_UNZIP 

error during zlib uncompression

HLIB_ERR_NOMETIS 

no METIS support compiled in

HLIB_ERR_NOSCOTCH 

no Scotch support compiled in

HLIB_ERR_SCOTCH 

error in call to Scotch function

HLIB_ERR_NOCHACO 

no Chaco support compiled in

HLIB_ERR_NOLIBGRAPH 

no libGraph support compiled in

HLIB_ERR_NOFFTW3 

no FFTW3 support compiled in

HLIB_ERR_NOCAIRO 

no Cairo support compiled in

HLIB_ERR_NOHDF5 

no HDF5 support compiled in

HLIB_ERR_MPI 

error in call to MPI function

HLIB_ERR_SOLVER_INVALID 

invalid solver

HLIB_ERR_LRAPX_INVALID 

invalid low-rank approximation type

HLIB_ERR_GRID_INVALID 

invalid grid

HLIB_ERR_FNSPACE_INVALID 

invalid function space

◆ anonymous enum

anonymous enum

fields in value array progress bar callback function

Enumerator
HLIB_PROGRESS_MIN 

minimal value of progress bar

HLIB_PROGRESS_MAX 

maximal value of progress bar

HLIB_PROGRESS_VAL 

current value of progress bar

◆ hlib_acc_type_t

different types of accuracy

Enumerator
HLIB_ACC_FIXED_EPS 

fixed accuracy for all blocks

HLIB_ACC_FIXED_RANK 

fixed rank for all blocks

HLIB_ACC_BLOCKED 

different accuracy for one block level

HLIB_ACC_STRING 

arbitrary accuracy description

◆ hlib_adm_t

enum hlib_adm_t

admissibility criteria

Enumerator
HLIB_ADM_AUTO 

automatically decide suitable adm. condition

HLIB_ADM_STD_MIN 

standard admissibility with min. of diameters

HLIB_ADM_STD_MAX 

standard admissibility with max. of diameters

HLIB_ADM_WEAK 

weak admissibility

◆ hlib_alg_t

enum hlib_alg_t

partitioning algorithms for algebraic clustering

Enumerator
HLIB_ALG_AUTO 

automatic choice

HLIB_ALG_BFS 

BFS graph partitioning

HLIB_ALG_ML 

MultiLevel graph partitioning

HLIB_ALG_METIS 

METIS library

HLIB_ALG_SCOTCH 

SCOTCH library

◆ hlib_bsp_t

enum hlib_bsp_t

partitioning algorithms for binary sparse partitioning

Enumerator
HLIB_BSP_AUTO 

automatic choice

HLIB_BSP_GEOM_MAX 

geometrically balanced clustering

HLIB_BSP_GEOM_REG 

w.r.t. maximal dimension or regularly

HLIB_BSP_CARD_MAX 

cardinality balanced clustering

HLIB_BSP_CARD_REG 

w.r.t. maximal dimension or regularly

HLIB_BSP_PCA 

clustering based on principle component

HLIB_BSP_GEOM 

deprecated, now HLIB_BSP_GEOM_MAX

HLIB_BSP_CARD 

deprecated, now HLIB_BSP_CARD_MAX

HLIB_BSP_REGULAR 

deprecated, now HLIB_BSP_GEOM_REG

◆ hlib_lrapx_t

different types of low rank approximation

Enumerator
HLIB_LRAPX_SVD 

use singular value decomposition

HLIB_LRAPX_ACA 

use adaptive cross approximation

HLIB_LRAPX_ACAPLUS 

use advanced adaptive cross approximation

HLIB_LRAPX_ACAFULL 

use adaptive cross approximation with
full pivot search

HLIB_LRAPX_HCA 

use hybrid cross approximation

HLIB_LRAPX_ZERO 

build empty low-rank blocks (nearfield only)

HLIB_LRAPX_RANDSVD 

use randomized SVD

HLIB_LRAPX_RRQR 

uses rank revealing QR

◆ hlib_matop_t

defines operation on matrices

Enumerator
HLIB_MATOP_NORM 

normal matrix, no modification

HLIB_MATOP_TRANS 

transposed matrix

HLIB_MATOP_ADJ 

adjoint operator: transpose (real) or conjugate transpose (complex)

Function Documentation

◆ hlib_acc_blocked()

HLIB_FNDECL hlib_acc_t hlib_acc_blocked ( const hlib_acc_t blockacc)

return accuracy object with blockwise accuracy defined by array blockacc of dimension blockrows × blockcolumns corresponding to first partitioning level; the array must be stored column wise

◆ hlib_acc_fixed_eps()

HLIB_FNDECL hlib_acc_t hlib_acc_fixed_eps ( const hlib_real_t  eps)

return accuracy object with fixed accuracy eps

◆ hlib_acc_fixed_rank()

HLIB_FNDECL hlib_acc_t hlib_acc_fixed_rank ( const unsigned int  k)

return accuracy object with fixed rank k

◆ hlib_admcond_alg()

HLIB_FNDECL hlib_admcond_t hlib_admcond_alg ( const hlib_adm_t  crit,
const double  eta,
const hlib_matrix_t  S,
const hlib_permutation_t  row_perm,
const hlib_permutation_t  col_perm,
int *  info 
)

create admissibility condition based on algebraic connectivity in S

  • row_perm and col_perm define the (optional) mapping between internal to external ordering for row and column index sets, respectively (see hlib_ct_perm_i2e); set to NULL if not present

◆ hlib_admcond_free()

HLIB_FNDECL void hlib_admcond_free ( const hlib_admcond_t  ac,
int *  info 
)

free admissibility condition

◆ hlib_admcond_geom()

HLIB_FNDECL hlib_admcond_t hlib_admcond_geom ( const hlib_adm_t  crit,
const double  eta,
int *  info 
)

create admissibility condition based on geometrical data

◆ hlib_admcond_geom_hilo()

HLIB_FNDECL hlib_admcond_t hlib_admcond_geom_hilo ( const hlib_complex_t  kappa,
const unsigned int  nwaves,
const double  eta,
int *  info 
)

create admissibility condition for high/low frequency case by limiting the number of wavelengths (nwaves) per cluster

◆ hlib_admcond_geom_period()

HLIB_FNDECL hlib_admcond_t hlib_admcond_geom_period ( const hlib_adm_t  crit,
const double  eta,
const double *  period,
const unsigned int  dim,
int *  info 
)

create admissibility condition based on geometrical data with additional periodicity in geometry defined by vector period

  • period must have same dimension dim as coordinates used for constructing cluster trees

◆ hlib_bc_bytesize()

HLIB_FNDECL size_t hlib_bc_bytesize ( const hlib_blockcluster_t  bc,
int *  info 
)

return size of memory in bytes used by block cluster

◆ hlib_bc_colcl()

HLIB_FNDECL hlib_cluster_t hlib_bc_colcl ( const hlib_blockcluster_t  bc,
int *  info 
)

return column cluster of given block cluster

◆ hlib_bc_copy()

HLIB_FNDECL hlib_blockcluster_t hlib_bc_copy ( const hlib_blockcluster_t  bc,
int *  info 
)

return copy of sub tree defined by bc

◆ hlib_bc_csp()

HLIB_FNDECL int hlib_bc_csp ( const hlib_blockcluster_t  bc,
int *  info 
)

compute sparsity constant of block cluster tree

◆ hlib_bc_depth()

HLIB_FNDECL size_t hlib_bc_depth ( const hlib_blockcluster_t  bc,
int *  info 
)

return depth of block cluster

◆ hlib_bc_free()

HLIB_FNDECL void hlib_bc_free ( hlib_blockcluster_t  bc,
int *  info 
)

free resources coupled with block cluster tree bct

◆ hlib_bc_is_adm()

HLIB_FNDECL int hlib_bc_is_adm ( const hlib_blockcluster_t  bc,
int *  info 
)

return 1 if block cluster is admissible and 0 otherwise

◆ hlib_bc_is_leaf()

HLIB_FNDECL int hlib_bc_is_leaf ( const hlib_blockcluster_t  bc,
int *  info 
)

return 1 if block cluster is leaf and 0 otherwise

◆ hlib_bc_nnodes()

HLIB_FNDECL size_t hlib_bc_nnodes ( const hlib_blockcluster_t  bc,
int *  info 
)

return number of nodes in block cluster

◆ hlib_bc_nsons()

HLIB_FNDECL size_t hlib_bc_nsons ( const hlib_blockcluster_t  bc,
int *  info 
)

return total number of sons of block cluster bc

◆ hlib_bc_parent()

HLIB_FNDECL hlib_blockcluster_t hlib_bc_parent ( const hlib_blockcluster_t  bc,
int *  info 
)

return parent block cluster of block cluster bc

◆ hlib_bc_print_ps()

HLIB_FNDECL void hlib_bc_print_ps ( const hlib_blockcluster_t  bc,
const char *  filename,
int *  info 
)

print block cluster tree in PostScript format to file filename

◆ hlib_bc_rowcl()

HLIB_FNDECL hlib_cluster_t hlib_bc_rowcl ( const hlib_blockcluster_t  bc,
int *  info 
)

return row cluster of given block cluster

◆ hlib_bc_son()

HLIB_FNDECL hlib_blockcluster_t hlib_bc_son ( const hlib_blockcluster_t  bc,
const unsigned int  i,
const unsigned int  j,
int *  info 
)

return son (i,j) of block cluster bc

  • the indices i and j are with respect to the numbering in the row and column cluster trees

◆ hlib_bct_build()

HLIB_FNDECL hlib_blockclustertree_t hlib_bct_build ( const hlib_clustertree_t  rowct,
const hlib_clustertree_t  colct,
const hlib_admcond_t  ac,
int *  info 
)

build block cluster tree over given row and column clusters using admissibility condition ac

◆ hlib_bct_bytesize()

HLIB_FNDECL size_t hlib_bct_bytesize ( const hlib_blockclustertree_t  bct,
int *  info 
)

return size of memory in bytes used by block cluster

◆ hlib_bct_colct()

HLIB_FNDECL hlib_clustertree_t hlib_bct_colct ( const hlib_blockclustertree_t  bct,
int *  info 
)

return column cluster tree of given block cluster tree

◆ hlib_bct_csp()

HLIB_FNDECL int hlib_bct_csp ( const hlib_blockclustertree_t  bct,
int *  info 
)

compute sparsity constant of block cluster tree

◆ hlib_bct_depth()

HLIB_FNDECL size_t hlib_bct_depth ( const hlib_blockclustertree_t  bct,
int *  info 
)

return depth of block cluster tree

◆ hlib_bct_distribute_block()

HLIB_FNDECL void hlib_bct_distribute_block ( hlib_blockclustertree_t  bct,
const unsigned int  p,
const unsigned int  min_lvl,
const int  symmetric,
int *  info 
)

distribute block cluster tree onto p processors based on block-wise partition with unique processor per block

  • assuming compatible structure of bct
  • min_lvl controls minimal level for blocks in bct to schedule
  • if symmetric ≠ 0, the scheduling is performed for the lower left part and mirrored to the upper right part (for symmetric/hermitian matrices)

◆ hlib_bct_free()

HLIB_FNDECL void hlib_bct_free ( hlib_blockclustertree_t  bct,
int *  info 
)

free resources coupled with cluster tree ct

◆ hlib_bct_nnodes()

HLIB_FNDECL size_t hlib_bct_nnodes ( const hlib_blockclustertree_t  bct,
int *  info 
)

return number of nodes in block cluster tree

◆ hlib_bct_print_ps()

HLIB_FNDECL void hlib_bct_print_ps ( const hlib_blockclustertree_t  bct,
const char *  filename,
int *  info 
)

print block cluster tree in PostScript format to file filename

◆ hlib_bct_rowct()

HLIB_FNDECL hlib_clustertree_t hlib_bct_rowct ( const hlib_blockclustertree_t  bct,
int *  info 
)

return row cluster tree of given block cluster tree

◆ hlib_cl_bytesize()

HLIB_FNDECL size_t hlib_cl_bytesize ( const hlib_cluster_t  cl,
int *  info 
)

return size of memory in bytes used by cluster

◆ hlib_cl_copy()

HLIB_FNDECL hlib_cluster_t hlib_cl_copy ( const hlib_cluster_t  cl,
int *  info 
)

return copy of sub tree defined by cl

◆ hlib_cl_depth()

HLIB_FNDECL size_t hlib_cl_depth ( const hlib_cluster_t  cl,
int *  info 
)

return depth of cluster tree

◆ hlib_cl_first()

HLIB_FNDECL int hlib_cl_first ( const hlib_cluster_t  cl,
int *  info 
)

return first index in index set

◆ hlib_cl_free()

HLIB_FNDECL void hlib_cl_free ( hlib_cluster_t  cl,
int *  info 
)

free resources coupled with cluster cl

◆ hlib_cl_is_leaf()

HLIB_FNDECL int hlib_cl_is_leaf ( const hlib_cluster_t  cl,
int *  info 
)

return 1 if cluster is leaf and 0 otherwise

◆ hlib_cl_last()

HLIB_FNDECL int hlib_cl_last ( const hlib_cluster_t  cl,
int *  info 
)

return last index in index set

◆ hlib_cl_nnodes()

HLIB_FNDECL size_t hlib_cl_nnodes ( const hlib_cluster_t  cl,
int *  info 
)

return number of nodes in cluster tree

◆ hlib_cl_nsons()

HLIB_FNDECL size_t hlib_cl_nsons ( const hlib_cluster_t  cl,
int *  info 
)

return number of sons of cluster

◆ hlib_cl_print_ps()

HLIB_FNDECL void hlib_cl_print_ps ( const hlib_cluster_t  cl,
const char *  filename,
int *  info 
)

print cluster tree in PostScript format to file filename

◆ hlib_cl_size()

HLIB_FNDECL size_t hlib_cl_size ( const hlib_cluster_t  cl,
int *  info 
)

return size of index set

◆ hlib_cl_son()

HLIB_FNDECL hlib_cluster_t hlib_cl_son ( const hlib_cluster_t  cl,
const unsigned int  i,
int *  info 
)

return i'th son of cluster cl

◆ hlib_clt_build_alg()

HLIB_FNDECL hlib_clustertree_t hlib_clt_build_alg ( const hlib_matrix_t  S,
const hlib_alg_t  algtype,
const unsigned int  nmin,
int *  info 
)

build clustertree via algebraic clustering based on given sparse matrix S and partitioning type algtype.

◆ hlib_clt_build_alg_nd()

HLIB_FNDECL hlib_clustertree_t hlib_clt_build_alg_nd ( const hlib_matrix_t  S,
const hlib_alg_t  algtype,
const unsigned int  nmin,
int *  info 
)

build clustertree via algebraic clustering with nested dissection based on given sparse matrix S and partitioning type algtype.

◆ hlib_clt_build_alg_part()

HLIB_FNDECL hlib_clustertree_t hlib_clt_build_alg_part ( const hlib_matrix_t  S,
const unsigned int *  partition,
const hlib_alg_t  algtype,
const unsigned int  nmin,
int *  info 
)

build clustertree via algebraic clustering based on matrix S and use a predefined partition for first step

  • partition must have size "rows(S)" and contain ids ∈ [0,k-1], where k is the total number of partitions
  • index "i" will go into group partition[i]

◆ hlib_clt_build_bsp()

HLIB_FNDECL hlib_clustertree_t hlib_clt_build_bsp ( const hlib_coord_t  coord,
const hlib_bsp_t  bsptype,
const unsigned int  nmin,
int *  info 
)

build cluster tree using binary space partitioning

  • optional periodicity of the coordinates defined by period, e.g. vector containing stride in all spatial dimensions or NULL if not defined
Parameters
coordcoordinates of indices
bsptypepartitioning type
nminminimal cluster size

◆ hlib_clt_build_bsp_nd()

HLIB_FNDECL hlib_clustertree_t hlib_clt_build_bsp_nd ( const hlib_coord_t  coord,
const hlib_matrix_t  S,
const hlib_bsp_t  bsptype,
const unsigned int  nmin,
int *  info 
)

build cluster tree using binary space partitioning and nested dissection based on given sparse matrix S

  • for period see HLIBPF(clt_build_bsp)
Parameters
coordcoordinates of indices
Ssparse mat. for connectivity
bsptypepartitioning type
nminminimal cluster size

◆ hlib_clt_build_bsp_part()

HLIB_FNDECL hlib_clustertree_t hlib_clt_build_bsp_part ( const hlib_coord_t  coord,
const unsigned int *  partition,
const int  eq_depth,
const hlib_bsp_t  bsptype,
const unsigned int  nmin,
int *  info 
)

build cluster tree using binary space partitioning but use a predefined partition for first step, e.g. first divide indices into groups defined by partition and apply BSP on these sets

  • partition must have size "size(coord)" and contain ids ∈ [0,k-1], where k is the total number of partitions
  • index "i" will go into group partition[i]
  • if eq_depth ≠ 0, the depth of subsequent sub trees (for each partition) is adjusted according to depth of previous sub trees
Parameters
coordcoordinates of indices
partitionpredifined partition
eq_depthequalise depths of subtrees
bsptypepartitioning type
nminminimal cluster size

◆ hlib_clt_bytesize()

HLIB_FNDECL size_t hlib_clt_bytesize ( const hlib_clustertree_t  ct,
int *  info 
)

return size of memory in bytes used by cluster

◆ hlib_clt_depth()

HLIB_FNDECL size_t hlib_clt_depth ( const hlib_clustertree_t  ct,
int *  info 
)

return depth of cluster tree

◆ hlib_clt_free()

HLIB_FNDECL void hlib_clt_free ( hlib_clustertree_t  ct,
int *  info 
)

free resources coupled with cluster tree ct

◆ hlib_clt_nnodes()

HLIB_FNDECL size_t hlib_clt_nnodes ( const hlib_clustertree_t  ct,
int *  info 
)

return number of nodes in cluster tree

◆ hlib_clt_perm_e2i()

HLIB_FNDECL hlib_permutation_t hlib_clt_perm_e2i ( hlib_clustertree_t  ct,
int *  info 
)

return mapping from external to internal (in cluster tree) ordering

  • returned object is reference to internal permutation: do NOT free

◆ hlib_clt_perm_i2e()

HLIB_FNDECL hlib_permutation_t hlib_clt_perm_i2e ( hlib_clustertree_t  ct,
int *  info 
)

return mapping from internal (in cluster tree) to external ordering

  • returned object is reference to internal permutation: do NOT free

◆ hlib_clt_print_ps()

HLIB_FNDECL void hlib_clt_print_ps ( const hlib_clustertree_t  ct,
const char *  filename,
int *  info 
)

print cluster tree in PostScript format to file filename

◆ hlib_clt_root()

HLIB_FNDECL hlib_cluster_t hlib_clt_root ( hlib_clustertree_t  ct,
int *  info 
)

return root node in cluster tree

◆ hlib_cmplx_abs()

hlib_real_t hlib_cmplx_abs ( const hlib_complex_t  a)

return absolute value

◆ hlib_cmplx_add()

hlib_complex_t hlib_cmplx_add ( const hlib_complex_t  a,
const hlib_complex_t  b 
)

conversion to/from C99 complex if available standard mathematical operators

◆ hlib_cmplx_conj()

hlib_complex_t hlib_cmplx_conj ( const hlib_complex_t  a)

return conjugate value

◆ hlib_cmplx_exp()

hlib_complex_t hlib_cmplx_exp ( const hlib_complex_t  a)

exponential function e^a

◆ hlib_cmplx_sqrt()

hlib_complex_t hlib_cmplx_sqrt ( const hlib_complex_t  a)

return square root

◆ hlib_complex()

hlib_complex_t hlib_complex ( const hlib_real_t  re,
const hlib_real_t  im 
)

construct hlib_complex_t variable

◆ hlib_coord_bbmax()

HLIB_FNDECL double* hlib_coord_bbmax ( const hlib_coord_t  coord,
const size_t  i,
int *  info 
)

return pointer too coordinate of i'th maximal bounding box

◆ hlib_coord_bbmin()

HLIB_FNDECL double* hlib_coord_bbmin ( const hlib_coord_t  coord,
const size_t  i,
int *  info 
)

return pointer too coordinate of i'th minimal bounding box

◆ hlib_coord_bytesize()

HLIB_FNDECL size_t hlib_coord_bytesize ( const hlib_coord_t  coord,
int *  info 
)

return size of memory in bytes used by coordinates

◆ hlib_coord_dim()

HLIB_FNDECL unsigned int hlib_coord_dim ( const hlib_coord_t  coord,
int *  info 
)

return dimension of coordinates in given coordinate set coord

◆ hlib_coord_free()

HLIB_FNDECL void hlib_coord_free ( hlib_coord_t  coord,
int *  info 
)

free resources coupled with coordinates

  • if "HLIBPF(coord_import)" was used to create coord, the memory occupied by coordinate array will NOT be freed

◆ hlib_coord_get()

HLIB_FNDECL double* hlib_coord_get ( const hlib_coord_t  coord,
const size_t  i,
int *  info 
)

return pointer too coordinate i in given coordinate set coord

  • the returned value points to an array of size dim(coord)
  • to pointer is no copy, so all changes to the data are direct changes to the coordinates

◆ hlib_coord_get_period()

HLIB_FNDECL void hlib_coord_get_period ( hlib_coord_t  coord,
double  period[],
int *  info 
)

store periodicity vector in period

  • period must have the same dimensions as the coordinates

◆ hlib_coord_has_bbox()

HLIB_FNDECL int hlib_coord_has_bbox ( const hlib_coord_t  coord,
int *  info 
)

return 1, if coordinate set has bounding box info and 0 otherwise

◆ hlib_coord_import()

HLIB_FNDECL hlib_coord_t hlib_coord_import ( const size_t  n,
const unsigned int  dim,
double **  coord,
const double *  period,
int *  info 
)

import given coordinates into HLIBpro

  • data is directly referenced, not copied, i.e., any later changes to coord will also change coordinate set,
  • optional periodicity of the coordinates defined by period, e.g. vector containing stride in all spatial dimensions or NULL if not defined

◆ hlib_coord_ncoord()

HLIB_FNDECL size_t hlib_coord_ncoord ( const hlib_coord_t  coord,
int *  info 
)

return number of coordinates in given coordinate set coord

◆ hlib_coord_print_vrml()

HLIB_FNDECL void hlib_coord_print_vrml ( const hlib_coord_t  coord,
const char *  filename,
int *  info 
)

print coordinates in VRML format to file filename

◆ hlib_coord_print_vtk()

HLIB_FNDECL void hlib_coord_print_vtk ( const hlib_coord_t  coord,
const char *  filename,
int *  info 
)

print coordinates in VTK format to file filename

◆ hlib_coord_set_period()

HLIB_FNDECL void hlib_coord_set_period ( hlib_coord_t  coord,
const double  period[],
int *  info 
)

set perdiodicity of coordinates to period

  • period must have the same dimensions as the coordinates

◆ hlib_cputime()

HLIB_FNDECL double hlib_cputime ( )

return execution time of program in seconds

◆ hlib_done()

HLIB_FNDECL void hlib_done ( int *  info)

finalise HLIBpro

◆ hlib_error_desc()

HLIB_FNDECL void hlib_error_desc ( char *  desc,
const size_t  size 
)

copy description of current error to buffer

◆ hlib_get_config()

HLIB_FNDECL void hlib_get_config ( const char *  option,
char *  value,
const size_t  len,
int *  info 
)

return current value of option, stored as string in value

◆ hlib_hb_load_matrix()

HLIB_FNDECL hlib_matrix_t hlib_hb_load_matrix ( const char *  filename,
int *  info 
)

read matrix from file filename

◆ hlib_hb_save_matrix()

HLIB_FNDECL void hlib_hb_save_matrix ( const hlib_matrix_t  M,
const char *  filename,
int *  info 
)

save matrix M to file filename

◆ hlib_hformat_load_coord()

HLIB_FNDECL hlib_coord_t hlib_hformat_load_coord ( const char *  filename,
int *  info 
)

read coordinates from file filename

◆ hlib_hformat_load_linearoperator()

HLIB_FNDECL hlib_linearoperator_t hlib_hformat_load_linearoperator ( const char *  filename,
int *  info 
)

read matrix from file filename

◆ hlib_hformat_load_matrix()

HLIB_FNDECL hlib_matrix_t hlib_hformat_load_matrix ( const char *  filename,
int *  info 
)

read matrix from file filename

◆ hlib_hformat_load_vector()

HLIB_FNDECL hlib_vector_t hlib_hformat_load_vector ( const char *  filename,
int *  info 
)

read vector from file filename

◆ hlib_hformat_save_coord()

HLIB_FNDECL void hlib_hformat_save_coord ( const hlib_coord_t  coord,
const char *  filename,
int *  info 
)

save coordinates to file filename

◆ hlib_hformat_save_linearoperator()

HLIB_FNDECL void hlib_hformat_save_linearoperator ( const hlib_linearoperator_t  A,
const char *  filename,
int *  info 
)

save linear operator A to file filename

◆ hlib_hformat_save_matrix()

HLIB_FNDECL void hlib_hformat_save_matrix ( const hlib_matrix_t  A,
const char *  filename,
int *  info 
)

save matrix A to file filename

◆ hlib_hformat_save_vector()

HLIB_FNDECL void hlib_hformat_save_vector ( const hlib_vector_t  v,
const char *  filename,
int *  info 
)

save vector v to file filename

◆ hlib_init()

HLIB_FNDECL void hlib_init ( int *  info)

initialise HLIBpro

◆ hlib_is_init()

HLIB_FNDECL int hlib_is_init ( )

return 1 if HLIBpro is initialised and 0 otherwise

◆ hlib_linearoperator_apply()

HLIB_FNDECL void hlib_linearoperator_apply ( const hlib_linearoperator_t  A,
const hlib_vector_t  x,
hlib_vector_t  y,
const hlib_matop_t  matop,
int *  info 
)

computes \( y := op(A) \cdot x \)

◆ hlib_linearoperator_apply_add()

HLIB_FNDECL void hlib_linearoperator_apply_add ( const hlib_real_t  alpha,
const hlib_linearoperator_t  A,
const hlib_vector_t  x,
hlib_vector_t  y,
const hlib_matop_t  matop,
int *  info 
)

computes \( y := y + \alpha op(A) \cdot x \)

◆ hlib_linearoperator_capply_add()

HLIB_FNDECL void hlib_linearoperator_capply_add ( const hlib_complex_t  alpha,
const hlib_linearoperator_t  A,
const hlib_vector_t  x,
hlib_vector_t  y,
const hlib_matop_t  matop,
int *  info 
)

computes \( y := y + \alpha op(A) \cdot x \)

◆ hlib_linearoperator_domain_vector()

HLIB_FNDECL hlib_vector_t hlib_linearoperator_domain_vector ( const hlib_linearoperator_t  A,
int *  info 
)

create vectors from the domain of the linear operator A

◆ hlib_linearoperator_free()

HLIB_FNDECL void hlib_linearoperator_free ( hlib_linearoperator_t  A,
int *  info 
)

free resources coupled with linear operator A

◆ hlib_linearoperator_norm_inv_approx()

HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_inv_approx ( const hlib_linearoperator_t  A,
const hlib_linearoperator_t  B,
int *  info 
)

compute inversion error |I-BA|_2, where B is supposed to be A^-1

◆ hlib_linearoperator_norm_spectral()

HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_spectral ( const hlib_linearoperator_t  A,
int *  info 
)

compute spectral norm of matrix

◆ hlib_linearoperator_norm_spectral_diff()

HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_spectral_diff ( const hlib_linearoperator_t  A,
const hlib_linearoperator_t  B,
int *  info 
)

compute relative spectral norm of A-B, e.g. |A-B|_2/|A|_2

◆ hlib_linearoperator_norm_spectral_inv()

HLIB_FNDECL hlib_real_t hlib_linearoperator_norm_spectral_inv ( const hlib_linearoperator_t  A,
int *  info 
)

compute spectral norm of inverse matrix

◆ hlib_linearoperator_range_vector()

HLIB_FNDECL hlib_vector_t hlib_linearoperator_range_vector ( const hlib_linearoperator_t  A,
int *  info 
)

create vectors from the range of the linear operator A

◆ hlib_load_coord()

HLIB_FNDECL hlib_coord_t hlib_load_coord ( const char *  filename,
int *  info 
)

read coordinates from file filename

◆ hlib_load_matrix()

HLIB_FNDECL hlib_matrix_t hlib_load_matrix ( const char *  filename,
int *  info 
)

read matrix from file filename

◆ hlib_load_vector()

HLIB_FNDECL hlib_vector_t hlib_load_vector ( const char *  filename,
int *  info 
)

read vector from file filename

◆ hlib_major_version()

HLIB_FNDECL unsigned int hlib_major_version ( )

return major version number of 𝖧𝖫𝖨𝖡𝗉𝗋𝗈

◆ hlib_matlab_load_matrix()

HLIB_FNDECL hlib_matrix_t hlib_matlab_load_matrix ( const char *  filename,
const char *  matname,
int *  info 
)

read matrix named matname in Matlab V7 format from file filename; if matname == NULL or matname == "", the first matrix in filename will be read

◆ hlib_matlab_load_vector()

HLIB_FNDECL hlib_vector_t hlib_matlab_load_vector ( const char *  filename,
const char *  vecname,
int *  info 
)

read vector named vname from file filename in Matlab V7 format

◆ hlib_matlab_save_matrix()

HLIB_FNDECL void hlib_matlab_save_matrix ( const hlib_matrix_t  M,
const char *  filename,
const char *  matname,
int *  info 
)

save matrix M named matname in Matlab V7 format to file filename

◆ hlib_matlab_save_vector()

HLIB_FNDECL void hlib_matlab_save_vector ( const hlib_vector_t  v,
const char *  filename,
const char *  vecname,
int *  info 
)

save vector named vname to file filename in Matlab V7 format

◆ hlib_matrix_add()

HLIB_FNDECL void hlib_matrix_add ( const hlib_real_t  alpha,
const hlib_matrix_t  A,
const hlib_real_t  beta,
hlib_matrix_t  B,
const hlib_acc_t  acc,
int *  info 
)

compute B := alpha A + beta B with block-wise precision acc

◆ hlib_matrix_add_identity()

HLIB_FNDECL void hlib_matrix_add_identity ( hlib_matrix_t  A,
const hlib_real_t  lambda,
int *  info 
)

compute A := A + lambda I

◆ hlib_matrix_approx_rank_aca()

HLIB_FNDECL hlib_matrix_t hlib_matrix_approx_rank_aca ( const hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

convert matrix to lowrank format using approximation by ACA with accuracy defined by acc

  • currently only dense matrices supported

◆ hlib_matrix_assemble_block()

HLIB_FNDECL hlib_matrix_t hlib_matrix_assemble_block ( const size_t  brows,
const size_t  bcols,
hlib_matrix_t *  submat,
const int  copy,
int *  info 
)

assemble brows × bcols block matrix out of sub blocks submat

  • sub matrices have to be stored column wise in submat, e.g.,

    \begin{eqnarray*} A_{00} & A_{01} \\ A_{10} & A_{11} \end{eqnarray*}

    is stored { A_00, A_10, A_01, A_11 },
  • if copy is non-zero, sub matrices are copied, otherwise used directly in new block matrix,
  • index sets of sub matrices are adjusted to be consistent in new block matrix,
  • if sub matrices are H-matrices, permutations from internal to external ordering (and vice versa) are also adjusted.
Parameters
browsnumber of block rows
bcolsnumber of block columns
submatarray of sub matrices
copycopy matrices if true

◆ hlib_matrix_build_ccoeff()

HLIB_FNDECL hlib_matrix_t hlib_matrix_build_ccoeff ( const hlib_blockclustertree_t  bct,
const hlib_ccoeff_t  f,
void *  arg,
const hlib_lrapx_t  lrapx,
const hlib_acc_t  acc,
const int  sym,
int *  info 
)

build H-matrix over block cluster tree bct of precision acc out of dense matrix given by a matrix coefficient function f by using a low-rank approximation for admissible blocks

Parameters
bctblock ct. defining indexsets
fcoeff. function defining mat.
argadd. argument to coeff. fn.
lrapxlow-rank approximation method
accaccuracy of the approximation
symif non-zero, matrix is sym.

◆ hlib_matrix_build_coeff()

HLIB_FNDECL hlib_matrix_t hlib_matrix_build_coeff ( const hlib_blockclustertree_t  bct,
const hlib_coeff_t  f,
void *  arg,
const hlib_lrapx_t  lrapx,
const hlib_acc_t  acc,
const int  sym,
int *  info 
)

build H-matrix over block cluster tree bct of precision acc out of dense matrix given by a matrix coefficient function f by using a low-rank approximation for admissible blocks

Parameters
bctblock ct. defining indexsets
fcoeff. function defining mat.
argadd. argument to coeff. fn.
lrapxlow-rank approximation method
accaccuracy of the approximation
symif non-zero, matrix is sym.

◆ hlib_matrix_build_dense()

HLIB_FNDECL hlib_matrix_t hlib_matrix_build_dense ( const hlib_blockclustertree_t  bct,
const hlib_matrix_t  D,
const hlib_lrapx_t  lrapx,
const hlib_acc_t  acc,
int *  info 
)

build H-matrix over block cluster tree bct with contents defined by given dense matrix D with low-rank approximation method lrapx and block-wise accuracy acc

Parameters
bctblock ct. defining indexsets
Ddense mat. to be converted
lrapxlow-rank approximation method
accaccuracy of the approximation

◆ hlib_matrix_build_identity()

HLIB_FNDECL hlib_matrix_t hlib_matrix_build_identity ( const hlib_blockclustertree_t  bct,
int *  info 
)

build H-matrix over block cluster tree bct representing identity

◆ hlib_matrix_build_sparse()

HLIB_FNDECL hlib_matrix_t hlib_matrix_build_sparse ( const hlib_blockclustertree_t  bct,
const hlib_matrix_t  S,
const hlib_acc_t  acc,
int *  info 
)

build H-matrix over block cluster tree bct with contents defined by given sparse matrix S

Parameters
bctblock ct. defining indexsets
Ssparse mat. to be converted
accaccuracy of the approximation

◆ hlib_matrix_bytesize()

HLIB_FNDECL size_t hlib_matrix_bytesize ( const hlib_matrix_t  A,
int *  info 
)

return size of matrix in bytes

◆ hlib_matrix_cadd()

HLIB_FNDECL void hlib_matrix_cadd ( const hlib_complex_t  alpha,
const hlib_matrix_t  A,
const hlib_complex_t  beta,
hlib_matrix_t  B,
const hlib_acc_t  acc,
int *  info 
)

compute B := alpha A + beta B with block-wise precision acc

◆ hlib_matrix_cadd_identity()

HLIB_FNDECL void hlib_matrix_cadd_identity ( hlib_matrix_t  A,
const hlib_complex_t  lambda,
int *  info 
)

compute A := A + lambda I

◆ hlib_matrix_centry_get()

HLIB_FNDECL hlib_complex_t hlib_matrix_centry_get ( const hlib_matrix_t  A,
const size_t  i,
const size_t  j,
int *  info 
)

get single entry at position (i,j) in matrix A

◆ hlib_matrix_cmul()

HLIB_FNDECL void hlib_matrix_cmul ( const hlib_complex_t  alpha,
const hlib_matop_t  matop_A,
const hlib_matrix_t  A,
const hlib_matop_t  matop_B,
const hlib_matrix_t  B,
const hlib_complex_t  beta,
hlib_matrix_t  C,
const hlib_acc_t  acc,
int *  info 
)

compute C := alpha op(A) op(B) + beta C with block-wise precision acc

◆ hlib_matrix_cmulvec()

HLIB_FNDECL void hlib_matrix_cmulvec ( const hlib_complex_t  alpha,
const hlib_matrix_t  A,
const hlib_vector_t  x,
const hlib_complex_t  beta,
hlib_vector_t  y,
const hlib_matop_t  matop,
int *  info 
)

compute y := alpha op(A) x + beta y, where op(A) is either A, A^T or A^H

Parameters
xsource vector of dimension columns(op(A))
ydest. vector of dimension rows(op(A))
matopmatrix operation, e.g. transpose

◆ hlib_matrix_col_vector()

HLIB_FNDECL hlib_vector_t hlib_matrix_col_vector ( const hlib_matrix_t  A,
int *  info 
)

create vectors matching the column indexsets of matrix A

◆ hlib_matrix_cols()

HLIB_FNDECL size_t hlib_matrix_cols ( const hlib_matrix_t  A,
int *  info 
)

return number of columns of matrix

◆ hlib_matrix_conjugate()

HLIB_FNDECL void hlib_matrix_conjugate ( const hlib_matrix_t  A,
int *  info 
)

conjugate matrix A

◆ hlib_matrix_copy()

HLIB_FNDECL hlib_matrix_t hlib_matrix_copy ( const hlib_matrix_t  A,
int *  info 
)

return copy of matrix A

◆ hlib_matrix_copy_acc()

HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_acc ( const hlib_matrix_t  A,
const hlib_acc_t  acc,
const int  coarsen,
int *  info 
)

return copy of matrix A with accuracy acc; if coarsen != 0, copy is coarsend

◆ hlib_matrix_copy_blockdiag()

HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_blockdiag ( const hlib_matrix_t  A,
const unsigned int  lvl,
const size_t  blocksize,
int *  info 
)

copy blockdiagonal part of first lvl levels or blocks of size blocksize of matrix

◆ hlib_matrix_copy_blockdiag_acc()

HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_blockdiag_acc ( const hlib_matrix_t  A,
const hlib_acc_t  acc,
const unsigned int  lvl,
const size_t  blocksize,
int *  info 
)

copy blockdiagonal part of first lvl levels or blocks of size blocksize of matrix with given accuracy acc

◆ hlib_matrix_copy_nearfield()

HLIB_FNDECL hlib_matrix_t hlib_matrix_copy_nearfield ( const hlib_matrix_t  A,
const int  without_farfield,
int *  info 
)

copy nearfield part of matrix

  • if without_farfield is non-zero, farfield matrices (e.g., low-rank) will be skipped, otherwise set to rank 0

◆ hlib_matrix_copyto()

HLIB_FNDECL void hlib_matrix_copyto ( const hlib_matrix_t  A,
hlib_matrix_t  B,
int *  info 
)

copy matrix A to B

◆ hlib_matrix_copyto_acc()

HLIB_FNDECL void hlib_matrix_copyto_acc ( const hlib_matrix_t  A,
hlib_matrix_t  B,
const hlib_acc_t  acc,
const int  coarsen,
int *  info 
)

copy matrix A to B with accuracy acc; if coarsen != 0, B is coarsend

◆ hlib_matrix_cscale()

HLIB_FNDECL void hlib_matrix_cscale ( const hlib_complex_t  f,
const hlib_matrix_t  A,
int *  info 
)

scale matrix A by factor f

◆ hlib_matrix_entry_get()

HLIB_FNDECL hlib_real_t hlib_matrix_entry_get ( const hlib_matrix_t  A,
const size_t  i,
const size_t  j,
int *  info 
)

get single entry at position (i,j) in matrix A

◆ hlib_matrix_factorise()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_factorise ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

factorise matrix A up to block-wise precision acc

  • depending on form of A, e.g. if unsymmetric, symmetric or hermitian, an appropriate factorisation method is chosen
  • A will be overwritten by the factors
  • the return value is a matrix which can be used to evaluate the factorisation, e.g. for matrix-vector mult. (this is not possible with A after factorisation as it holds just the data, albeit, it is still needed)

◆ hlib_matrix_factorise_inv()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_factorise_inv ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

same as hlib_matrix_factorise but return matrix object for evaluation of inverse of A.

◆ hlib_matrix_free()

HLIB_FNDECL void hlib_matrix_free ( hlib_matrix_t  A,
int *  info 
)

free resources coupled with matrix A

◆ hlib_matrix_import_cccs()

HLIB_FNDECL hlib_matrix_t hlib_matrix_import_cccs ( const size_t  rows,
const size_t  cols,
const size_t  nnz,
const int *  colptr,
const int *  rowind,
const hlib_complex_t *  coeffs,
const int  sym,
int *  info 
)

import given complex sparse matrix in CCS format into internal sparse matrix format

  • the data is copied into internal representation
Parameters
rowsnumber of rows and
colscolumns of the matrix
nnznumber of non-zero coeff.
colptrarray of column pointers
rowindarray of row indices
coeffsarray of matrix coeff.
symif non-zero, matrix is sym.

◆ hlib_matrix_import_ccrs()

HLIB_FNDECL hlib_matrix_t hlib_matrix_import_ccrs ( const size_t  rows,
const size_t  cols,
const size_t  nnz,
const int *  rowptr,
const int *  colind,
const hlib_complex_t *  coeffs,
const int  sym,
int *  info 
)

import given complex sparse matrix in CRS format into internal sparse matrix format

  • the data is copied into internal representation
Parameters
rowsnumber of rows and
colscolumns of the matrix
nnznumber of non-zero coeff.
rowptrarray of row pointers
colindarray of column indices
coeffsarray of matrix coeff.
symif non-zero, matrix is sym.

◆ hlib_matrix_import_ccs()

HLIB_FNDECL hlib_matrix_t hlib_matrix_import_ccs ( const size_t  rows,
const size_t  cols,
const size_t  nnz,
const int *  colptr,
const int *  rowind,
const hlib_real_t *  coeffs,
const int  sym,
int *  info 
)

import given real sparse matrix in CCS format into internal sparse matrix format

  • the data is copied into internal representation
Parameters
rowsnumber of rows and
colscolumns of the matrix
nnznumber of non-zero coeff.
colptrarray of column pointers
rowindarray of row indices
coeffsarray of matrix coefficients
symif non-zero, matrix is sym.

◆ hlib_matrix_import_cdense()

HLIB_FNDECL hlib_matrix_t hlib_matrix_import_cdense ( const size_t  rows,
const size_t  cols,
const hlib_complex_t *  D,
const int  sym,
int *  info 
)

import given complex dense matrix in column major format into internal dense matrix format

Parameters
rowsnumber of rows and
colscolumns of the matrix
Daccuracy of the approximation
symif non-zero, matrix is sym.

◆ hlib_matrix_import_crs()

HLIB_FNDECL hlib_matrix_t hlib_matrix_import_crs ( const size_t  rows,
const size_t  cols,
const size_t  nnz,
const int *  rowptr,
const int *  colind,
const hlib_real_t *  coeffs,
const int  sym,
int *  info 
)

import given real sparse matrix in CRS format into internal sparse matrix format

  • the data is copied into internal representation
Parameters
rowsnumber of rows and
colscolumns of the matrix
nnznumber of non-zero coeff.
rowptrarray of row pointers
colindarray of column indices
coeffsarray of matrix coefficients
symif non-zero, matrix is sym.

◆ hlib_matrix_import_dense()

HLIB_FNDECL hlib_matrix_t hlib_matrix_import_dense ( const size_t  rows,
const size_t  cols,
const hlib_real_t *  D,
const int  sym,
int *  info 
)

import given real dense matrix in column major format into internal dense matrix format

  • the data is copied into internal representation
Parameters
rowsnumber of rows and
colscolumns of the matrix
Daccuracy of the approximation
symif non-zero, matrix is sym.

◆ hlib_matrix_inv()

HLIB_FNDECL hlib_matrix_t hlib_matrix_inv ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

compute inverse of A with block-wise precision acc; A will be overwritten with A^-1 upon exit

  • the return value is either A, or a new representation for the inverse of A (A is still needed then)

◆ hlib_matrix_inv_diag()

HLIB_FNDECL hlib_vector_t hlib_matrix_inv_diag ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

compute diagonal of inverse of A with local accuracy acc

  • A will be overwritten during computation

◆ hlib_matrix_is_complex()

HLIB_FNDECL int hlib_matrix_is_complex ( const hlib_matrix_t  A,
int *  info 
)

return 1 if matrix A is complex valued and 0 otherwise

◆ hlib_matrix_is_herm()

HLIB_FNDECL int hlib_matrix_is_herm ( const hlib_matrix_t  A,
int *  info 
)

return 1 if matrix A is hermitian, e.g. A = A^H

◆ hlib_matrix_is_sym()

HLIB_FNDECL int hlib_matrix_is_sym ( const hlib_matrix_t  A,
int *  info 
)

return 1 if matrix A is symmetric, e.g. A = A^T

◆ hlib_matrix_ldl()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ldl ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

LDL factorisation of matrix A up to block-wise precision acc

  • A will be overwritten by L*D*L^T, which only allows matrix vector mult.
  • in case of hermitian matrices, LDL^H is computed
  • for return value see "hlib_matrix_lu"

◆ hlib_matrix_ldl_inv()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ldl_inv ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

LDL factorisation of matrix A up to block-wise precision acc

  • A will be overwritten by L*D*L^T, which only allows matrix vector mult.
  • in case of hermitian matrices, LDL^H is computed
  • for return value see "hlib_matrix_lu_inv"

◆ hlib_matrix_ll()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ll ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

Cholesky factorisation of matrix A up to block-wise precision acc

  • A will be overwritten by L*L^T, which only allows matrix vector mult.
  • in case of hermitian matrices, L*L^H is computed
  • for return value see "hlib_matrix_lu"

◆ hlib_matrix_ll_inv()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_ll_inv ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

Cholesky factorisation of matrix A up to block-wise precision acc

  • A will be overwritten by L*L^T, which only allows matrix vector mult.
  • in case of hermitian matrices, L*L^H is computed
  • for return value see "hlib_matrix_lu_inv"

◆ hlib_matrix_lu()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_lu ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

LU factorise matrix A up to block-wise precision acc

  • A will be overwritten by L*U, which only allows matrix vector mult.
  • the return value is a matrix which can be used to evaluate LU, e.g. for matrix-vector multiplication (this is not possible with A after factorisation as it holds just the data, albeit, it is still needed)

◆ hlib_matrix_lu_inv()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_lu_inv ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

LU factorise matrix A up to block-wise precision acc

  • A will be overwritten by L*U, which only allows matrix vector mult.
  • the return value is a matrix which can be used to evaluate (LU)^-1, e.g. for matrix-vector multiplication (this is not possible with A after factorisation as it holds just the data, albeit, it is still needed)

◆ hlib_matrix_mul()

HLIB_FNDECL void hlib_matrix_mul ( const hlib_real_t  alpha,
const hlib_matop_t  matop_A,
const hlib_matrix_t  A,
const hlib_matop_t  matop_B,
const hlib_matrix_t  B,
const hlib_real_t  beta,
hlib_matrix_t  C,
const hlib_acc_t  acc,
int *  info 
)

compute C := alpha op(A) op(B) + beta C with block-wise precision acc

◆ hlib_matrix_mulvec()

HLIB_FNDECL void hlib_matrix_mulvec ( const hlib_real_t  alpha,
const hlib_matrix_t  A,
const hlib_vector_t  x,
const hlib_real_t  beta,
hlib_vector_t  y,
const hlib_matop_t  matop,
int *  info 
)

compute y := alpha op(A) x + beta y, where op(A) is either A or A^T

Parameters
xsource vector of dimension columns(op(A))
ydest. vector of dimension rows(op(A))
matopmatrix operation, e.g. transpose

◆ hlib_matrix_nearfield_to_ccrs()

HLIB_FNDECL void hlib_matrix_nearfield_to_ccrs ( const hlib_matrix_t  A,
size_t *  nnz,
int **  rowptr,
int **  colind,
hlib_complex_t **  coeffs,
int *  info 
)

returns nearfield part of given matrix in CRS format

  • complex valued version
Parameters
nnznumber of non-zero coeff.
rowptrarray of row pointers
colindarray of column indices
coeffsarray of matrix coefficients

◆ hlib_matrix_nearfield_to_crs()

HLIB_FNDECL void hlib_matrix_nearfield_to_crs ( const hlib_matrix_t  A,
size_t *  nnz,
int **  rowptr,
int **  colind,
hlib_real_t **  coeffs,
int *  info 
)

returns nearfield part of given matrix in CRS format

  • CRS is stored in nnz, rowptr, colind and coeffs
Parameters
nnznumber of non-zero coeff.
rowptrarray of row pointers
colindarray of column indices
coeffsarray of matrix coefficients

◆ hlib_matrix_norm_frobenius()

HLIB_FNDECL hlib_real_t hlib_matrix_norm_frobenius ( const hlib_matrix_t  A,
int *  info 
)

compute Frobenius norm of matrix

◆ hlib_matrix_norm_frobenius_diff()

HLIB_FNDECL hlib_real_t hlib_matrix_norm_frobenius_diff ( const hlib_matrix_t  A,
const hlib_matrix_t  B,
int *  info 
)

compute Frobenius norm of A-B

◆ hlib_matrix_norm_inv_approx()

HLIB_FNDECL hlib_real_t hlib_matrix_norm_inv_approx ( const hlib_matrix_t  A,
const hlib_matrix_t  B,
int *  info 
)

compute inversion error |I-BA|_2, where B is supposed to be A^-1

◆ hlib_matrix_norm_spectral()

HLIB_FNDECL hlib_real_t hlib_matrix_norm_spectral ( const hlib_matrix_t  A,
int *  info 
)

compute spectral norm of matrix

◆ hlib_matrix_norm_spectral_diff()

HLIB_FNDECL hlib_real_t hlib_matrix_norm_spectral_diff ( const hlib_matrix_t  A,
const hlib_matrix_t  B,
int *  info 
)

compute relative spectral norm of A-B, e.g. |A-B|_2/|A|_2

◆ hlib_matrix_norm_spectral_inv()

HLIB_FNDECL hlib_real_t hlib_matrix_norm_spectral_inv ( const hlib_matrix_t  A,
int *  info 
)

compute spectral norm of inverse matrix

◆ hlib_matrix_permute()

HLIB_FNDECL void hlib_matrix_permute ( hlib_matrix_t  A,
const hlib_permutation_t  row_perm,
const hlib_permutation_t  col_perm,
int *  info 
)

reorder matrix A entries with given row and column permutations

  • only supported for dense matrices
  • NULL permutation will be handled as identity

◆ hlib_matrix_print_ps()

HLIB_FNDECL void hlib_matrix_print_ps ( const hlib_matrix_t  A,
const char *  filename,
const int  options,
int *  info 
)

print matrix A in postscript format to file filename options (may be ORed) :

  • HLIB_MATIO_SVD : print singular value decomposition in each block
  • HLIB_MATIO_ENTRY : print each entry of matrix
  • HLIB_MATIO_PATTERN : print sparsity pattern (non-zero entries)
Parameters
optionsoptions defining output

◆ hlib_matrix_product2()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_product2 ( const hlib_matop_t  matop1,
const hlib_linearoperator_t  A1,
const hlib_matop_t  matop2,
const hlib_linearoperator_t  A2,
int *  info 
)

represents product of matrices \(A_1 \cdot A_2\)

  • all matrix objects are only referenced, not copied

◆ hlib_matrix_product3()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_product3 ( const hlib_matop_t  matop1,
const hlib_linearoperator_t  A1,
const hlib_matop_t  matop2,
const hlib_linearoperator_t  A2,
const hlib_matop_t  matop3,
const hlib_linearoperator_t  A3,
int *  info 
)

represents product of matrices \(A_1 \cdot A_2 \cdot A3\)

  • all matrix objects are only referenced, not copied

◆ hlib_matrix_restrict_nearfield()

HLIB_FNDECL void hlib_matrix_restrict_nearfield ( hlib_matrix_t  A,
const int  delete_farfield,
int *  info 
)

restrict given matrix to nearfield part

  • if delete_farfield is non-zero, farfield matrices (e.g., low-rank) will be removed, otherwise set to rank 0

◆ hlib_matrix_row_perm_e2i()

HLIB_FNDECL hlib_permutation_t hlib_matrix_row_perm_e2i ( const hlib_matrix_t  A,
int *  info 
)

return mapping from external (user) to internal (in H-matrix) ordering for rows and columns.

  • returned object is reference to internal permutation: do NOT free
  • if matrix has no permutation, the return value is NULL

◆ hlib_matrix_row_perm_i2e()

HLIB_FNDECL hlib_permutation_t hlib_matrix_row_perm_i2e ( const hlib_matrix_t  A,
int *  info 
)

return mapping from internal (in H-matrix) to external (user) ordering for rows and columns.

  • returned object is reference to internal permutation: do NOT free
  • if matrix has no permutation, the return value is NULL

◆ hlib_matrix_row_vector()

HLIB_FNDECL hlib_vector_t hlib_matrix_row_vector ( const hlib_matrix_t  A,
int *  info 
)

create vectors matching the row indexsets of matrix A

◆ hlib_matrix_rows()

HLIB_FNDECL size_t hlib_matrix_rows ( const hlib_matrix_t  A,
int *  info 
)

return number of rows of matrix

◆ hlib_matrix_scale()

HLIB_FNDECL void hlib_matrix_scale ( const hlib_real_t  f,
const hlib_matrix_t  A,
int *  info 
)

scale matrix A by factor f

◆ hlib_matrix_solve_diag_left()

HLIB_FNDECL void hlib_matrix_solve_diag_left ( const hlib_matrix_t  D,
const hlib_matop_t  op_D,
hlib_matrix_t  A,
const hlib_acc_t  acc,
const int  pointwise,
int *  info 
)

solve op(D) B = A with diagonal D and known A

  • B will overwrite A
  • if pointwise is true, evaluation is performed pointwise, otherwise blockwise, e.g. diagonal leaf matrices are considered full and not diagonal

◆ hlib_matrix_solve_diag_right()

HLIB_FNDECL void hlib_matrix_solve_diag_right ( hlib_matrix_t  A,
const hlib_matrix_t  D,
const hlib_matop_t  op_D,
const hlib_acc_t  acc,
const int  pointwise,
int *  info 
)

solve B op(D) = A with diagonal D and known A

  • B will overwrite A
  • if pointwise is true, evaluation is performed pointwise, otherwise blockwise, e.g. diagonal leaf matrices are considered full and not diagonal

◆ hlib_matrix_solve_lower_left()

HLIB_FNDECL void hlib_matrix_solve_lower_left ( const hlib_matrix_t  L,
const hlib_matop_t  op_L,
hlib_matrix_t  A,
const hlib_acc_t  acc,
const int  pointwise,
const int  unit_diag,
int *  info 
)

solve L B = A with lower triangular L and known A

  • B will overwrite A
  • if pointwise is true, evaluation is performed pointwise, otherwise blockwise, e.g. diagonal leaf matrices are considered full and not triangular
  • if unit_diag is true, the pointwise/blockwise diagonal is considered to be the identity

◆ hlib_matrix_solve_lower_right()

HLIB_FNDECL void hlib_matrix_solve_lower_right ( hlib_matrix_t  A,
const hlib_matrix_t  L,
const hlib_matop_t  op_L,
const hlib_acc_t  acc,
const int  pointwise,
const int  unit_diag,
int *  info 
)

solve B op(L) = A with lower triangular L and known A

  • B will overwrite A
  • if pointwise is true, evaluation is performed pointwise, otherwise blockwise, e.g. diagonal leaf matrices are considered full and not triangular
  • if unit_diag is true, the pointwise/blockwise diagonal is considered to be the identity

◆ hlib_matrix_solve_upper_right()

HLIB_FNDECL void hlib_matrix_solve_upper_right ( hlib_matrix_t  A,
const hlib_matrix_t  U,
const hlib_acc_t  acc,
const int  pointwise,
const int  unit_diag,
int *  info 
)

solve B U = A with upper triangular U and known A

  • B will overwrite A
  • if pointwise is true, evaluation is performed pointwise, otherwise blockwise, e.g. diagonal leaf matrices are considered full and not triangular
  • if unit_diag is true, the pointwise/blockwise diagonal is considered to be the identity

◆ hlib_matrix_sum2()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_sum2 ( const hlib_real_t  alpha1,
const hlib_matop_t  matop1,
const hlib_linearoperator_t  A1,
const hlib_real_t  alpha2,
const hlib_matop_t  matop2,
const hlib_linearoperator_t  A2,
int *  info 
)

represents product of matrices \(A_1 + A_2\)

  • all matrix objects are only referenced, not copied

◆ hlib_matrix_sum3()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_sum3 ( const hlib_real_t  alpha1,
const hlib_matop_t  matop1,
const hlib_linearoperator_t  A1,
const hlib_real_t  alpha2,
const hlib_matop_t  matop2,
const hlib_linearoperator_t  A2,
const hlib_real_t  alpha3,
const hlib_matop_t  matop3,
const hlib_linearoperator_t  A3,
int *  info 
)

represents product of matrices \(A_1 + A_2 + A3\)

  • all matrix objects are only referenced, not copied

◆ hlib_matrix_to_complex()

HLIB_FNDECL void hlib_matrix_to_complex ( const hlib_matrix_t  A,
const int  force,
int *  info 
)

switch matrix to complex value; if force is 1, the conversion is performed independent of the current state (applies to block matrices)

◆ hlib_matrix_to_dense()

HLIB_FNDECL hlib_matrix_t hlib_matrix_to_dense ( const hlib_matrix_t  A,
int *  info 
)

convert matrix to dense format

◆ hlib_matrix_to_rank()

HLIB_FNDECL hlib_matrix_t hlib_matrix_to_rank ( const hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

convert matrix to lowrank format using best approximation (SVD) with truncation defined by acc

◆ hlib_matrix_to_real()

HLIB_FNDECL void hlib_matrix_to_real ( const hlib_matrix_t  A,
const int  force,
int *  info 
)

switch matrix to real value (if possible); if force is 1, the conversion is performed independent of the current state (applies to block matrices)

◆ hlib_matrix_transpose()

HLIB_FNDECL void hlib_matrix_transpose ( const hlib_matrix_t  A,
int *  info 
)

transpose matrix A

◆ hlib_matrix_waz()

HLIB_FNDECL hlib_linearoperator_t hlib_matrix_waz ( hlib_matrix_t  A,
const hlib_acc_t  acc,
int *  info 
)

Factorise matrix A into \(WAZ=I\), e.g., factorization of inverse of A

  • A will be overwritten by \(W^{-1} Z^{-1}\).
  • the return value is a linear operator which can be used to evaluate \(A^{-1}\), e.g. for matrix-vector multiplication (this is not possible with A after factorisation as it holds just the data, albeit, it is still needed)

◆ hlib_minor_version()

HLIB_FNDECL unsigned int hlib_minor_version ( )

return minor version number of 𝖧𝖫𝖨𝖡𝗉𝗋𝗈

◆ hlib_mm_load_matrix()

HLIB_FNDECL hlib_matrix_t hlib_mm_load_matrix ( const char *  filename,
int *  info 
)

read matrix from file filename

◆ hlib_perm_linearoperator()

HLIB_FNDECL hlib_linearoperator_t hlib_perm_linearoperator ( const hlib_permutation_t  P,
const hlib_linearoperator_t  A,
const hlib_permutation_t  R,
int *  info 
)

represents permuted operator \(P \cdot A \cdot R\)

◆ hlib_perm_matrix()

HLIB_FNDECL hlib_linearoperator_t hlib_perm_matrix ( const hlib_permutation_t  P,
const hlib_matrix_t  A,
const hlib_permutation_t  R,
int *  info 
)

represents permuted matrix \(P \cdot A \cdot R\)

  • all objects (P, A and R) are only referenced, not copied

◆ hlib_pltmg_load_matrix()

HLIB_FNDECL hlib_matrix_t hlib_pltmg_load_matrix ( const char *  filename,
int *  info 
)

read matrix from file filename

◆ hlib_print_parameters()

HLIB_FNDECL void hlib_print_parameters ( )

print all internal parameters of HLIBpro with their current value

◆ hlib_samg_load_coord()

HLIB_FNDECL hlib_coord_t hlib_samg_load_coord ( const char *  filename,
int *  info 
)

read coordinates from file filename

◆ hlib_samg_load_matrix()

HLIB_FNDECL hlib_matrix_t hlib_samg_load_matrix ( const char *  filename,
int *  info 
)

read matrix A from file "\a filename" in SAMG format

  • expecting format definition in basename(filename)>.frm

◆ hlib_samg_load_vector()

HLIB_FNDECL hlib_vector_t hlib_samg_load_vector ( const char *  filename,
int *  info 
)

read vector from file filename in SAMG format

  • expecting format definition in basename(filename)>.frm

◆ hlib_samg_save_coord()

HLIB_FNDECL void hlib_samg_save_coord ( const hlib_coord_t  coord,
const char *  filename,
int *  info 
)

write coordinates coord to file filename

◆ hlib_samg_save_matrix()

HLIB_FNDECL void hlib_samg_save_matrix ( const hlib_matrix_t  A,
const char *  filename,
int *  info 
)

save matrix A to file "\a filename" in SAMG format

  • also writing format definition to basename(filename)>.frm

◆ hlib_samg_save_vector()

HLIB_FNDECL void hlib_samg_save_vector ( const hlib_vector_t  x,
const char *  filename,
int *  info 
)

save vector to file filename in SAMG format

◆ hlib_set_abs_eps()

HLIB_FNDECL void hlib_set_abs_eps ( const hlib_real_t  eps)

define minimal boundary for singular values, e.g. not smaller

◆ hlib_set_coarsening()

HLIB_FNDECL void hlib_set_coarsening ( const int  build,
const int  arith 
)

enable (1) or disable (0) coarsening during H-matrix building and arithmetic (default: build=1, arith=0)

◆ hlib_set_config()

HLIB_FNDECL void hlib_set_config ( const char *  option,
const char *  value,
int *  info 
)

general function to change configuration variables: set option to value

◆ hlib_set_diag_scale()

HLIB_FNDECL void hlib_set_diag_scale ( const int  scale)

enable (1) or disable (0) diagonal scaling during LU, etc. (default: off)

◆ hlib_set_error_fn()

HLIB_FNDECL void hlib_set_error_fn ( const hlib_errorfn_t  errorfn)

set call back function in case of an error

◆ hlib_set_n_min()

HLIB_FNDECL void hlib_set_n_min ( const unsigned int  n)

set maximal leaf size in cluster trees to n

◆ hlib_set_nthreads()

HLIB_FNDECL void hlib_set_nthreads ( const unsigned int  p)

set maximal number of threads to use in H arithmetic

◆ hlib_set_progress_cb()

HLIB_FNDECL void hlib_set_progress_cb ( hlib_progressfn_t  fn,
void *  arg 
)

set callback function for progress information
if fn == NULL, HLIBpro uses default progress output

◆ hlib_set_recompress()

HLIB_FNDECL void hlib_set_recompress ( const int  recompress)

enable (1) or disable (0) recompression during H-matrix building (default: on)

◆ hlib_set_verbosity()

HLIB_FNDECL void hlib_set_verbosity ( const unsigned int  verb)

define verbosity of HLib

◆ hlib_set_warning_fn()

HLIB_FNDECL void hlib_set_warning_fn ( const hlib_errorfn_t  warnfn)

set call back function in case of a warning

◆ hlib_solver_auto()

HLIB_FNDECL hlib_solver_t hlib_solver_auto ( int *  info)

create automatic solver

◆ hlib_solver_bicgstab()

HLIB_FNDECL hlib_solver_t hlib_solver_bicgstab ( int *  info)

create BiCG-Stab solver

◆ hlib_solver_cg()

HLIB_FNDECL hlib_solver_t hlib_solver_cg ( int *  info)

create CG solver

◆ hlib_solver_cgs()

HLIB_FNDECL hlib_solver_t hlib_solver_cgs ( int *  info)

create CGS solver

◆ hlib_solver_free()

HLIB_FNDECL void hlib_solver_free ( hlib_solver_t  solver,
int *  info 
)

free solver

◆ hlib_solver_gmres()

HLIB_FNDECL hlib_solver_t hlib_solver_gmres ( const int  restart,
int *  info 
)

create GMRES solver with restart after restart steps

◆ hlib_solver_initialise_start_value()

HLIB_FNDECL void hlib_solver_initialise_start_value ( hlib_solver_t  solver,
const int  flag,
int *  info 
)

turn initialisation of start value during iteration on (flag != 0) or off (flag != 0)

◆ hlib_solver_linear_iteration()

HLIB_FNDECL hlib_solver_t hlib_solver_linear_iteration ( int *  info)

create linear iteration

◆ hlib_solver_minres()

HLIB_FNDECL hlib_solver_t hlib_solver_minres ( int *  info)

create MINRES solver

◆ hlib_solver_richardson()

HLIB_FNDECL hlib_solver_t hlib_solver_richardson ( int *  info)

create Richardson solver

◆ hlib_solver_solve()

HLIB_FNDECL void hlib_solver_solve ( const hlib_solver_t  solver,
const hlib_linearoperator_t  A,
hlib_vector_t  x,
const hlib_vector_t  b,
const hlib_linearoperator_t  W,
hlib_solve_info_t *  solve_info,
int *  info 
)

solve A x = b using solver with optional preconditioning, e.g. W A x = W b if W != NULL; information about the solving process is stored in solve_info

◆ hlib_solver_stopcrit()

HLIB_FNDECL void hlib_solver_stopcrit ( hlib_solver_t  solver,
const int  maxit,
const hlib_real_t  abs_red,
const hlib_real_t  rel_red,
int *  info 
)

set stopping criterion for solver

  • maxit : maximal number of iterations
  • abs_red : iterate until ||residual||_2 reaches abs_red
  • rel_red : iterate until ||residual||_2 reaches rel_red * ||start-res.||_2
  • in case of a preconditioner r = W(Ax - b), e.g. the preconditioned res.

◆ hlib_solver_tfqmr()

HLIB_FNDECL hlib_solver_t hlib_solver_tfqmr ( int *  info)

create TFQMR solver

◆ hlib_solver_use_exact_residual()

HLIB_FNDECL void hlib_solver_use_exact_residual ( hlib_solver_t  solver,
const int  flag,
int *  info 
)

turn computation of exact residual during iteration on (flag != 0) or off (flag != 0)

◆ hlib_vector_assign()

HLIB_FNDECL void hlib_vector_assign ( hlib_vector_t  y,
const hlib_vector_t  x,
int *  info 
)

copy content of vector x to vector y x and y have to be of equal type

◆ hlib_vector_axpy()

HLIB_FNDECL void hlib_vector_axpy ( const hlib_real_t  alpha,
const hlib_vector_t  x,
hlib_vector_t  y,
int *  info 
)

compute y := y + a x

◆ hlib_vector_build()

HLIB_FNDECL hlib_vector_t hlib_vector_build ( const size_t  size,
int *  info 
)

create scalar vectors of size size initialised with 0

◆ hlib_vector_bytesize()

HLIB_FNDECL size_t hlib_vector_bytesize ( const hlib_vector_t  v,
int *  info 
)

return size of matrix in bytes

◆ hlib_vector_caxpy()

HLIB_FNDECL void hlib_vector_caxpy ( const hlib_complex_t  alpha,
const hlib_vector_t  x,
hlib_vector_t  y,
int *  info 
)

compute y := y + a x

◆ hlib_vector_cbuild()

HLIB_FNDECL hlib_vector_t hlib_vector_cbuild ( const size_t  size,
int *  info 
)

create scalar vectors of size size initialised with 0

◆ hlib_vector_centry_get()

HLIB_FNDECL hlib_complex_t hlib_vector_centry_get ( const hlib_vector_t  x,
const size_t  i,
int *  info 
)

get single entry at position i in vector x

◆ hlib_vector_centry_set()

HLIB_FNDECL void hlib_vector_centry_set ( const hlib_vector_t  x,
const size_t  i,
const hlib_complex_t  f,
int *  info 
)

set single entry at position i in vector x

◆ hlib_vector_cexport()

HLIB_FNDECL void hlib_vector_cexport ( const hlib_vector_t  v,
hlib_complex_t *  arr,
int *  info 
)

copy data from vector v into given C arrays

  • arr has to be of size hlib_vector_size( v )

◆ hlib_vector_cfill()

HLIB_FNDECL void hlib_vector_cfill ( hlib_vector_t  x,
const hlib_complex_t  f,
int *  info 
)

fill vector x with constant value f

◆ hlib_vector_cimport()

HLIB_FNDECL void hlib_vector_cimport ( hlib_vector_t  v,
const hlib_complex_t *  arr,
int *  info 
)

copy data from C array arr into vector v

  • arr has to be of size hlib_vector_size( v )

◆ hlib_vector_copy()

HLIB_FNDECL hlib_vector_t hlib_vector_copy ( const hlib_vector_t  v,
int *  info 
)

copy vectormatrix

◆ hlib_vector_cscale()

HLIB_FNDECL void hlib_vector_cscale ( hlib_vector_t  x,
const hlib_complex_t  f,
int *  info 
)

scale vector x by f

◆ hlib_vector_dot()

HLIB_FNDECL hlib_complex_t hlib_vector_dot ( const hlib_vector_t  x,
const hlib_vector_t  y,
int *  info 
)

compute dot product <x,y> = x^H * y

◆ hlib_vector_entry_get()

HLIB_FNDECL hlib_real_t hlib_vector_entry_get ( const hlib_vector_t  x,
const size_t  i,
int *  info 
)

get single entry at position i in vector x

◆ hlib_vector_entry_set()

HLIB_FNDECL void hlib_vector_entry_set ( const hlib_vector_t  x,
const size_t  i,
const hlib_real_t  f,
int *  info 
)

set single entry at position i in vector x

◆ hlib_vector_export()

HLIB_FNDECL void hlib_vector_export ( const hlib_vector_t  v,
hlib_real_t *  arr,
int *  info 
)

copy data from vector v into given C arrays

  • arr has to be of size hlib_vector_size( v )

◆ hlib_vector_fft()

HLIB_FNDECL void hlib_vector_fft ( const hlib_vector_t  v,
int *  info 
)

compute FFT of vector v inplace

◆ hlib_vector_fill()

HLIB_FNDECL void hlib_vector_fill ( hlib_vector_t  x,
const hlib_real_t  f,
int *  info 
)

fill vector x with constant value f

◆ hlib_vector_fill_rand()

HLIB_FNDECL void hlib_vector_fill_rand ( hlib_vector_t  x,
int *  info 
)

fill vector x with random values

◆ hlib_vector_free()

HLIB_FNDECL void hlib_vector_free ( hlib_vector_t  v,
int *  info 
)

free resources coupled with vector v

◆ hlib_vector_ifft()

HLIB_FNDECL void hlib_vector_ifft ( const hlib_vector_t  v,
int *  info 
)

compute inverse FFT of vector v inplace

◆ hlib_vector_import()

HLIB_FNDECL void hlib_vector_import ( hlib_vector_t  v,
const hlib_real_t *  arr,
int *  info 
)

copy data from C array arr into vector v

  • arr has to be of size hlib_vector_size( v )

◆ hlib_vector_norm2()

HLIB_FNDECL hlib_real_t hlib_vector_norm2 ( const hlib_vector_t  x,
int *  info 
)

compute euklidean norm of x

◆ hlib_vector_norm_inf()

HLIB_FNDECL hlib_real_t hlib_vector_norm_inf ( const hlib_vector_t  x,
int *  info 
)

compute infinity norm of x

◆ hlib_vector_permute()

HLIB_FNDECL void hlib_vector_permute ( hlib_vector_t  v,
const hlib_permutation_t  perm,
int *  info 
)

reorder vector entries with given permutation

◆ hlib_vector_restrict_im()

HLIB_FNDECL hlib_vector_t hlib_vector_restrict_im ( const hlib_vector_t  v,
int *  info 
)

return vector containing only imaginary parts * of the entries of the given vector

◆ hlib_vector_restrict_re()

HLIB_FNDECL hlib_vector_t hlib_vector_restrict_re ( const hlib_vector_t  v,
int *  info 
)

return vector containing only real parts * of the entries of the given vector

◆ hlib_vector_scale()

HLIB_FNDECL void hlib_vector_scale ( hlib_vector_t  x,
const hlib_real_t  f,
int *  info 
)

scale vector x by f

◆ hlib_vector_size()

HLIB_FNDECL size_t hlib_vector_size ( const hlib_vector_t  v,
int *  info 
)

return size of vectors

◆ hlib_walltime()

HLIB_FNDECL double hlib_walltime ( )

return current walltime in seconds