EigBounds Struct ReferenceΒΆ
|
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
|
Result of real_eig_minmax: real-part extremes + diagnostic. More...
#include <dense_eig.hpp>
Collaboration diagram for pops::EigBounds:Public Member Functions | |
| POPS_HD bool | all_real (Real im_tol=Real(1e-5)) const |
| REAL-SPECTRUM PREDICATE (ADC-276). | |
| POPS_HD bool | has_complex_pair (Real im_tol=Real(1e-5)) const |
Complement of all_real RESTRICTED to converged blocks: true iff the spectrum was computed AND carries a complex conjugate pair beyond im_tol. | |
Public Attributes | |
| Real | lmin |
| smallest real part (or Gershgorin lower bound if !converged) | |
| Real | lmax |
| largest real part (or Gershgorin upper bound if !converged) | |
| Real | max_im |
| largest |Im(lambda)| encountered (0 = real spectrum: hyperbolic). | |
| bool | converged |
| false -> Gershgorin fallback (valid external bound, NOT the spectrum) | |
Detailed Description
Result of real_eig_minmax: real-part extremes + diagnostic.
The consumer (DSL codegen wave_speeds_from_jacobian, ADC-87) receives the WHOLE structure: converged and max_im are part of the safety contract, no overload silently drops them.
Member Function Documentation
◆ all_real()
REAL-SPECTRUM PREDICATE (ADC-276).
True iff the block CONVERGED and the largest imaginary part is within a RELATIVE tolerance of zero: max_im <= im_tol * max(|lmin|, |lmax|, 1). The threshold is RELATIVE to the spectral magnitude, so the verdict is scale-invariant; the floor of 1 keeps a pure rotation / zero matrix (real-part scale 0) from collapsing the threshold to 0. MULTIPLICITY: a near m-fold REAL root is ill-conditioned and acquires a spurious relative |Im| of order eps^(1/m) (see PRECISION in the file header). The default im_tol = 1e-5 covers m up to 3 (the 3x3 priority target) since eps^(1/3) ~ 6e-6; a higher multiplicity or a larger block needs a larger im_tol (~ eps^(1/m), e.g. eps^(1/4) ~ 1.2e-4 for a 4-fold root) or it is reported complex. ASYMMETRY: because the tolerance is relative, a GENUINE complex pair whose |Im| is below im_tol * scale is reported real BY DESIGN (e.g. 1e8 +- i at the default, or any pair below im_tol when |Re| < 1 and the floor pins the threshold to im_tol). For an absolute test, read max_im. NON-CONVERGENCE => false: the Gershgorin fallback sets max_im = 0 by CONVENTION (nothing computed), never read as a real spectrum; a non-finite (NaN) max_im likewise makes this false (so a NaN block is reported has_complex_pair, NOT kUnknown). POPS_HD, no allocation (only std::fabs and comparisons, like the rest of this header).
Here is the caller graph for this function:◆ has_complex_pair()
Complement of all_real RESTRICTED to converged blocks: true iff the spectrum was computed AND carries a complex conjugate pair beyond im_tol.
NON-CONVERGENCE => false (NOT a complex signal: nothing was computed – tell it apart via converged, or via pops::real_spectrum's kUnknown).
Here is the call graph for this function:Member Data Documentation
◆ converged
| bool pops::EigBounds::converged |
false -> Gershgorin fallback (valid external bound, NOT the spectrum)
◆ lmax
| Real pops::EigBounds::lmax |
largest real part (or Gershgorin upper bound if !converged)
◆ lmin
| Real pops::EigBounds::lmin |
smallest real part (or Gershgorin lower bound if !converged)
◆ max_im
| Real pops::EigBounds::max_im |
largest |Im(lambda)| encountered (0 = real spectrum: hyperbolic).
Has this meaning ONLY if converged: under fallback it is 0 by CONVENTION (the spectrum is not computed), certainly not a hyperbolicity signal – read converged first.
The documentation for this struct was generated from the following file:
- include/pops/numerics/linalg/dense_eig.hpp
Generated by