API Reference

Assembly

H2Matrices.assemble_h2matrix — Function
assemble_h2matrix(K, rowtree, coltree;
    adm=StrongAdmissibilityStd(3),
    order=4,
    global_index=true)

Assemble an H²-matrix approximation of the kernel matrix K using Chebyshev interpolation of the given order for basis construction.

Arguments

  • K : kernel matrix (supports getblock! or K[i,j])
  • rowtree : ClusterTree for row indices
  • coltree : ClusterTree for column indices
  • adm : admissibility condition (default: strong admissibility with η=3)
  • order : Chebyshev interpolation order per dimension (default: 4)
  • global_index : if true, K uses global indexing (default: true)

Returns

An H2Matrix approximating K.

source
assemble_h2matrix(K::AbstractKernelMatrix; order=4, kwargs...)

Convenience method that builds cluster trees automatically from a KernelMatrix.

source
H2Matrices.assemble_h2matrix_adaptive — Function
assemble_h2matrix_adaptive(K, rowtree, coltree;
    rtol=1e-8, maxrank=50, aca_rtol=nothing, threads=false,
    conversion_threads=..., comp=nothing, error_control=:block,
    scale=nothing, atol=0, aca_atol=0, safeguard_rtol=Inf, aca_kwargs...)

Assemble an H²-matrix adaptively: first build an H-matrix using ACA, then convert to H² format with nested bases.

This provides better compression than fixed Chebyshev interpolation because the ranks adapt to the actual kernel smoothness.

