H2Lib
3.0

This modules provides different kind of adaptive cross approximation techniques. More...
Typedefs  
typedef void(*  matrixentry_t) (const uint *ridx, const uint *cidx, void *data, const bool ntrans, pamatrix N) 
Matrix entry callback. More...  
Functions  
void  decomp_fullaca_rkmatrix (pamatrix A, const real accur, uint **ridx, uint **cidx, prkmatrix R) 
This routine computes the adaptive cross approximation using full pivoting of a given matrix . More...  
void  decomp_partialaca_rkmatrix (matrixentry_t entry, void *data, const uint *ridx, const uint rows, const uint *cidx, const uint cols, real accur, uint **rpivot, uint **cpivot, prkmatrix R) 
This routine computes the adaptive cross approximation using partial pivoting of an implicitly given matrix . More...  
void  copy_lower_aca_amatrix (bool unit, pcamatrix A, uint *xi, pamatrix B) 
Copies the lower triangular part of a matrix A to a matrix B after applying the row pivoting denoted by xi . More...  
void  copy_upper_aca_amatrix (bool unit, pcamatrix A, uint *xi, pamatrix B) 
Copies the upper triangular part of a matrix A to a matrix B after applying the row pivoting denoted by xi . More...  
This modules provides different kind of adaptive cross approximation techniques.
typedef void(* matrixentry_t) (const uint *ridx, const uint *cidx, void *data, const bool ntrans, pamatrix N) 
Matrix entry callback.
Used to evaluate submatrices of an implicitly given matrix.
A typical application would be the computation of entries of a boundary element matrix by appropriate quadrature rules.
ridx  Array of row indices. Should have at least N>rows elements if ntrans is not set and N>cols elements if it is set. 
cidx  Array of column indices. Should have at least N>cols elements if ntrans is not set and N>rows elemenrs if it is set. 
data  Arbitrary data the callback function might require to complete its task, e.g., geometry data. 
ntrans  Set if the transposed matrix is to be filled. 
N  Target matrix. 
Copies the lower triangular part of a matrix A
to a matrix B
after applying the row pivoting denoted by xi
.
for and with it holds
unit  If set to true the diagonal will be set to 1.0 instead of the corresponding entry of A . 
A  Source matrix. 
xi  Array denoting the row permutation. 
B  Target matrix containing the lower triangular part of A with respect to xi . 
B
has to match the length of the array xi
. Copies the upper triangular part of a matrix A
to a matrix B
after applying the row pivoting denoted by xi
.
for and with it holds
unit  If set to true the diagonal will be set to 1.0 instead of the corresponding entry of A . 
A  Source matrix. 
xi  Array denoting the row permutation. 
B  Target matrix containing the upper triangular part of A with respect to xi . 
B
has to match the length of the array xi
. void decomp_fullaca_rkmatrix  (  pamatrix  A, 
const real  accur,  
uint **  ridx,  
uint **  cidx,  
prkmatrix  R  
) 
This routine computes the adaptive cross approximation using full pivoting of a given matrix .
The matrix will be overwritten in part by the Schur complement, while the matrix will be filled with the lowrank approximation of the original . After completion, we have
with a guaranteed error of
A  Input matrix for which the ACA has to be applied to. 
accur  Accuracy defining how good the approximation has to be relative to the input matrix. 
ridx  Returns an array of row pivot indices, if ridx != NULL . 
cidx  Returns an array of column pivot indices, if cidx != NULL . 
R  The resulting low rank matrix is returned via R . 
void decomp_partialaca_rkmatrix  (  matrixentry_t  entry, 
void *  data,  
const uint *  ridx,  
const uint  rows,  
const uint *  cidx,  
const uint  cols,  
real  accur,  
uint **  rpivot,  
uint **  cpivot,  
prkmatrix  R  
) 
This routine computes the adaptive cross approximation using partial pivoting of an implicitly given matrix .
After applying the ACAalgorithm we have
with an estimated error of
entry  This callback function implicitly defines the matrix . It take two arrays of row and column indices, a voidpointer to some dataobject needed for computing matrix entries and a flag determined whether we want entries of the original or of the transposed matrix . Length of ridx and cidx is determined by the rows and columns of matrix A . 
data  An additional voidpointer to some dataobject that will be needed by entry to compute the matrix entries. 
ridx  An array of all row indices defining the complete matrix as in decomp_fullaca_rkmatrix. 
rows  Number of rows for the implicit matrix and therefore the length of ridx . 
cidx  An array of all column indices defining the complete matrix as in decomp_fullaca_rkmatrix. 
cols  Number of columns for the implicit matrix and therefore the length of cidx . 
accur  Accuracy defining how good the approximation has to be relative to the input matrix. 
rpivot  Returns an array of row pivot indices. 
cpivot  Returns an array of column pivot indices. 
R  The resulting low rank matrix is returned via R . 