H2Lib
3.0
|
Representation of an admissible block for -matrices. More...
Data Structures | |
struct | _uniform |
Representation of an admissible block for -matrices. More... | |
Typedefs | |
typedef struct _uniform | uniform |
Representation of an admissible block for -matrices. | |
typedef uniform * | puniform |
Pointer to uniform object. | |
typedef const uniform * | pcuniform |
Pointer to a constant uniform object. | |
Functions | |
puniform | new_uniform (pclusterbasis rb, pclusterbasis cb) |
Create a new uniform object. More... | |
void | del_uniform (puniform u) |
Deletes an uniform object. More... | |
void | ref_row_uniform (puniform u, pclusterbasis rb) |
Append this uniform object to the block row list. More... | |
void | ref_col_uniform (puniform u, pclusterbasis cb) |
Append this uniform object to the block column list. More... | |
void | unref_row_uniform (puniform u) |
Remove block row references to an uniform object. More... | |
void | unref_col_uniform (puniform u) |
Remove block column references to an uniform object. More... | |
size_t | getsize_uniform (pcuniform u) |
Get size of a given uniform object. More... | |
void | clear_uniform (puniform u) |
Sets the coupling matrix to zero. More... | |
void | copy_uniform (bool trans, pcuniform src, puniform trg) |
Copy a uniform matrix . More... | |
puniform | clone_uniform (pcuniform src) |
Clone a uniform matrix. More... | |
void | scale_uniform (field alpha, puniform u) |
Scale a uniform matrix. More... | |
void | random_uniform (puniform u) |
Fill a uniform matrix with random coefficients. More... | |
void | mvm_uniform_avector (field alpha, bool trans, pcuniform u, pcavector x, pavector y) |
Computes the euclidean-norm of the coupling matrix and or the product of weight matrices with the coupling matrix. More... | |
void | add_projected_uniform (pcuniform u, pcclusteroperator ro, pcclusteroperator co, puniform unew) |
Addition of two uniform matrices in different clusterbasis. More... | |
void | project_inplace_uniform (puniform u, pclusterbasis rb, pcclusteroperator ro, pclusterbasis cb, pcclusteroperator co) |
Project uniform matrix into new clusterbasis. More... | |
void | add_rkmatrix_uniform (pcrkmatrix r, puniform unew) |
Adds a low rank matrix to an uniform matrix. More... | |
uint | getrows_uniform (pcuniform u) |
Get the number of rows of a uniform matrix . More... | |
uint | getcols_uniform (pcuniform u) |
Get the number of columns of a uniform matrix . More... | |
pamatrix | getS_uniform (puniform u) |
Get the factor S of a uniform matrix . More... | |
Representation of an admissible block for -matrices.
In case of -matrices an admissible subblock is represented by
where are the corresponding clusterbasis.
A uniform object stores the coupling-matrix aswell as references to the row- and column-clusterbasis.
void add_projected_uniform | ( | pcuniform | u, |
pcclusteroperator | ro, | ||
pcclusteroperator | co, | ||
puniform | unew | ||
) |
Addition of two uniform matrices in different clusterbasis.
Computes , where can be either
which depends on the equality of the row- and column clusterbasis.
u | Source uniform matrix with the representation - |
ro | Clusteroperator defining the basis-change for the row clusterbasis. Its weight matrix is . |
co | Clusteroperator defining the basis-change for the column clusterbasis. Its weight matrix is . |
unew | Source uniform matrix with the representation . |
void add_rkmatrix_uniform | ( | pcrkmatrix | r, |
puniform | unew | ||
) |
Adds a low rank matrix to an uniform matrix.
Updates the coupling matrix of to for a low rank matrix .
r | low rank matrix to be added to an uniform matrix. |
unew | uniform matrix storing the result of the computation. |
Clone a uniform matrix.
src | Source matrix. |
Copy a uniform matrix .
trans | Set if should be copied instead of . |
src | Source matrix. |
trg | target matrix. |
void del_uniform | ( | puniform | u | ) |
Deletes an uniform object.
Releases the memory corresponding to the object. Reference inside the block row and block column lists are automatically removed by this function.
u | Object to be deleted. |
Get the number of columns of a uniform matrix .
u | Matrix . |
Get the number of rows of a uniform matrix .
u | Matrix . |
size_t getsize_uniform | ( | pcuniform | u | ) |
Get size of a given uniform object.
u | uniform object. |
Computes the euclidean-norm of the coupling matrix and or the product of weight matrices with the coupling matrix.
Depending on given row- and column-clusteroperators this functions computed one of the following four values via vector iteration:
@param u @ref _uniform "uniform" object. @param rw Row @ref _clusteroperator "clusteroperator". If <tt>rw == NULL</tt> then \form#940 is omitted in the computation of the norm. @param cw Column @ref _clusteroperator "clusteroperator". If <tt>cw == NULL</tt> then \form#941 is omitted in the computation of the norm. @return Approximation of the euclidean-norm of one of the above mentioned matrices.
Computes the frobenius-norm of the coupling matrix and or the product of weight matrices with the coupling matrix.
Depending on given row- and column-clusteroperators this functions computed one of the following four values:
@param u @ref _uniform "uniform" object. @param rw Row @ref _clusteroperator "clusteroperator". If <tt>rw == NULL</tt> then \form#940 is omitted in the computation of the norm. @param cw Column @ref _clusteroperator "clusteroperator". If <tt>cw == NULL</tt> then \form#941 is omitted in the computation of the norm. @return Approximation of the frobenius-norm of one of the above mentioned matrices.
Matrix-vector multiplication or .
The uniform matrix or its adjoint is multiplied by the source vector , the result is scaled by and added to the target vector . Here the uniform matrix is represented by
alpha | Scaling factor . |
trans | Set if is to be used instead of . |
u | Matrix . |
x | Source vector . |
y | Target vector . |
puniform new_uniform | ( | pclusterbasis | rb, |
pclusterbasis | cb | ||
) |
Create a new uniform object.
Allocates storage for the object and sets the clusterbasis pointers according to the input parameters.
rb | Row clusterbasis |
cb | Column clusterbasis |
void project_inplace_uniform | ( | puniform | u, |
pclusterbasis | rb, | ||
pcclusteroperator | ro, | ||
pclusterbasis | cb, | ||
pcclusteroperator | co | ||
) |
Project uniform matrix into new clusterbasis.
The uniform matrix u
is represented by . Depending on the equality of the old and the new clusterbasis is being updated to
u | uniform object. |
rb | New row clusterbasis for u . |
ro | Clusteroperator describing the basischangebetween the old and new row clusterbasis. |
cb | New column clusterbasis for u . |
co | Clusteroperator describing the basischangebetween the old and new column clusterbasis. |
void random_uniform | ( | puniform | u | ) |
Fill a uniform matrix with random coefficients.
u | Target matrix . |
void ref_col_uniform | ( | puniform | u, |
pclusterbasis | cb | ||
) |
Append this uniform object to the block column list.
A reference to the uniform object will be set into a reference list inside the column clusterbasis cb
. Vice versa a reference to the current object will also be inserted into the cnext
respectively cprev
list.
u | Uniform object to be referenced. |
cb | Column clusterbasis to be referenced. |
void ref_row_uniform | ( | puniform | u, |
pclusterbasis | rb | ||
) |
Append this uniform object to the block row list.
A reference to the uniform object will be set into a reference list inside the row clusterbasis rb
. Vice versa a reference to the current object will also be inserted into the rnext
respectively rprev
list.
u | Uniform object to be referenced. |
rb | Row clusterbasis to be referenced. |
Scale a uniform matrix.
alpha | Scaling factor . |
u | Target matrix , will be overwritten by . |
void unref_col_uniform | ( | puniform | u | ) |
Remove block column references to an uniform object.
All previous made block column references to this uniform object will be removed. This is the counterpart of the function ref_col_uniform.
u | Uniform object for which the references should be removed. |
void unref_row_uniform | ( | puniform | u | ) |
Remove block row references to an uniform object.
All previous made block row references to this uniform object will be removed. This is the counterpart of the function ref_row_uniform.
u | Uniform object for which the references should be removed. |