![]() |
H2Lib
3.0
|
Functions for turning an amatrix, hmatrix or h2matrix into an h2matrix. More...
Data Structures | |
| struct | _truncblock |
| Description of basis and weights for one submatrix in the unification algorithm. More... | |
Typedefs | |
| typedef struct _truncblock | truncblock |
| Cluster basis and weights for use in the unification algorithm. | |
| typedef truncblock * | ptruncblock |
| Pointer to truncblock object. | |
Functions | |
| ph2matrix | compress_amatrix_h2matrix (pcamatrix G, pcblock b, pctruncmode tm, real eps) |
Approximate a matrix, represented by an amatrix object, by an -matrix. More... | |
| ph2matrix | compress_hmatrix_h2matrix (pchmatrix G, pctruncmode tm, real eps) |
Approximate a hierarchical matrix, represented by an hmatrix object, by an -matrix. More... | |
| ph2matrix | compress_h2matrix_h2matrix (pch2matrix G, bool rbortho, bool cbortho, pctruncmode tm, real eps) |
Approximate an -matrix, represented by an h2matrix object, by a recompressed -matrix. More... | |
| ph2matrix | compress_symmetric_h2matrix_h2matrix (pch2matrix G, bool rbortho, pctruncmode tm, real eps) |
Approximate a symmetric -matrix, represented by an h2matrix object, by a recompressed -matrix. More... | |
| void | rowweights_h2matrix (pch2matrix G, pcclusteroperator rbw, pcclusteroperator cbw, pctruncmode tm, pclusteroperator rlw) |
Prepare local row weights for a given -matrix. More... | |
| void | colweights_h2matrix (pch2matrix G, pcclusteroperator rbw, pcclusteroperator cbw, pctruncmode tm, pclusteroperator clw) |
Prepare local column weights for a given -matrix. More... | |
| void | localweights_h2matrix (pch2matrix G, pcclusteroperator rbw, pcclusteroperator cbw, pctruncmode tm, pclusteroperator rlw, pclusteroperator clw) |
Prepare local weights for a given -matrix. More... | |
| void | accumulate_clusteroperator (pcclusterbasis cb, pctruncmode tm, pclusteroperator lw) |
| Merge the local weights of clusters with the weights inherited from their ancestors in order to obtain total weights. More... | |
| void | totalweights_h2matrix (pch2matrix G, bool rbortho, bool cbortho, pctruncmode tm, pclusteroperator rw, pclusteroperator cw) |
Construct total weights for a given -matrix. More... | |
| void | truncate_clusterbasis (pcclusterbasis cb, pcclusteroperator cw, pcclusteroperator clw, pctruncmode tm, real eps, pclusterbasis cbnew, pclusteroperator old2new) |
| Compute a truncated cluster basis. More... | |
| pclusterbasis | buildrowbasis_h2matrix (pch2matrix G, bool rbortho, bool cbortho, pctruncmode tm, real eps, pclusteroperator old2new) |
Construct an improved row basis for an -matrix. More... | |
| pclusterbasis | buildcolbasis_h2matrix (pch2matrix G, bool rbortho, bool cbortho, pctruncmode tm, real eps, pclusteroperator old2new) |
Construct an improved row basis for an -matrix. More... | |
| void | truncrowbasis_h2matrix (ph2matrix G, bool rbortho, bool cbortho, pctruncmode tm, real eps, pclusterbasis rbnew, pclusteroperator old2new) |
Construct an improved row basis for an -matrix. More... | |
| void | trunccolbasis_h2matrix (ph2matrix G, bool rbortho, bool cbortho, pctruncmode tm, real eps, pclusterbasis cbnew, pclusteroperator old2new) |
Construct an improved column basis for an -matrix. More... | |
| ph2matrix | build_projected_h2matrix (pch2matrix G, pclusterbasis rb, pcclusteroperator ro, pclusterbasis cb, pcclusteroperator co) |
Construct an -matrix approximation of a given -matrix in new cluster bases by blockwise projection. More... | |
| void | project_inplace_h2matrix (ph2matrix G, pclusterbasis rb, pcclusteroperator ro, pclusterbasis cb, pcclusteroperator co) |
Switch the cluster bases of an -matrix by applying blockwise projections. More... | |
| void | orthoweight_clusterbasis (pclusterbasis cb) |
| Compute cluster weights and store them in the cluster basis. More... | |
| void | totalweight_row_clusteroperator (pclusterbasis rb, pclusteroperator rw, pctruncmode tm) |
| Compute total row weights of a matrix. More... | |
| void | totalweight_col_clusteroperator (pclusterbasis cb, pclusteroperator cw, pctruncmode tm) |
| Compute total column weights of a matrix. More... | |
| void | truncate_inplace_clusterbasis (pclusterbasis cb, pclusteroperator cw, pctruncmode tm, real eps) |
| Replace a cluster basis with a truncated basis. More... | |
| void | recompress_inplace_h2matrix (ph2matrix G, pctruncmode tm, real eps) |
Recompress an -matrix. More... | |
| ptruncblock | new_truncblock (pcclusterbasis cb, pcclusteroperator cw, ptruncblock next) |
| Create a new truncblock object. More... | |
| void | del_truncblock (ptruncblock tb) |
| Delete a list of truncblock objects. More... | |
| ptruncblock | reverse_truncblock (ptruncblock tb) |
| Reverse the order of a list of truncblock objects. More... | |
| pclusterbasis | unify_clusterbasis (pccluster t, ptruncblock tb, pctruncmode tm, real eps, pclusteroperator*cw) |
| Construct a unified cluster basis. More... | |
| void | unify_h2matrix (ph2matrix G, pclusteroperator*rw1, pclusteroperator*cw1, pctruncmode tm, real eps, pclusteroperator*rw, pclusteroperator*cw) |
Unify -submatrices into a large -matrix. More... | |
| void | unify_parallel_h2matrix (ph2matrix G, uint pardepth, pclusteroperator*rw1, pclusteroperator*cw1, pctruncmode tm, real eps, pclusteroperator*rw, pclusteroperator*cw) |
Unify -submatrices into a large -matrix, experimental parallel implementation. More... | |
| void | convert_rkmatrix_uniform (pcrkmatrix r, puniform u, pctruncmode tm, pclusteroperator*rw, pclusteroperator*cw) |
| Converts an rkmatrix into a uniform matrix. More... | |
| pclusterbasis | buildrowbasis_hmatrix (pchmatrix G, pctruncmode tm, real eps) |
| Construct a row basis for a hierarchical matrix. More... | |
| pclusterbasis | buildcolbasis_hmatrix (pchmatrix G, pctruncmode tm, real eps) |
| Construct a column basis for a hierarchical matrix. More... | |
| ph2matrix | build_projected_hmatrix_h2matrix (pchmatrix G, pclusterbasis rb, pclusterbasis cb) |
Construct an -matrix approximation of a given hierarchical matrix in given cluster bases by blockwise projection. More... | |
| pclusterbasis | buildrowbasis_amatrix (pcamatrix G, pcblock b, pctruncmode tm, real eps) |
| Construct a row basis for an array matrix. More... | |
| pclusterbasis | buildcolbasis_amatrix (pcamatrix G, pcblock b, pctruncmode tm, real eps) |
| Construct a column basis for an array matrix. More... | |
| ph2matrix | build_projected_amatrix_h2matrix (pcamatrix G, pcblock b, pclusterbasis rb, pclusterbasis cb) |
Construct an -matrix approximation of a given array matrix in given cluster bases by blockwise projection. More... | |
Functions for turning an amatrix, hmatrix or h2matrix into an h2matrix.
The functions in this module can be used to convert array matrices and hierarchical matrices into
-matrices and to recompress
-matrices. The module also provides a unification algorithm that takes a block matrix consisting of independent
-matrices and turns it into an
-matrix with unified row and column bases.
| void accumulate_clusteroperator | ( | pcclusterbasis | cb, |
| pctruncmode | tm, | ||
| pclusteroperator | lw | ||
| ) |
Merge the local weights of clusters with the weights inherited from their ancestors in order to obtain total weights.
Finds matrices
with
, where
is the father of the cluster
and
is orthogonal.
| cb | Cluster basis. |
| tm | Truncation mode, supplies . |
| lw | Cluster operator, contains and is overwritten by . |
| ph2matrix build_projected_amatrix_h2matrix | ( | pcamatrix | G, |
| pcblock | b, | ||
| pclusterbasis | rb, | ||
| pclusterbasis | cb | ||
| ) |
Construct an
-matrix approximation of a given array matrix in given cluster bases by blockwise projection.
| G | Original matrix. |
| b | Block tree. |
| rb | New row basis. |
| cb | New column basis. |
-matrix. | ph2matrix build_projected_h2matrix | ( | pch2matrix | G, |
| pclusterbasis | rb, | ||
| pcclusteroperator | ro, | ||
| pclusterbasis | cb, | ||
| pcclusteroperator | co | ||
| ) |
Construct an
-matrix approximation of a given
-matrix in new cluster bases by blockwise projection.
| G | Original matrix. |
| rb | New row basis. |
| ro | Basis change from old row basis G->rb to new basis rb. |
| cb | New column basis. |
| co | Basis change from old column basis G->cb to new basis cb. |
-matrix. | ph2matrix build_projected_hmatrix_h2matrix | ( | pchmatrix | G, |
| pclusterbasis | rb, | ||
| pclusterbasis | cb | ||
| ) |
Construct an
-matrix approximation of a given hierarchical matrix in given cluster bases by blockwise projection.
| G | Original matrix. |
| rb | New row basis. |
| cb | New column basis. |
-matrix. | pclusterbasis buildcolbasis_amatrix | ( | pcamatrix | G, |
| pcblock | b, | ||
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Construct a column basis for an array matrix.
| G | Original matrix . |
| b | Block tree. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| pclusterbasis buildcolbasis_h2matrix | ( | pch2matrix | G, |
| bool | rbortho, | ||
| bool | cbortho, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusteroperator | old2new | ||
| ) |
Construct an improved row basis for an
-matrix.
| G | Original matrix . |
| rbortho | Set if the original row basis is orthogonal, this allows the algorithm to avoid computing row weights. |
| cbortho | Set if the original column basis is orthogonal, this allows the algorithm to avoid computing column weights. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| old2new | Cluster operator describing the change of basis from G->cb to the new basis. |
| pclusterbasis buildcolbasis_hmatrix | ( | pchmatrix | G, |
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Construct a column basis for a hierarchical matrix.
| G | Original matrix . |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| pclusterbasis buildrowbasis_amatrix | ( | pcamatrix | G, |
| pcblock | b, | ||
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Construct a row basis for an array matrix.
| G | Original matrix . |
| b | Block tree. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| pclusterbasis buildrowbasis_h2matrix | ( | pch2matrix | G, |
| bool | rbortho, | ||
| bool | cbortho, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusteroperator | old2new | ||
| ) |
Construct an improved row basis for an
-matrix.
| G | Original matrix . |
| rbortho | Set if the original row basis is orthogonal, this allows the algorithm to avoid computing row weights. |
| cbortho | Set if the original column basis is orthogonal, this allows the algorithm to avoid computing column weights. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| old2new | Cluster operator describing the change of basis from G->rb to the new basis. |
| pclusterbasis buildrowbasis_hmatrix | ( | pchmatrix | G, |
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Construct a row basis for a hierarchical matrix.
| G | Original matrix . |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| void colweights_h2matrix | ( | pch2matrix | G, |
| pcclusteroperator | rbw, | ||
| pcclusteroperator | cbw, | ||
| pctruncmode | tm, | ||
| pclusteroperator | clw | ||
| ) |
Prepare local column weights for a given
-matrix.
Finds matrices
with
, where
are the admissible blocks connected to the column cluster
and
is orthogonal.
| G | Source matrix . |
| rbw | Basis weights for the row basis, can be obtained by weight_clusterbasis_clusteroperator. If this is a null pointer, the row basis is assumed to be orthogonal, so no weights are required. |
| cbw | Basis weights for the column basis, can be obtained by weight_clusterbasis_clusteroperator. If this is a null pointer, the column basis is assumed to be orthogonal, so no weights are required. |
| tm | Truncation mode. |
| clw | Will be filled with the local column weights, can be initialized by build_from_clusterbasis_clusteroperator. If the cluster operator already contains something, the local weights will be merged with the original contents. |
| ph2matrix compress_amatrix_h2matrix | ( | pcamatrix | G, |
| pcblock | b, | ||
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Approximate a matrix, represented by an amatrix object, by an
-matrix.
| G | Source matrix . |
| b | Block tree, rows and columns have to match . |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
-matrix approximation of
. | ph2matrix compress_h2matrix_h2matrix | ( | pch2matrix | G, |
| bool | rbortho, | ||
| bool | cbortho, | ||
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Approximate an
-matrix, represented by an h2matrix object, by a recompressed
-matrix.
| G | Source matrix . |
| rbortho | Set if the original row basis is orthogonal, this allows the algorithm to avoid computing row weights. |
| cbortho | Set if the original column basis is orthogonal, this allows the algorithm to avoid computing column weights. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
-matrix approximation of
. | ph2matrix compress_hmatrix_h2matrix | ( | pchmatrix | G, |
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Approximate a hierarchical matrix, represented by an hmatrix object, by an
-matrix.
| G | Source matrix . |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
-matrix approximation of
. | ph2matrix compress_symmetric_h2matrix_h2matrix | ( | pch2matrix | G, |
| bool | rbortho, | ||
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Approximate a symmetric
-matrix, represented by an h2matrix object, by a recompressed
-matrix.
Since the matrix is symmetric, we assume the row and column cluster basis are identical, i.e., G->rb==G->cb.
| G | Source matrix . |
| rbortho | Set if the original row and column basis is orthogonal, this allows the algorithm to avoid computing row weights. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
-matrix approximation of
. | void convert_rkmatrix_uniform | ( | pcrkmatrix | r, |
| puniform | u, | ||
| pctruncmode | tm, | ||
| pclusteroperator* | rw, | ||
| pclusteroperator* | cw | ||
| ) |
Converts an rkmatrix into a uniform matrix.
Returns an exact representation of an rkmatrix by a new uniform matrix with new orthogonal row and column cluster bases and also computes corresponding total weight matrices. This function is intended for use with unify_h2matrix in order to convert rkmatrix approximations of leaves into h2matrix objects.
| r | Original matrix. |
| u | Uniform matrix, will be overwritten. |
| tm | Truncation mode, used to set of weight matrices correctly. |
| rw | If not a null pointer, will be set to point to a new clusteroperator tree containing the total row weights of the new uniform matrix. |
| cw | If not a null pointer, will be set to point to a new clusteroperator tree containing the total column weights of the new uniform matrix. |
| void del_truncblock | ( | ptruncblock | tb | ) |
Delete a list of truncblock objects.
| tb | Head of list. |
| void localweights_h2matrix | ( | pch2matrix | G, |
| pcclusteroperator | rbw, | ||
| pcclusteroperator | cbw, | ||
| pctruncmode | tm, | ||
| pclusteroperator | rlw, | ||
| pclusteroperator | clw | ||
| ) |
Prepare local weights for a given
-matrix.
Finds matrices
with
, where
are the admissible blocks connected to the row cluster
and
is orthogonal and matrices
with
, where
are the admissible blocks connected to the column cluster
and
is orthogonal.
This algorithm is more efficient than calling rowweights_h2matrix and colweights_h2matrix individually, since it passes only once through the matrix.
| G | Source matrix . |
| rbw | Basis weights for the row basis, can be obtained by weight_clusterbasis_clusteroperator. If this is a null pointer, the row basis is assumed to be orthogonal, so no weights are required. |
| cbw | Basis weights for the column basis, can be obtained by weight_clusterbasis_clusteroperator. If this is a null pointer, the column basis is assumed to be orthogonal, so no weights are required. |
| tm | Truncation mode. |
| rlw | Will be filled with the local row weights, can be initialized by build_from_clusterbasis_clusteroperator. If the cluster operator already contains something, the local weights will be merged with the original contents. |
| clw | Will be filled with the local column weights, can be initialized by build_from_clusterbasis_clusteroperator. If the cluster operator already contains something, the local weights will be merged with the original contents. |
| ptruncblock new_truncblock | ( | pcclusterbasis | cb, |
| pcclusteroperator | cw, | ||
| ptruncblock | next | ||
| ) |
Create a new truncblock object.
| cb | Cluster basis of the corresponding submatrix. |
| cw | Total weights for cb. |
| next | Next truncblock in list. |
| void orthoweight_clusterbasis | ( | pclusterbasis | cb | ) |
Compute cluster weights and store them in the cluster basis.
The weights are the factors
of the skinny QR decomposition
.
This function is similar to weight_clusterbasis_clusteroperator, but stores the basis weights in cb->Z instead of in a separate clusteroperator.
| cb | Target cluster basis, its field Z will be overwritten. |
| void project_inplace_h2matrix | ( | ph2matrix | G, |
| pclusterbasis | rb, | ||
| pcclusteroperator | ro, | ||
| pclusterbasis | cb, | ||
| pcclusteroperator | co | ||
| ) |
Switch the cluster bases of an
-matrix by applying blockwise projections.
| G | Original matrix, will be overwritten by projected matrix. |
| rb | New row basis. |
| ro | Basis change from old row basis G->rb to new basis rb. |
| cb | New column basis. |
| co | Basis change from old column basis G->cb to new basis cb |
| void recompress_inplace_h2matrix | ( | ph2matrix | G, |
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Recompress an
-matrix.
Replace an
-matrix by a recompressed matrix.
| G | Original matrix, will be overwritten by the recompressed matrix. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| ptruncblock reverse_truncblock | ( | ptruncblock | tb | ) |
Reverse the order of a list of truncblock objects.
Since new blocks are added at the head of a list, reversing the list restores the original order.
| tb | Head of original list, will be changed. |
| void rowweights_h2matrix | ( | pch2matrix | G, |
| pcclusteroperator | rbw, | ||
| pcclusteroperator | cbw, | ||
| pctruncmode | tm, | ||
| pclusteroperator | rlw | ||
| ) |
Prepare local row weights for a given
-matrix.
Finds matrices
with
, where
are the admissible blocks connected to the row cluster
and
is orthogonal.
| G | Source matrix . |
| rbw | Basis weights for the row basis, can be obtained by weight_clusterbasis_clusteroperator. If this is a null pointer, the row basis is assumed to be orthogonal, so no weights are required. |
| cbw | Basis weights for the column basis, can be obtained by weight_clusterbasis_clusteroperator. If this is a null pointer, the column basis is assumed to be orthogonal, so no weights are required. |
| tm | Truncation mode. |
| rlw | Will be filled with the local row weights, can be initialized by build_from_clusterbasis_clusteroperator. If the cluster operator already contains something, the local weights will be merged with the original contents. |
| void totalweight_col_clusteroperator | ( | pclusterbasis | cb, |
| pclusteroperator | cw, | ||
| pctruncmode | tm | ||
| ) |
Compute total column weights of a matrix.
The column weights are the factor
of the skinny QR decomposition
, where
is the total column cluster basis of an
-matrix
.
The matrix
is obtained implicitly from the list starting with the pointer clist contained in the cluster basis.
| cb | Column basis. |
| cw | Total column weight. |
| tm | Truncation mode. |
| void totalweight_row_clusteroperator | ( | pclusterbasis | rb, |
| pclusteroperator | rw, | ||
| pctruncmode | tm | ||
| ) |
Compute total row weights of a matrix.
The row weights are the factor
of the skinny QR decomposition
, where
is the total row cluster basis of an
-matrix
.
The matrix
is obtained implicitly from the list starting with the pointer rlist contained in the cluster basis.
| rb | Row basis. |
| rw | Total row weight. |
| tm | Truncation mode. |
| void totalweights_h2matrix | ( | pch2matrix | G, |
| bool | rbortho, | ||
| bool | cbortho, | ||
| pctruncmode | tm, | ||
| pclusteroperator | rw, | ||
| pclusteroperator | cw | ||
| ) |
Construct total weights for a given
-matrix.
Finds matrices
with
, where
is the total cluster basis and
is orthogonal. These are called total row weights. The total column weights are computed by applying the same procedure to
instead of
.
| G | Source matrix . |
| rbortho | Set if the original row basis is orthogonal, this allows the algorithm to avoid computing row weights. |
| cbortho | Set if the original column basis is orthogonal, this allows the algorithm to avoid computing column weights. |
| tm | Truncation mode. |
| rw | Total row weights, can be initialized by calling build_from_clusterbasis_clusteroperator for the row basis. |
| cw | Total column weights, can be initialized by build_from_clusterbasis_clusteroperator for the column basis. |
| void truncate_clusterbasis | ( | pcclusterbasis | cb, |
| pcclusteroperator | cw, | ||
| pcclusteroperator | clw, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusterbasis | cbnew, | ||
| pclusteroperator | old2new | ||
| ) |
Compute a truncated cluster basis.
Reduces the rank of a cluster basis by computing singular value decompositions and choosing the most important left singular vectors to construct a new basis. Both total and local weights can be taken into account, and the local weights will be accumulated on the fly, making a call to accumulate_clusteroperator unnecessary.
| cb | Original cluster basis. |
| cw | Total weights, ignored if null pointer. |
| clw | Local weights, will be accumulated, but not overwritten during the course of the algorithm, ignored if null pointer. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| cbnew | New cluster basis, can be initialized with clonestructure_clusterbasis. |
| old2new | Cluster operator describing the change of basis from cb to cbnew. |
| void truncate_inplace_clusterbasis | ( | pclusterbasis | cb, |
| pclusteroperator | cw, | ||
| pctruncmode | tm, | ||
| real | eps | ||
| ) |
Replace a cluster basis with a truncated basis.
This function is similar to truncate_clusterbasis, but replaces the old cluster basis by the new one.
| cb | Old clusterbasis, will be overwritten by truncated cluster basis. |
| cw | Cluster weights. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| void trunccolbasis_h2matrix | ( | ph2matrix | G, |
| bool | rbortho, | ||
| bool | cbortho, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusterbasis | cbnew, | ||
| pclusteroperator | old2new | ||
| ) |
Construct an improved column basis for an
-matrix.
| G | Original matrix . |
| rbortho | Set if the original row basis is orthogonal, this allows the algorithm to avoid computing row weights. |
| cbortho | Set if the original column basis is orthogonal, this allows the algorithm to avoid computing column weights. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| cbnew | New cluster basis, can be initialized with clonestructure_clusterbasis. |
| old2new | Cluster operator describing the change of basis from G->cb to cbnew. |
| void truncrowbasis_h2matrix | ( | ph2matrix | G, |
| bool | rbortho, | ||
| bool | cbortho, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusterbasis | rbnew, | ||
| pclusteroperator | old2new | ||
| ) |
Construct an improved row basis for an
-matrix.
| G | Original matrix . |
| rbortho | Set if the original row basis is orthogonal, this allows the algorithm to avoid computing row weights. |
| cbortho | Set if the original column basis is orthogonal, this allows the algorithm to avoid computing column weights. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| rbnew | New cluster basis, can be initialized with clonestructure_clusterbasis. |
| old2new | Cluster operator describing the change of basis from G->rb to cbnew. |
| pclusterbasis unify_clusterbasis | ( | pccluster | t, |
| ptruncblock | tb, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusteroperator* | cw | ||
| ) |
Construct a unified cluster basis.
Constructs a cluster basis that can approximate multiple
-matrices simultaneously, e.g., multiple independent sub-
-matrices that have to be merged into a large
-matrix.
| t | Root of the corresponding cluster tree. |
| tb | List of truncblock objects describing cluster bases and weights. After the function has completed, the fields old2new will contain the basis change operators. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| cw | If not a null pointer, will be set to point to a new clusteroperator tree containing the total weights for the new basis. This is useful for recursive unification. |
| void unify_h2matrix | ( | ph2matrix | G, |
| pclusteroperator* | rw1, | ||
| pclusteroperator* | cw1, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusteroperator* | rw, | ||
| pclusteroperator* | cw | ||
| ) |
Unify
-submatrices into a large
-matrix.
Takes a block matrix containing
-matrices and approximates it by a global
-matrix.
G is not a proper
-matrix, since the cluster bases of its immediate submatrices are allowed to differ from each other.| G | Block matrix, will be overwritten by a proper -matrix approximation. |
| rw1 | Total row weights for all submatrices, enumerated in column-major ordering, i.e., rw1[i+j*G->rsons] corresponds to the block in row i and column j. |
| cw1 | Total column weights for all submatrices, enumerated in column-major ordering, i.e., rw1[i+j*G->rsons] corresponds to the block in row i and column j. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| rw | If not a null pointer, will be set to point to a new clusteroperator tree containing the total row weights of the new -matrix. |
| cw | If not a null pointer, will be set to point to a new clusteroperator tree containing the total column weights of the new -matrix. |
| void unify_parallel_h2matrix | ( | ph2matrix | G, |
| uint | pardepth, | ||
| pclusteroperator* | rw1, | ||
| pclusteroperator* | cw1, | ||
| pctruncmode | tm, | ||
| real | eps, | ||
| pclusteroperator* | rw, | ||
| pclusteroperator* | cw | ||
| ) |
Unify
-submatrices into a large
-matrix, experimental parallel implementation.
Takes a block matrix containing
-matrices and approximates it by a global
-matrix.
G is not a proper
-matrix, since the cluster bases of its immediate submatrices are allowed to differ from each other.| G | Block matrix, will be overwritten by a proper -matrix approximation. |
| pardepth | Parallization depth. Parallel threads are spawned only on the next pardepth levels of the recursion. |
| rw1 | Total row weights for all submatrices, enumerated in column-major ordering, i.e., rw1[i+j*G->rsons] corresponds to the block in row i and column j. |
| cw1 | Total column weights for all submatrices, enumerated in column-major ordering, i.e., rw1[i+j*G->rsons] corresponds to the block in row i and column j. |
| tm | Truncation mode. |
| eps | Truncation accuracy. |
| rw | If not a null pointer, will be set to point to a new clusteroperator tree containing the total row weights of the new -matrix. |
| cw | If not a null pointer, will be set to point to a new clusteroperator tree containing the total column weights of the new -matrix. |
1.8.11