HLIBpro 3.1
|
Typedefs | |
typedef hpro_ acc_fixed_eps_t hlib_ | acc_fixed_eps_t |
typedef hpro_ acc_fixed_rank_t hlib_ | acc_fixed_rank_t |
typedef hpro_ acc_blocked_t hlib_ | acc_blocked_t |
typedef hpro_ acc_t hlib_ | acc_t |
typedef void(* | hlib_) (const size_t n, const int *rowidx, const size_t m, const int *colidx, hlib_ real_t *matrix, void *arg) |
Functions | |
void hlib_ | init (int *info) |
void hlib_ | done (int *info) |
int hlib_ | is_init () |
void hlib_ | error_desc (char *desc, const size_t size) |
void hlib_ | use_single_prec () |
void hlib_ | use_double_prec () |
Coordinates | |
hlib_ coord_t hlib_ | coord_import (const size_t n, const unsigned int dim, double **coord, const double *period, int *info) |
size_t hlib_ | coord_ncoord (const hlib_ coord_t coord, int *info) |
unsigned int hlib_ | coord_dim (const hlib_ coord_t coord, int *info) |
double *hlib_ | coord_get (const hlib_ coord_t coord, const size_t i, int *info) |
double *hlib_ | coord_bbmin (const hlib_ coord_t coord, const size_t i, int *info) |
double *hlib_ | coord_bbmax (const hlib_ coord_t coord, const size_t i, int *info) |
int hlib_ | coord_has_bbox (const hlib_ coord_t coord, int *info) |
void hlib_ | coord_set_period (hlib_ coord_t coord, const double period[], int *info) |
void hlib_ | coord_get_period (hlib_ coord_t coord, double period[], int *info) |
void hlib_ | coord_free (hlib_ coord_t coord, int *info) |
size_t hlib_ | coord_bytesize (const hlib_ coord_t coord, int *info) |
void hlib_ | coord_print_vrml (const hlib_ coord_t coord, const char *filename, int *info) |
void hlib_ | coord_print_vtk (const hlib_ coord_t coord, const char *filename, int *info) |
Admissibility condition | |
hlib_ admcond_t hlib_ | admcond_geom (const hlib_ adm_t crit, const double eta, int *info) |
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_ admcond_t hlib_ | admcond_geom_hilo (const hlib_ complex_t kappa, const unsigned int nwaves, const double eta, int *info) |
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) |
void hlib_ | admcond_free (const hlib_ admcond_t ac, int *info) |
Clusters | |
Nodes and sub trees in a cluster tree. | |
int hlib_ | cl_first (const hlib_ cluster_t cl, int *info) |
int hlib_ | cl_last (const hlib_ cluster_t cl, int *info) |
size_t hlib_ | cl_size (const hlib_ cluster_t cl, int *info) |
size_t hlib_ | cl_nsons (const hlib_ cluster_t cl, int *info) |
hlib_ cluster_t hlib_ | cl_son (const hlib_ cluster_t cl, const unsigned int i, int *info) |
int hlib_ | cl_is_leaf (const hlib_ cluster_t cl, int *info) |
size_t hlib_ | cl_nnodes (const hlib_ cluster_t cl, int *info) |
size_t hlib_ | cl_depth (const hlib_ cluster_t cl, int *info) |
hlib_ cluster_t hlib_ | cl_copy (const hlib_ cluster_t cl, int *info) |
void hlib_ | cl_free (hlib_ cluster_t cl, int *info) |
size_t hlib_ | cl_bytesize (const hlib_ cluster_t cl, int *info) |
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_ clustertree_t hlib_ | clt_build_bsp (const hlib_ coord_t coord, const hlib_ bsp_t bsptype, const unsigned int nmin, int *info) |
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_ 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_ clustertree_t hlib_ | clt_build_alg (const hlib_ matrix_t S, const hlib_ alg_t algtype, const unsigned int nmin, int *info) |
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_ 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_ cluster_t hlib_ | clt_root (hlib_ clustertree_t ct, int *info) |
hlib_ permutation_t hlib_ | clt_perm_i2e (hlib_ clustertree_t ct, int *info) |
hlib_ permutation_t hlib_ | clt_perm_e2i (hlib_ clustertree_t ct, int *info) |
void hlib_ | clt_free (hlib_ clustertree_t ct, int *info) |
size_t hlib_ | clt_bytesize (const hlib_ clustertree_t ct, int *info) |
size_t hlib_ | clt_nnodes (const hlib_ clustertree_t ct, int *info) |
size_t hlib_ | clt_depth (const hlib_ clustertree_t ct, int *info) |
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_ blockcluster_t hlib_ | bc_parent (const hlib_ blockcluster_t bc, int *info) |
size_t hlib_ | bc_nsons (const hlib_ blockcluster_t bc, int *info) |
hlib_ blockcluster_t hlib_ | bc_son (const hlib_ blockcluster_t bc, const unsigned int i, const unsigned int j, int *info) |
int hlib_ | bc_is_leaf (const hlib_ blockcluster_t bc, int *info) |
int hlib_ | bc_is_adm (const hlib_ blockcluster_t bc, int *info) |
size_t hlib_ | bc_nnodes (const hlib_ blockcluster_t bc, int *info) |
size_t hlib_ | bc_depth (const hlib_ blockcluster_t bc, int *info) |
hlib_ cluster_t hlib_ | bc_rowcl (const hlib_ blockcluster_t bc, int *info) |
hlib_ cluster_t hlib_ | bc_colcl (const hlib_ blockcluster_t bc, int *info) |
hlib_ blockcluster_t hlib_ | bc_copy (const hlib_ blockcluster_t bc, int *info) |
void hlib_ | bc_free (hlib_ blockcluster_t bc, int *info) |
size_t hlib_ | bc_bytesize (const hlib_ blockcluster_t bc, int *info) |
int hlib_ | bc_csp (const hlib_ blockcluster_t bc, int *info) |
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_ blockclustertree_t hlib_ | bct_build (const hlib_ clustertree_t rowct, const hlib_ clustertree_t colct, const hlib_ admcond_t ac, int *info) |
size_t hlib_ | bct_nnodes (const hlib_ blockclustertree_t bct, int *info) |
size_t hlib_ | bct_depth (const hlib_ blockclustertree_t bct, int *info) |
hlib_ clustertree_t hlib_ | bct_rowct (const hlib_ blockclustertree_t bct, int *info) |
hlib_ clustertree_t hlib_ | bct_colct (const hlib_ blockclustertree_t bct, int *info) |
void hlib_ | bct_free (hlib_ blockclustertree_t bct, int *info) |
size_t hlib_ | bct_bytesize (const hlib_ blockclustertree_t bct, int *info) |
void hlib_ | bct_distribute_block (hlib_ blockclustertree_t bct, const unsigned int p, const unsigned int min_lvl, const int symmetric, int *info) |
int hlib_ | bct_csp (const hlib_ blockclustertree_t bct, int *info) |
void hlib_ | bct_print_ps (const hlib_ blockclustertree_t bct, const char *filename, int *info) |
Vectors | |
size_t hlib_ | vector_size (const hlib_ vector_t v, int *info) |
hlib_ vector_t hlib_ | vector_copy (const hlib_ vector_t v, int *info) |
size_t hlib_ | vector_bytesize (const hlib_ vector_t v, int *info) |
void hlib_ | vector_free (hlib_ vector_t v, int *info) |
hlib_ real_t hlib_ | vector_entry_get (const hlib_ vector_t x, const size_t i, int *info) |
hlib_ complex_t hlib_ | vector_centry_get (const hlib_ vector_t x, const size_t i, int *info) |
void hlib_ | vector_entry_set (const hlib_ vector_t x, const size_t i, const hlib_ real_t f, int *info) |
void hlib_ | vector_centry_set (const hlib_ vector_t x, const size_t i, const hlib_ complex_t f, int *info) |
hlib_ vector_t hlib_ | vector_build (const size_t size, int *info) |
hlib_ vector_t hlib_ | vector_cbuild (const size_t size, int *info) |
void hlib_ | vector_import (hlib_ vector_t v, const hlib_ real_t *arr, int *info) |
void hlib_ | vector_cimport (hlib_ vector_t v, const hlib_ complex_t *arr, int *info) |
void hlib_ | vector_export (const hlib_ vector_t v, hlib_ real_t *arr, int *info) |
void hlib_ | vector_cexport (const hlib_ vector_t v, hlib_ complex_t *arr, int *info) |
void hlib_ | vector_fill (hlib_ vector_t x, const hlib_ real_t f, int *info) |
void hlib_ | vector_cfill (hlib_ vector_t x, const hlib_ complex_t f, int *info) |
void hlib_ | vector_fill_rand (hlib_ vector_t x, int *info) |
void hlib_ | vector_assign (hlib_ vector_t y, const hlib_ vector_t x, int *info) |
void hlib_ | vector_scale (hlib_ vector_t x, const hlib_ real_t f, int *info) |
void hlib_ | vector_cscale (hlib_ vector_t x, const hlib_ complex_t f, int *info) |
void hlib_ | vector_axpy (const hlib_ real_t alpha, const hlib_ vector_t x, hlib_ vector_t y, int *info) |
void hlib_ | vector_caxpy (const hlib_ complex_t alpha, const hlib_ vector_t x, hlib_ vector_t y, int *info) |
hlib_ complex_t hlib_ | vector_dot (const hlib_ vector_t x, const hlib_ vector_t y, int *info) |
hlib_ real_t hlib_ | vector_norm2 (const hlib_ vector_t x, int *info) |
hlib_ real_t hlib_ | vector_norm_inf (const hlib_ vector_t x, int *info) |
hlib_ vector_t hlib_ | vector_restrict_re (const hlib_ vector_t v, int *info) |
hlib_ vector_t hlib_ | vector_restrict_im (const hlib_ vector_t v, int *info) |
void hlib_ | vector_permute (hlib_ vector_t v, const hlib_ permutation_t perm, int *info) |
void hlib_ | vector_fft (const hlib_ vector_t v, int *info) |
void hlib_ | vector_ifft (const hlib_ vector_t v, int *info) |
Matrices | |
void hlib_ | linearoperator_free (hlib_ linearoperator_t A, int *info) |
hlib_ vector_t hlib_ | linearoperator_range_vector (const hlib_ linearoperator_t A, int *info) |
hlib_ vector_t hlib_ | linearoperator_domain_vector (const hlib_ linearoperator_t A, int *info) |
hlib_ linearoperator_t hlib_ | perm_linearoperator (const hlib_ permutation_t P, const hlib_ linearoperator_t A, const hlib_ permutation_t R, int *info) |
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) |
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) |
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) |
size_t hlib_ | matrix_rows (const hlib_ matrix_t A, int *info) |
size_t hlib_ | matrix_cols (const hlib_ matrix_t A, int *info) |
hlib_ matrix_t hlib_ | matrix_copy (const hlib_ matrix_t A, int *info) |
hlib_ matrix_t hlib_ | matrix_copy_acc (const hlib_ matrix_t A, const hlib_ acc_t acc, const int coarsen, int *info) |
void hlib_ | matrix_copyto (const hlib_ matrix_t A, hlib_ matrix_t B, int *info) |
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_ matrix_t hlib_ | matrix_copy_blockdiag (const hlib_ matrix_t A, const unsigned int lvl, const size_t blocksize, int *info) |
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_ matrix_t hlib_ | matrix_copy_nearfield (const hlib_ matrix_t A, const int without_farfield, int *info) |
void hlib_ | matrix_restrict_nearfield (hlib_ matrix_t A, const int delete_farfield, int *info) |
void hlib_ | matrix_nearfield_to_crs (const hlib_ matrix_t A, size_t *nnz, int **rowptr, int **colind, hlib_ real_t **coeffs, int *info) |
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_ matrix_t hlib_ | matrix_restrict_re (const hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ matrix_t hlib_ | matrix_restrict_im (const hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
size_t hlib_ | matrix_bytesize (const hlib_ matrix_t A, int *info) |
void hlib_ | matrix_free (hlib_ matrix_t A, int *info) |
int hlib_ | matrix_is_sym (const hlib_ matrix_t A, int *info) |
int hlib_ | matrix_is_herm (const hlib_ matrix_t A, int *info) |
int hlib_ | matrix_is_complex (const hlib_ matrix_t A, int *info) |
void hlib_ | matrix_to_real (const hlib_ matrix_t A, const int force, int *info) |
void hlib_ | matrix_to_complex (const hlib_ matrix_t A, const int force, int *info) |
hlib_ real_t hlib_ | matrix_entry_get (const hlib_ matrix_t A, const size_t i, const size_t j, int *info) |
hlib_ complex_t hlib_ | matrix_centry_get (const hlib_ matrix_t A, const size_t i, const size_t j, int *info) |
hlib_ vector_t hlib_ | matrix_row_vector (const hlib_ matrix_t A, int *info) |
hlib_ vector_t hlib_ | matrix_col_vector (const hlib_ matrix_t A, int *info) |
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_ 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_ 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_ 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_ 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_ 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_ matrix_t hlib_ | matrix_build_sparse (const hlib_ blockclustertree_t bct, const hlib_ matrix_t S, const hlib_ acc_t acc, int *info) |
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_ 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_ 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_ matrix_t hlib_ | matrix_build_identity (const hlib_ blockclustertree_t bct, int *info) |
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_ permutation_t hlib_ | matrix_row_perm_i2e (const hlib_ matrix_t A, int *info) |
hlib_ permutation_t hlib_ | matrix_row_perm_e2i (const hlib_ matrix_t A, int *info) |
void hlib_ | matrix_permute (hlib_ matrix_t A, const hlib_ permutation_t row_perm, const hlib_ permutation_t col_perm, int *info) |
hlib_ linearoperator_t hlib_ | perm_matrix (const hlib_ permutation_t P, const hlib_ matrix_t A, const hlib_ permutation_t R, int *info) |
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_ 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_ 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_ 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_ matrix_t hlib_ | matrix_to_dense (const hlib_ matrix_t A, int *info) |
hlib_ matrix_t hlib_ | matrix_to_rank (const hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ matrix_t hlib_ | matrix_approx_rank_aca (const hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
void hlib_ | matrix_make_symmetric (hlib_ matrix_t A, int *info) |
void hlib_ | matrix_make_hermitian (hlib_ matrix_t A, int *info) |
void hlib_ | matrix_print_ps (const hlib_ matrix_t A, const char *filename, const int options, int *info) |
Algebra | |
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) |
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) |
void hlib_ | matrix_transpose (const hlib_ matrix_t A, int *info) |
void hlib_ | matrix_conjugate (const hlib_ matrix_t A, int *info) |
void hlib_ | matrix_scale (const hlib_ real_t f, const hlib_ matrix_t A, int *info) |
void hlib_ | matrix_cscale (const hlib_ complex_t f, const hlib_ matrix_t A, int *info) |
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) |
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) |
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) |
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_ matrix_t hlib_ | matrix_inv (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ vector_t hlib_ | matrix_inv_diag (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_factorise (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_factorise_inv (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_lu (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_ldl (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_ll (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_waz (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_lu_inv (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_ldl_inv (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
hlib_ linearoperator_t hlib_ | matrix_ll_inv (hlib_ matrix_t A, const hlib_ acc_t acc, int *info) |
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) |
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) |
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) |
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) |
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) |
void hlib_ | matrix_add_identity (hlib_ matrix_t A, const hlib_ real_t lambda, int *info) |
void hlib_ | matrix_cadd_identity (hlib_ matrix_t A, const hlib_ complex_t lambda, int *info) |
hlib_ real_t hlib_ | matrix_norm_frobenius (const hlib_ matrix_t A, int *info) |
hlib_ real_t hlib_ | matrix_norm_frobenius_diff (const hlib_ matrix_t A, const hlib_ matrix_t B, int *info) |
hlib_ real_t hlib_ | matrix_norm_spectral (const hlib_ matrix_t A, int *info) |
hlib_ real_t hlib_ | matrix_norm_spectral_inv (const hlib_ matrix_t A, int *info) |
hlib_ real_t hlib_ | matrix_norm_spectral_diff (const hlib_ matrix_t A, const hlib_ matrix_t B, int *info) |
hlib_ real_t hlib_ | matrix_norm_inv_approx (const hlib_ matrix_t A, const hlib_ matrix_t B, int *info) |
hlib_ real_t hlib_ | linearoperator_norm_spectral (const hlib_ linearoperator_t A, int *info) |
hlib_ real_t hlib_ | linearoperator_norm_spectral_inv (const hlib_ linearoperator_t A, int *info) |
hlib_ real_t hlib_ | linearoperator_norm_spectral_diff (const hlib_ linearoperator_t A, const hlib_ linearoperator_t B, int *info) |
hlib_ real_t hlib_ | linearoperator_norm_inv_approx (const hlib_ linearoperator_t A, const hlib_ linearoperator_t B, int *info) |
Solver | |
hlib_ solver_t hlib_ | solver_auto (int *info) |
hlib_ solver_t hlib_ | solver_linear_iteration (int *info) |
hlib_ solver_t hlib_ | solver_richardson (int *info) |
hlib_ solver_t hlib_ | solver_cg (int *info) |
hlib_ solver_t hlib_ | solver_cgs (int *info) |
hlib_ solver_t hlib_ | solver_bicgstab (int *info) |
hlib_ solver_t hlib_ | solver_tfqmr (int *info) |
hlib_ solver_t hlib_ | solver_minres (int *info) |
hlib_ solver_t hlib_ | solver_gmres (const int restart, int *info) |
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) |
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) |
void hlib_ | solver_initialise_start_value (hlib_ solver_t solver, const int flag, int *info) |
void hlib_ | solver_use_exact_residual (hlib_ solver_t solver, const int flag, int *info) |
void hlib_ | solver_free (hlib_ solver_t solver, int *info) |
Accuracy Management | |
hlib_ acc_t hlib_ | acc_fixed_eps (const hlib_ real_t eps) |
hlib_ acc_t hlib_ | acc_fixed_rank (const unsigned int k) |
hlib_ acc_t hlib_ | acc_blocked (const hlib_ acc_t *blockacc) |
Misc. | |
double hlib_ | walltime () |
double hlib_ | cputime () |
void hlib_ | set_n_min (const unsigned int n) |
void hlib_ | set_verbosity (const unsigned int verb) |
void hlib_ | set_abs_eps (const hlib_ real_t eps) |
void hlib_ | set_coarsening (const int build, const int arith) |
void hlib_ | set_recompress (const int recompress) |
void hlib_ | set_diag_scale (const int scale) |
void hlib_ | set_nthreads (const unsigned int p) |
void hlib_ | set_progress_cb (hlib_ progressfn_t fn, void *arg) |
void hlib_ | set_config (const char *option, const char *value, int *info) |
void hlib_ | get_config (const char *option, char *value, const size_t len, int *info) |
void hlib_ | print_parameters () |
void hlib_ | set_error_fn (const hlib_ errorfn_t errorfn) |
void hlib_ | set_warning_fn (const hlib_ errorfn_t warnfn) |
unsigned int hlib_ | major_version () |
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_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) |
Compatibility types and functions for HLIBpro 2.x interface.
accuracy type for block-wise accuracy
accuracy type for fixed accuracy
accuracy type for fixed rank
error/warning handler function types
callback function for progress information
list of error codes
enum hlib_ |
defines operation on matrices
enum hlib_ |
partitioning algorithms for binary sparse partitioning
enum hlib_ |
partitioning algorithms for algebraic clustering
enum hlib_ |
admissibility criteria
enum hlib_ |
different types of accuracy
enum hlib_ |
different types of low rank approximation
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
return accuracy object with fixed accuracy eps
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
create admissibility condition based on geometrical data
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_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
return size of memory in bytes used by block cluster
return column cluster of given block cluster
return copy of sub tree defined by bc
compute sparsity constant of block cluster tree
free resources coupled with block cluster tree bct
return 1 if block cluster is admissible and 0 otherwise
return 1 if block cluster is leaf and 0 otherwise
return number of nodes in block cluster
return total number of sons of block cluster bc
return parent block cluster of block cluster bc
print block cluster tree in PostScript format to file filename
return row cluster of given block cluster
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
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
return size of memory in bytes used by block cluster
return column cluster tree of given block cluster tree
compute sparsity constant of block cluster tree
return depth of block cluster tree
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
free resources coupled with cluster tree ct
return number of nodes in block cluster tree
print block cluster tree in PostScript format to file filename
return row cluster tree of given block cluster tree
return size of memory in bytes used by cluster
return copy of sub tree defined by cl
return 1 if cluster is leaf and 0 otherwise
return number of nodes in cluster tree
print cluster tree in PostScript format to file filename
return i'th son of cluster cl
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_ 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_ 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
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
coord | coordinates of indices |
bsptype | partitioning type |
nmin | minimal cluster size |
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
coord | coordinates of indices |
S | sparse mat. for connectivity |
bsptype | partitioning type |
nmin | minimal cluster size |
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
coord | coordinates of indices |
partition | predifined partition |
eq_depth | equalise depths of subtrees |
bsptype | partitioning type |
nmin | minimal cluster size |
return size of memory in bytes used by cluster
free resources coupled with cluster tree ct
return number of nodes in cluster tree
hlib_ permutation_t hlib_ clt_perm_e2i | ( | hlib_ clustertree_t | ct, |
int * | info | ||
) |
return mapping from external to internal (in cluster tree) ordering
hlib_ permutation_t hlib_ clt_perm_i2e | ( | hlib_ clustertree_t | ct, |
int * | info | ||
) |
return mapping from internal (in cluster tree) to external ordering
print cluster tree in PostScript format to file filename
hlib_ cluster_t hlib_ clt_root | ( | hlib_ clustertree_t | ct, |
int * | info | ||
) |
return root node in cluster tree
hlib_ real_t hlib_ cmplx_abs | ( | const hlib_ complex_t | a | ) |
return absolute value
conversion to/from C99 complex if available standard mathematical operators
hlib_ complex_t hlib_ cmplx_conj | ( | const hlib_ complex_t | a | ) |
return conjugate value
hlib_ complex_t hlib_ cmplx_exp | ( | const hlib_ complex_t | a | ) |
exponential function e^a
hlib_ complex_t hlib_ cmplx_sqrt | ( | const hlib_ complex_t | a | ) |
return square root
hlib_ complex_t hlib_ complex | ( | const hlib_ real_t | re, |
const hlib_ real_t | im | ||
) |
construct hlib_complex_t variable
return pointer too coordinate of i'th maximal bounding box
return pointer too coordinate of i'th minimal bounding box
return size of memory in bytes used by coordinates
return dimension of coordinates in given coordinate set coord
free resources coupled with coordinates
return pointer too coordinate i in given coordinate set coord
store periodicity vector in period
return 1, if coordinate set has bounding box info and 0 otherwise
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
return number of coordinates in given coordinate set coord
print coordinates in VRML format to file filename
print coordinates in VTK format to file filename
set perdiodicity of coordinates to period
double hlib_ cputime | ( | ) |
return execution time of program in seconds
copy description of current error to buffer
return current value of option, stored as string in value
read matrix from file filename
save matrix M to file filename
read coordinates from file filename
read matrix from file filename
read matrix from file filename
read vector from file filename
save coordinates to file filename
void hlib_ hformat_save_linearoperator | ( | const hlib_ linearoperator_t | A, |
const char * | filename, | ||
int * | info | ||
) |
save linear operator A to file filename
save matrix A to file filename
save vector v to file filename
int hlib_ is_init | ( | ) |
return 1 if HLIBpro is initialised and 0 otherwise
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 \)
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 \)
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 \)
create vectors from the domain of the linear operator A
free resources coupled with linear operator A
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
compute spectral norm of matrix
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
compute spectral norm of inverse matrix
create vectors from the range of the linear operator A
read coordinates from file filename
read matrix from file filename
read vector from file filename
read matrix named matname in Matlab V7 format from file filename; if matname == NULL or matname == "", the first matrix in filename will be read
read vector named vname from file filename in Matlab V7 format
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
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
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
compute A := A + lambda I
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
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
\begin{eqnarray*} A_{00} & A_{01} \\ A_{10} & A_{11} \end{eqnarray*}
is stored { A_00, A_10, A_01, A_11 },brows | number of block rows |
bcols | number of block columns |
submat | array of sub matrices |
copy | copy matrices if true |
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
bct | block ct. defining indexsets |
f | coeff. function defining mat. |
arg | add. argument to coeff. fn. |
lrapx | low-rank approximation method |
acc | accuracy of the approximation |
sym | if non-zero, matrix is sym. |
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
bct | block ct. defining indexsets |
f | coeff. function defining mat. |
arg | add. argument to coeff. fn. |
lrapx | low-rank approximation method |
acc | accuracy of the approximation |
sym | if non-zero, matrix is sym. |
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
bct | block ct. defining indexsets |
D | dense mat. to be converted |
lrapx | low-rank approximation method |
acc | accuracy of the approximation |
build H-matrix over block cluster tree bct representing identity
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
bct | block ct. defining indexsets |
S | sparse mat. to be converted |
acc | accuracy of the approximation |
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
compute A := A + lambda I
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
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
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
x | source vector of dimension columns(op(A)) |
y | dest. vector of dimension rows(op(A)) |
matop | matrix operation, e.g. transpose |
create vectors matching the column indexsets of matrix A
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_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_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_t hlib_ matrix_copy_nearfield | ( | const hlib_ matrix_t | A, |
const int | without_farfield, | ||
int * | info | ||
) |
copy nearfield part of matrix
copy matrix A to B
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
scale matrix A by factor f
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_ 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
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_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
rows | number of rows and |
cols | columns of the matrix |
nnz | number of non-zero coeff. |
colptr | array of column pointers |
rowind | array of row indices |
coeffs | array of matrix coeff. |
sym | if non-zero, matrix is sym. |
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
rows | number of rows and |
cols | columns of the matrix |
nnz | number of non-zero coeff. |
rowptr | array of row pointers |
colind | array of column indices |
coeffs | array of matrix coeff. |
sym | if non-zero, matrix is sym. |
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
rows | number of rows and |
cols | columns of the matrix |
nnz | number of non-zero coeff. |
colptr | array of column pointers |
rowind | array of row indices |
coeffs | array of matrix coefficients |
sym | if non-zero, matrix is sym. |
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
rows | number of rows and |
cols | columns of the matrix |
D | accuracy of the approximation |
sym | if non-zero, matrix is sym. |
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
rows | number of rows and |
cols | columns of the matrix |
nnz | number of non-zero coeff. |
rowptr | array of row pointers |
colind | array of column indices |
coeffs | array of matrix coefficients |
sym | if non-zero, matrix is sym. |
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
rows | number of rows and |
cols | columns of the matrix |
D | accuracy of the approximation |
sym | if non-zero, matrix is sym. |
compute inverse of A with block-wise precision acc; A will be overwritten with A^-1 upon exit
compute diagonal of inverse of A with local accuracy acc
return 1 if matrix A is complex valued and 0 otherwise
return 1 if matrix A is hermitian, e.g. A = A^H
return 1 if matrix A is symmetric, e.g. A = A^T
LDL factorisation of matrix A up to block-wise precision acc
LDL factorisation of matrix A up to block-wise precision acc
Cholesky factorisation of matrix A up to block-wise precision acc
Cholesky factorisation of matrix A up to block-wise precision acc
LU factorise matrix A up to block-wise precision acc
LU factorise matrix A up to block-wise precision acc
make given matrix hermitian by computing (A+A^H)/2, afterwards the upper right half is removed and the matrix has format "hermitian"
make given matrix symmetric by computing (A+A^T)/2, afterwards the upper right half is removed and the matrix has format "symmetric"
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
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
x | source vector of dimension columns(op(A)) |
y | dest. vector of dimension rows(op(A)) |
matop | matrix operation, e.g. transpose |
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
nnz | number of non-zero coeff. |
rowptr | array of row pointers |
colind | array of column indices |
coeffs | array of matrix coefficients |
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
nnz | number of non-zero coeff. |
rowptr | array of row pointers |
colind | array of column indices |
coeffs | array of matrix coefficients |
compute Frobenius norm of matrix
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_ 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
compute spectral norm of matrix
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
compute spectral norm of inverse matrix
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
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) :
options | options defining output |
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\)
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\)
hlib_ matrix_t hlib_ matrix_restrict_im | ( | const hlib_ matrix_t | A, |
const hlib_ acc_t | acc, | ||
int * | info | ||
) |
return matrix containing only imaginary parts * of the entries of the given matrix A
restrict given matrix to nearfield part
hlib_ matrix_t hlib_ matrix_restrict_re | ( | const hlib_ matrix_t | A, |
const hlib_ acc_t | acc, | ||
int * | info | ||
) |
return matrix containing only real parts * of the entries of the given matrix A
return mapping from external (user) to internal (in H-matrix) ordering for rows and columns.
return mapping from internal (in H-matrix) to external (user) ordering for rows and columns.
create vectors matching the row indexsets of matrix A
scale matrix A by factor f
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
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
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
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
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
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\)
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\)
switch matrix to complex value; if force is 1, the conversion is performed independent of the current state (applies to block matrices)
convert matrix to dense format
convert matrix to lowrank format using best approximation (SVD) with truncation defined by acc
switch matrix to real value (if possible); if force is 1, the conversion is performed independent of the current state (applies to block matrices)
Factorise matrix A into \(WAZ=I\), e.g., factorization of inverse of A
read matrix from file filename
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_ 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\)
read matrix from file filename
void hlib_ print_parameters | ( | ) |
print all internal parameters of HLIBpro with their current value
read coordinates from file filename
read matrix A from file "\a filename" in SAMG format
read vector from file filename in SAMG format
write coordinates coord to file filename
save matrix A to file "\a filename" in SAMG format
save vector to file filename in SAMG format
define minimal boundary for singular values, e.g. not smaller
enable (1) or disable (0) coarsening during H-matrix building and arithmetic (default: build=1, arith=0)
general function to change configuration variables: set option to value
enable (1) or disable (0) diagonal scaling during LU, etc. (default: off)
set maximal number of threads to use in H arithmetic
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
enable (1) or disable (0) recompression during H-matrix building (default: on)
set call back function in case of a warning
hlib_ solver_t hlib_ solver_auto | ( | int * | info | ) |
create automatic solver
hlib_ solver_t hlib_ solver_bicgstab | ( | int * | info | ) |
create BiCG-Stab solver
hlib_ solver_t hlib_ solver_cg | ( | int * | info | ) |
create CG solver
hlib_ solver_t hlib_ solver_cgs | ( | int * | info | ) |
create CGS solver
create GMRES solver with restart after restart steps
turn initialisation of start value during iteration on (flag != 0) or off (flag != 0)
hlib_ solver_t hlib_ solver_linear_iteration | ( | int * | info | ) |
create linear iteration
hlib_ solver_t hlib_ solver_minres | ( | int * | info | ) |
create MINRES solver
hlib_ solver_t hlib_ solver_richardson | ( | int * | info | ) |
create Richardson solver
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
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
hlib_ solver_t hlib_ solver_tfqmr | ( | int * | info | ) |
create TFQMR solver
turn computation of exact residual during iteration on (flag != 0) or off (flag != 0)
void hlib_ use_double_prec | ( | ) |
use double precision functions
void hlib_ use_single_prec | ( | ) |
use single precision functions
copy content of vector x to vector y x and y have to be of equal type
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
create scalar vectors of size size initialised with 0
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
create scalar vectors of size size initialised with 0
get single entry at position i in vector x
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
copy data from vector v into given C arrays
fill vector x with constant value f
copy data from C array arr into vector v
scale vector x by f
compute dot product <x,y> = x^H * y
get single entry at position i in vector x
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
copy data from vector v into given C arrays
fill vector x with constant value f
compute inverse FFT of vector v inplace
copy data from C array arr into vector v
compute infinity norm of x
reorder vector entries with given permutation
return vector containing only imaginary parts * of the entries of the given vector
return vector containing only real parts * of the entries of the given vector
double hlib_ walltime | ( | ) |
return current walltime in seconds