This directory contains a set of sample codes that serve as tests of the H2Opus library and examples for the usage of some of its key functionality. Each sample can be compiled independently and invoked with various command line options documented in the source. The samples include:
- hgemv: generate a covariance matrix in hierarchical form and perform matrix-vector and/or matrix-multiple-vector multiplications (Distributed memory version available).
- horthog: generate orthogonal bases for a matrix, and project matrix data on these bases, with verification and performance reporting (Distributed memory version available).
- hcompress: generate a new set of compressed bases that allow matrix data to be approximated to a desired tolerance with smaller ranks (Distributed memory version available).
- hlru: (global prefix) add a globally low rank matrix XXT and compress the resulting sum (Distributed memory version not available). (local prefix) Add the set of off-diagonal blocks Xli YliT at a level l of a weak admissibility hierarchical matrix to the blocks of a general admissibility hierarchical matrix as set of local low rank updates (Distributed memory version not available).
- hara: generate a hierarchical matrix from samples obtained by applying a linear operator. The sampler can be any black-box routine, including ones that perform a hierarchical matrix-vector multiplication (Distributed memory version not available).
- ns: a complete application that generates a discretization of a fractional diffusion operator in 1D or 2D, computes an approximate inverse using a high-order Newton-Shultz iteration, and uses it as a preconditioner in a Krylov solver.
- fd: another fractional diffusion example showing how to compress the operators (Distributed memory version available). A scalable solver using the PETSc infrastracture is also provided (PETSC_DIR and PETSC_ARCH must be present in environment, needs PETSc configured with H2OPUS support).
- tlr: Tile-Low-Rank symmetric factorizations (Distributed memory version not available).
- eig: compute eigenvalues of a covariance matrix in hierarchical form using the SLEPc infrastructure. (PETSC_DIR, SLEPC_DIR and PETSC_ARCH must be present in environment, needs PETSc configured with H2OPUS support).
- spatialstatistics: solve a linear system using a covariance matrix in hierarchical form using the PETSc infrastructure. (PETSC_DIR and PETSC_ARCH must be present in environment, needs PETSc configured with H2OPUS support).