|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
#include <cstddef>#include <memory>#include "hpfem/core/types.hpp"#include "hpfem/solvers/linear_solver.hpp"
Go to the source code of this file.
Classes | |
| class | hpfem::solvers::DeviceArnoldi |
Namespaces | |
| namespace | hpfem |
| namespace | hpfem::solvers |
Shift-invert Arnoldi with the Krylov basis on the GPU (HPFEM_ENABLE_CUDA, hpfem_gpu library of API version 4): the basis \( V = [v_0, \dots, v_k] \) stays on the device. One iteration computes \( w = P (A - \sigma B)^{-1} B v_j \) there (cuDSS solve, the library's sparse products, the gauge projection \( P = I - G (G^H B G)^{-1} G^H B \) when a gradient is given), orthogonalises \( w \) against \( v_0, \dots, v_j \) by classical Gram–Schmidt applied twice (a reduction and an update kernel per pass), normalises and stores \( v_{j+1} \); only the \( j + 1 \) Hessenberg entries and \( h_{j+1,j} \) return to the host. Restart vectors and Ritz vectors are linear combinations \( V_m c \) formed on the device. The control flow (Hessenberg eigenproblem, convergence test, restarts) stays in solvers::complex_eigenpairs_near, which uses this class whenever the shifted matrix is factorised by the cuDSS backend and the device memory suffices; HPFEM_GPU_ARNOLDI=0 keeps the basis on the host. See docs/theory/solvers.md.