Arguments

  • K : kernel matrix
  • rowtree, coltree : cluster trees
  • rtol : relative tolerance for H² basis truncation
  • maxrank : maximum rank per cluster
  • aca_rtol : tolerance for ACA (defaults to rtol / 10); ignored when comp is given
  • strict : reject a basis rank cap that prevents the local tolerance
  • threads : assemble the H-matrix leaves on Threads.nthreads() tasks (HMatrices' threaded assembly). Every leaf is computed independently with its own compressor buffer, so the H-matrix (and therefore the H² result) is identical to the serial build; K must support concurrent getblock! calls. Defaults to false for backward compatibility.
  • conversion_threads : run the H → H² conversion with Julia tasks (deterministic and bitwise independent of the thread count; defaults to true when Julia has several threads and BLAS uses one). This is the threads keyword of compress_hmatrix_to_h2.
  • comp : compressor for the admissible blocks, called as in HMatrices.assemble_hmatrix (default HMatrices.PartialACA(; atol=aca_atol, rtol=aca_rtol))
  • error_control : :block (default) measures every truncation relative to the block or cluster it acts on. :global measures them against one operator scale s (scale, or estimate_operator_scale when nothing): ACA stops at the absolute tolerance aca_rtol*s (no relative criterion) and the bases keep singular values above rtol*s (atol; no relative criterion except safeguard_rtol). Blocks whose norms are far below the operator's are then not resolved to the same relative accuracy as the strongest ones. This changes the approximation; validate accuracy.
  • atol, safeguard_rtol : absolute basis threshold and relative floor of compress_hmatrix_to_h2 (with :global, atol is at least rtol*s)
  • aca_atol : absolute ACA tolerance (Frobenius norm of the last ACA update, as in HMatrices.PartialACA; with :global, at least aca_rtol*s)
  • aca_kwargs... : additional arguments for assemble_hmatrix

The intermediate H-matrix is private, so its blocks are released during the conversion (consume=true), lowering peak construction memory.

source
assemble_h2matrix_adaptive(K::AbstractKernelMatrix; kwargs...)

Convenience method that builds cluster trees automatically.

source

Compression

H2Matrices.compress_hmatrix_to_h2 — Function
compress_hmatrix_to_h2(hmat; rtol=1e-8, atol=0, maxrank=50, strict=false,
                       threads=..., consume=false, safeguard_rtol=Inf)

Convert an assembled HMatrix (from HMatrices.jl) into an H2Matrix with shared nested cluster bases.

The algorithm:

  1. Collect per-block low-rank data (RkMatrix = A * B') from admissible leaves
  2. Build row bases from partner-QR-weighted factors, including inherited interactions at every level, then project through children to build transfers
  3. Build column bases similarly, leaving unused parent bases empty
  4. Mirror the H-matrix block tree as H²-matrix block tree
  5. Compute coupling matrices by projecting RkMatrix data through the nested bases: S = (Vτ' A)(Wσ' B)'

Arguments

  • hmat : an assembled HMatrix from HMatrices.jl
  • rtol : relative truncation tolerance for basis rank
  • atol : absolute (global) truncation threshold, default 0. Each cluster basis keeps the singular values of its partner-weighted active set above max(rtol*σ₁, atol), where σ₁ is that cluster's largest singular value. The weighted active set carries the scale of its blocks, so atol is in the units of the matrix entries' block norms (for example τ * scale with estimate_operator_scale); use rtol=0 for purely absolute control.
  • safeguard_rtol : with atol > 0, never discard singular values above safeguard_rtol*σ₁ (a relative floor that protects clusters if atol is too large); Inf (default) disables it
  • maxrank : maximum allowed rank per cluster
  • global_index : whether matvec inputs and outputs use global DOF ordering
  • strict : throw if the rank cap prevents any requested local SVD tolerance; otherwise warn. Local tolerances are not a global operator error certificate.
  • threads : build row/column bases, independent subtrees and couplings with Julia tasks. Results are bitwise independent of the thread count. Defaults to true when Julia has several threads and BLAS uses one thread.
  • consume : release each H-matrix block as soon as its coupling is formed, during the basis construction (the near-field blocks move into the H² matrix without copying). hmat must not be used afterwards, also when the conversion throws (e.g. a strict rank-cap failure); use consume=false to retry with another maxrank on the same H-matrix.

Ancestor interactions are condensed exactly: only Gram matrices of the active sets determine the bases, so each cluster passes a factor of width at most its size to its children instead of every ancestor block. A truncation that keeps every coefficient direction stores the identity (leaf V = I or an identity embedding), an exact change of coordinates that compact plans exploit. The operator equals the v0.1.3 construction (_reference=true) up to rounding; truncation ranks agree except for rounding-level decisions at the threshold (e.g. exactly rank-deficient active sets with rtol=0).

Returns

An H2Matrix approximating the same kernel.

source
H2Matrices.estimate_operator_scale — Function
estimate_operator_scale(K, rowtree, coltree; global_index=true, samples=32) -> Float64

Root-mean-square row norm ‖K‖_F / √m of the m × n matrix K, estimated from samples rows spread evenly over the row tree's ordering (exact when samples ≥ m). Rows are read with the same getblock! calls that ACA uses, so this costs samples kernel rows. Deterministic.

It is the operator scale of assemble_h2matrix_adaptive(...; error_control=:global). For example, s = estimate_operator_scale(K, rt, ct) can be passed as scale=s there and as coupling_scale=s to H2CompactMatvecPlan, so that all truncations use one absolute scale. If every admissible block of N blocks has a Frobenius error at most τ*s, the total error is at most τ*sqrt(N/m)*‖K‖_F.

source
H2Matrices.recompress! — Function
recompress!(h2; rtol=1e-8, maxrank=50, strict=false)

Recompress an H²-matrix in place, reducing basis ranks while maintaining accuracy within the specified tolerance.

strict=true rejects insufficient rank caps and leaves the original operator unchanged on failure, using a temporary copy. Rebuild matvec plans after success. Tolerances control local truncations, not a certified global error bound.

Uses the weight-based recompression algorithm (Börm):

  1. Compute basis weights (QR factors encoding basis conditioning)
  2. Compute local weights (coupling matrix importance at each cluster)
  3. Accumulate total weights (top-down propagation through transfer matrices)
  4. Truncate bases (bottom-up SVD using total weights)
  5. Project coupling matrices through basis change operators
source
H2Matrices.compress_matrix_to_h2 — Function
compress_matrix_to_h2(A, rowtree, coltree; rtol=1e-8, maxrank=50, adm=StrongAdmissibilityStd(3))

Approximate a dense matrix by an H² matrix on the supplied cluster trees. This is primarily intended for validation and H2Lib-style dense-to-H² parity tests; large production problems should prefer kernel assembly or H-matrix-to-H² conversion.

source

Diagnostics

H2Matrices.storage_bytes — Function
storage_bytes(h; include_bases=true)

Return the estimated number of bytes used by an H2Matrix. By default this includes dense near-field blocks, far-field coupling matrices, and row/column cluster bases.

source
H2Matrices.block_stats — Function
block_stats(h)

Count H² block-tree nodes and leaves, separated into admissible/uniform and dense near-field leaves.

source
H2Matrices.relative_matvec_error — Function
relative_matvec_error(A, B; nsamples=5, rng=Random.GLOBAL_RNG)

Estimate the relative matvec error between two matrix-like operators by applying them to random vectors and returning the maximum relative error.

source
H2Matrices.sampled_frobenius_error — Function
sampled_frobenius_error(A, B; nsamples=1024, rng=Random.GLOBAL_RNG)

Estimate relative Frobenius error by sampling entries uniformly. This avoids forming dense matrices for larger examples.

source

Matrix–Vector Product

H2Matrices.H2MatvecPlan — Type
H2MatvecPlan(h2)

Flatten traversal and reuse scratch storage for forward and exact adjoint products of a stored Float64 H2 operator. Numerical matrices are shared, not copied. Plans are not thread-safe: create one per concurrent worker. Rebuild all plans after mutating or recompressing h2. Global/local ordering follows h2.global_index at construction time.

source
H2Matrices.H2CompactMatvecPlan — Type
H2CompactMatvecPlan(h2; coupling_rtol=nothing, coupling_scale=:block, passthrough=false,
                    coupling_precision=Float64, consume=false)

Compact reusable matvec representation of the stored H2 operator. Saturated cluster bases (rank at least cluster size) are replaced by implicit identity bases; their numerical action is moved to couplings and parent transfers. This is an algebraic representation change with only floating-point rounding, not a tolerance relaxation. Works for nonorthogonal and overcomplete bases.

passthrough=true additionally lets an internal basis node use its children's concatenated coefficients when that stores fewer numbers: its transfer matrices are folded into its couplings and into its own transfer to the parent. This is also exact up to rounding and mainly removes nearly square transfer matrices of weakly compressing upper levels that serve few couplings. It adds no tolerance by itself; combined with coupling_rtol, the folded couplings are larger (rectangular) blocks, so their truncation differs from the truncation without pass-through and must be validated as such.

An optional coupling_rtol additionally enables local SVD coupling truncation, which is an approximation and requires separate application validation. With coupling_scale=:block (default) singular values below coupling_rtol times the coupling's own largest singular value are discarded. With coupling_scale=:global the threshold is coupling_rtol times the largest spectral norm over all stored blocks (couplings and near field), so weak blocks are not resolved to a tighter absolute accuracy than strong ones; a positive number s gives the absolute threshold coupling_rtol*s (for example with s from estimate_operator_scale), which skips the spectral norms. A coupling is replaced by factors only when they use less storage than the coupling itself (a coupling without any retained singular value is dropped). coupling_scale other than :block and coupling_precision qualify the truncation and therefore require coupling_rtol.

coupling_precision=Float32 additionally stores the retained singular components below tau/eps(Float32) (tau the truncation threshold) in Float32, either as factors or as a dense remainder, keeping the larger components in Float64. coupling_precision=Float16 adds a third tier: components below tau/eps(Float16) are stored as Float16 factors. Factors are scaled column by column with exact powers of two where needed (always for Float16), so the reduced-precision tiers keep their relative precision for operators of any magnitude; a Float32 dense remainder is used only when its entries are within the Float32 range. Products still use Float64 arithmetic, so the adjoint remains the exact transpose of the stored operator up to Float64 rounding. Rounding a component σ u v' perturbs it by about 2 eps(T) σ, at most about 2 tau in each tier; a coupling's rounding error is the sum over its reduced-precision components, so it can exceed the truncation error (an estimate, not a bound): validate it like any coupling truncation.

consume=true releases the source operator's coupling and near-field blocks while the plan is built (each transformed coupling is in turn released once factorized); h2 is unusable afterwards. The plan is identical to consume=false.

The plan retains numerical data but not the source operator or unused bases. Its adjoint applies the same stored approximation. Use one plan per concurrent worker and do not mutate shared source data while a plan is in use.

source
H2Matrices.H2PacketMatvecPlan — Type
H2PacketMatvecPlan(h2; workers=1, consume=false, keep_factors=true, compact_options...)
H2PacketMatvecPlan(compact_plan; workers=1, keep_factors=true)

Pack interactions into contiguous packets applied by fused long-column kernels. Couplings sharing a row coefficient range form row packets; dense near-field blocks are split at elementary column intervals and stacked into column packets. Packing does not truncate data. Combined with implicit saturated bases, it preserves the source operator up to floating-point rounding. Numeric blocks are retained without the source operator.

Products run three phases of independent tasks (upward pass together with near-field packets, coupling packets, slot reduction plus downward pass) with explicit ownership of every written entry, so no private reduction buffers are needed. workers>1 applies tasks with dynamic, cost-ordered scheduling; every task has a fixed evaluation order, so products are deterministic and bitwise independent of the worker count. Use BLAS threads=1 when enabling packet workers.

mul!(Y, plan, X) and mul!(Y, adjoint(plan), X) with matrices apply several right-hand sides while streaming the stored operator once.

From an H2 matrix, compact_options (passthrough, coupling_rtol, coupling_scale, coupling_precision) are passed to H2CompactMatvecPlan, whose stored operator the packets then hold. Couplings factorized by coupling_rtol keep their factors (S = L*R'): L joins the packet matrix and R' is applied per segment, so the packets store exactly the compact plan's numbers; keep_factors=false re-materializes L*R' instead. Float32 and Float16 parts of mixed-precision couplings form further packet parts that keep their storage precision and are applied in Float64 arithmetic, so the adjoint stays the exact transpose of the stored operator. Pass-through basis nodes copy coefficients in the upward and downward passes.

The plan type is H2PacketMatvecPlan{C}, parametric in its coupling-packet type C; H2MixedPacketMatvecPlan runs its mixed-precision packets on the same engine.

One plan is not safe for concurrent calls; copy(plan) shares numerical data and allocates independent scratch for an additional caller. Source data must remain unchanged while plans are used.

consume=true (H2 input only) releases the source operator's coupling and near-field blocks as they are transformed and packed (a near-field block once its last column interval is packed; with coupling_rtol, each transformed coupling once factorized), bounding peak construction memory by roughly one operator plus one packet. The source h2 is unusable afterwards (its leaves hold no numerical blocks); the plan is bitwise identical to consume=false.

source
H2Matrices.H2MixedPacketMatvecPlan — Type
H2MixedPacketMatvecPlan(compact_plan; workers=1, precision_rtol=1e-13, format48=false)
H2MixedPacketMatvecPlan(h2; workers=1, precision_rtol=1e-13, format48=false, consume=false,
                        compact_options...)

Packet plan with adaptive mixed-precision storage. Coupling packets hold all couplings of one row node and the near field is stored in Float64 column packets, exactly as in H2PacketMatvecPlan, whose task engine runs the products: the same phases and write ownership, so products are deterministic and bitwise independent of the worker count, mul!(Y, plan, X) with matrices applies several right-hand sides while streaming the stored operator once, and copy(plan) shares the numerical data and gives private scratch. Use BLAS threads=1 with workers>1.

Each coupling packet P (k × N) is rotated to its left singular basis, P = Q W. Row i of W then has norm ω_i = σ_i(P). Trailing rows with small weight are stored in Float32 and the leading rows in Float64, each row block column-major and read by the fused kernels of H2PacketMatvecPlan, which widen reduced-precision entries on load. Every product accumulates in Float64; Float32 values are only widened, never used as accumulators. Rotations of explicit (unsaturated) row bases are absorbed into copies of the transfers and leaf bases, so they cost no storage. For implicit (saturated) or physical rows, and for pass-through nodes and their children (whose coefficients are copied between parent and children without a transfer), Q is stored as the r Householder reflectors spanning the rows above the lowest-precision block (about 8r(k - r/2) bytes). That cost enters the selection. The rounding cost depends only on these subspaces, not on the basis chosen inside them.

With format48=true, rows of intermediate weight can also use a 48-bit format: a Float64 rounded to 36 mantissa bits (unit roundoff u₄₈ = 2⁻³⁷), stored as a UInt32 plane plus a UInt16 plane. This lowers storage further, but its decode costs time, so products are usually slower than with Float32/Float64 rows only.

A global Lagrangian allocation picks the rows. It minimizes stored bytes subject to the a priori bound

‖Ã - A‖₂ ≤ ‖Ã - A‖_F ≤ (Σ_t β_t² [Σ_{i∈f32(t)} (u₃₂² ω_i² + N_t 2⁻³⁰⁰) + Σ_{i∈f48(t)} u₄₈² ω_i²])^{1/2} ≤ precision_rtol · η.

Here A is the Float64 compact operator and à the stored mixed operator with the rotations applied in exact arithmetic, and u₃₂ = 2⁻²⁴. β_t is the product of the row- and column-basis 2-norms (1 for orthonormal, implicit or physical bases). η = (Σ ‖stored block‖_F²)^{1/2} over all coupling and near-field blocks; it equals ‖A‖_F only for orthonormal bases (otherwise precision_rtol is relative to η, not to ‖A‖_F). The bound is additive over packets because packets cover disjoint matrix blocks; the 2⁻³⁰⁰ terms cover Float32 underflow. It covers the reduced-precision rounding only: the Float64 rotations themselves (fl(QᵀP), fl(UᵀE), fl(VU)) add roundoff of order ε₆₄ · κ · ‖P‖ that the bound does not include. For orthonormal bases that is about 1e-16 relative and immaterial for precision_rtol ≥ 1e-14; with ill-conditioned non-orthonormal bases the measured perturbation can exceed the reported bound while staying at Float64 roundoff level relative to ‖A‖. For Gaussian inputs the bound limits the root-mean-square relative perturbation of products: E‖(Ã-A)x‖² / E‖Ax‖² ≤ precision_rtol²; it is not a per-vector guarantee. A packet is eligible for Float32 (48-bit) rows only if its Frobenius norm is below floatmax(Float32)/2 (floatmax(Float64)/4), so reduced-precision rows cannot overflow; an operator whose η is not finite is stored entirely in Float64 (and Float64 subnormal entries, below about 2e-308, are not covered by the 48-bit relative rounding bound). precision_rtol=0 keeps everything in Float64; its products are then bitwise identical to H2PacketMatvecPlan. Near-field blocks always stay in Float64 (their spectra are flat, so rotating them saves almost nothing).

Forward and adjoint products apply the same stored values, so adjoint(plan) is the exact transpose of the stored mixed operator. Construction is bitwise deterministic for any number of Julia threads. consume=true (H2 input only) releases the source operator's blocks while the packets are built, as in H2PacketMatvecPlan; the source h2 is unusable afterwards.

From an H2 matrix, compact_options (passthrough, coupling_rtol, coupling_scale) are passed to H2CompactMatvecPlan, and A is then that compact plan's operator. passthrough=true composes exactly (it only changes the coefficient coordinates). Couplings factorized by coupling_rtol are multiplied out here (L*R'), so coupling truncation does not reduce this plan's storage; H2PacketMatvecPlan keeps such factors. A compact plan with coupling_precision other than Float64 already stores reduced-precision couplings and is rejected (ArgumentError, raised before anything is consumed). precision_summary(plan) reports the selection and both bounds.

source
H2Matrices.precision_summary — Function
precision_summary(plan::H2MixedPacketMatvecPlan)

Selection and error bounds of a mixed-precision plan: rtol and reference_norm (η), the a priori Frobenius bound bound (≤ rtol·η), the exactly computed Frobenius norm of the reduced-precision rounding of the stored rows (storage_perturbation, scaled by basis norms), the numbers of Float32 and 48-bit rows, rotated and absorbed packets, packets excluded from Float32 by the overflow guard, and byte counts.

source
H2Matrices.H2LowRankMatvecPlan — Type
H2LowRankMatvecPlan(h2; rtol=1e-10)

Experimental matvec-only H2 plan with selected coupling matrices replaced by SVD factors when those factors use less numeric storage. This adds a local relative spectral truncation, not a global error certificate. It retains bases and near-field matrices, but not the original operator or discarded couplings. Its adjoint is the exact transpose of the stored approximation. Use a separate plan per concurrent worker; do not mutate shared bases.

source
H2Matrices.multi_workspace_bytes — Function
multi_workspace_bytes(plan, k)
multi_workspace_bytes(plan)

With k: scratch bytes that products of plan with k right-hand sides use (blocks of at most 16 vectors); the workspace is allocated on first use, kept by the plan and reused, and grows to the widest block used. Without k: bytes of the workspace the plan currently keeps. copy(plan) starts without one; release_multi_workspace! frees it.

source
H2Matrices.release_multi_workspace! — Function
release_multi_workspace!(plan) -> bytes

Drop the scratch that products with several right-hand sides keep in plan and return its size in bytes. The next such product allocates a workspace for its own block width, so this also shrinks a workspace that an earlier, wider product enlarged. Numerical data and single-vector scratch are unaffected. Like products, it must not run concurrently with another call on plan.

source
H2Matrices.h2matvec! — Function
h2matvec!(y, h2, x; global_index=false)

Compute y += A * x where A is an H²-matrix. Uses the three-phase algorithm: forward → interaction → backward + nearfield.

Arguments

  • y : output vector (modified in-place)
  • h2 : the H²-matrix
  • x : input vector
  • global_index : if true, x and y are in global indexing
source
H2Matrices.forward_transform! — Function
forward_transform!(coeffs, cb, x)

Compute the forward (upward) transformation:

  • At each leaf: x̂_t = V_t' * x|_t
  • At each non-leaf: x̂_t = Σ_i E_i' * x̂_{t_i} (sum over children)

After this call, coeffs[cb] contains the projected coefficients for every node in the cluster basis tree.

Arguments

  • coeffs : dictionary of coefficient vectors (output)
  • cb : the column cluster basis
  • x : the input vector (in local ordering)
source
H2Matrices.backward_transform! — Function
backward_transform!(y, coeffs, cb)

Compute the backward (downward) transformation:

  • At root: start with accumulated coefficient ŷ_root
  • At each non-leaf: propagate ŷ_{t_i} += E_i * ŷ_t to children
  • At each leaf: y|_t += V_t * ŷ_t

Arguments

  • y : output vector (in local ordering, modified in-place)
  • coeffs : dictionary of coefficient vectors (input)
  • cb : the row cluster basis
source

Solvers

H2Matrices.solve_cg — Function
solve_cg(A, b; tol=1e-6, maxiter=size(A,2), M=nothing, x0=zeros)

Solve A*x = b with preconditioned conjugate gradients. A may be an H2Matrix or any matrix-like object supporting mul!/*. M is an optional left preconditioner supplied either as a matrix or as a function M(r).

source
H2Matrices.solve_gmres — Function
solve_gmres(A, b; tol=1e-6, restart=30, maxiter=size(A,2), M=nothing, x0=zeros)

Solve A*x = b with restarted left-preconditioned GMRES. The preconditioner M, when supplied, is applied to residuals and operator products.

source

Types

H2Matrices.ClusterBasis — Type
mutable struct ClusterBasis{N,T}

Hierarchical cluster basis for H²-matrices. Each node stores either a leaf basis matrix V (for leaf clusters) or a transfer matrix E that maps child basis coefficients to the parent level.

For a leaf cluster t, the basis is represented by V_t ∈ ℝ^{|t| × k}. For a non-leaf cluster t with children t₁, ..., tₘ, the basis satisfies:

V_t = [V_{t₁}; V_{t₂}; ...] * blkdiag(E_{t₁}, E_{t₂}, ...)

where E_{tᵢ} ∈ ℝ^{k_child × k_parent} are the transfer matrices.

Fields

  • cluster::ClusterTree{N,T} : the underlying cluster tree node
  • k::Int : rank (number of basis vectors) at this node
  • V::Matrix{Float64} : leaf basis matrix (only for leaf nodes, size |t| × k)
  • E::Matrix{Float64} : transfer matrix to parent (size kself × kparent)
  • children::Vector{ClusterBasis{N,T}} : child cluster bases
  • parent::ClusterBasis{N,T} : parent cluster basis
source
H2Matrices.H2Matrix — Type
mutable struct H2Matrix{N,T} <: AbstractMatrix{Float64}

An H²-matrix built from a row and column cluster tree with nested cluster bases. The key difference from a standard H-matrix is that admissible (far-field) blocks share cluster bases across the tree, enabling O(N) storage and matrix-vector products.

The matrix has the same block structure as an H-matrix, but:

  • Admissible blocks store only a small coupling matrix S (via UniformBlock)
  • Inadmissible (near-field) blocks store a dense matrix
  • Non-leaf blocks recurse into children

Fields

  • row_basis::ClusterBasis{N,T} : row cluster basis for this block
  • col_basis::ClusterBasis{N,T} : column cluster basis for this block
  • uniform::Union{UniformBlock{N,T}, Nothing} : uniform block for admissible leaves
  • dense::Union{Matrix{Float64}, Nothing} : dense block for inadmissible leaves
  • children::Matrix{H2Matrix{N,T}} : child blocks (rsons × csons)
  • admissible::Bool : whether this block is admissible
  • global_index::Bool : if true, * and mul! permute input/output to global ordering
source
H2Matrices.UniformBlock — Type
struct UniformBlock{N,T}

Represents an admissible (far-field) block in an H²-matrix. The block for cluster pair (τ, σ) is represented as:

A|_{τ×σ} ≈ V_τ * S * W_σ'

where V_τ and W_σ are the row/column cluster bases, and S is the small coupling matrix (size krow × kcol).

Fields

  • row_basis::ClusterBasis{N,T} : row cluster basis
  • col_basis::ClusterBasis{N,T} : column cluster basis
  • S::Matrix{Float64} : coupling matrix (krow × kcol)
source