API reference¶
The API reference is generated from the source code with Doxygen and is available here:
Modules · Files · Classes · Functions
Overview of the code¶
Ensign's headers provide data structures and operations for dynamical low-rank (DLR) and interpolatory low-rank methods, along with general-purpose numerical utilities. Below is an overview of the code structure.
Fundamental data types¶
generic/storage.hppdefinesmulti_array<T, d>, a contiguous, column-major dense array with number of dimensions determined at compile time. Arrays can reside in host (CPU) or device (GPU) memory, and can reserve extra capacity to allow for fast rank adaptive schemes.lr/lr.hppdefineslr2<T>, the matrix low-rank representation \(f = X S V^T\). The basis matricesXandVand the small coefficient matrixSrepresent a large matrix without storing the fullf.lr2uses the same host/device storage choice asmulti_array.generic/common.hppprovides shared definitions such asIndex(ptrdiff_t) andstloc(the host/device location selector).
Building dynamical low-rank schemes¶
generic/matrix.hppprovides dense matrix and vector operations, matrix-vector products, transposes, SVD, QR, symmetric diagonalization, and an LU solver.Matrix::blas_opsselects CPU or optional GPU execution.lr/coefficients.hppdefinescoeffandintegratefor weighted integrals of basis functions, producing the small coefficient matrices needed in the DLR K, S, and L steps.lr/lr.hppprovides higher-level operations onlr2representations: initialization, weighted orthogonalization, addition, multiplication, truncation, inner products and norms.generic/kernels.hppdeclares the CUDA kernels used for GPU-side elementwise operations and numerical updates. These are low-level building blocks that are available alongside the higher-level matrix and low-rank operations.
Binary tree tensor networks¶
generic/tree.hppdefines the binary-tree tensor structure: internal nodes hold coefficient tensors that connect their two children, while external (leaf) nodes hold basis matrices. Each node also stores its incoming rank and coefficient matrix.generic/tensor.hppsupplies the supporting tensor operations, including matricization, tensorization, and orthogonalization.
Interpolatory low-rank schemes¶
lr/interpolatory.hpp provides DEIM-style sampling and reconstruction
operations for interpolatory low-rank representations. deim_ext selects
sample points, and colloquation_to_lr constructs low-rank factors from
sampled matrix entries.
Other utilities¶
| Header | Purpose |
|---|---|
generic/utility.hpp |
Various utility functions |
generic/fft.hpp |
Batched FFT wrappers; uses FFTW on the CPU and cuFFT when built with CUDA |
generic/timer.hpp |
Wall clock timers and named timers for profiling |
generic/netcdf.hpp |
NetCDF writer for simulation output |