Files
FESADev/include/fesa/solvers/eigen/mkl_feast_eigen_solver.h
T

53 lines
2.5 KiB
C++

#ifndef FESA_SOLVERS_EIGEN_MKL_FEAST_EIGEN_SOLVER_H_
#define FESA_SOLVERS_EIGEN_MKL_FEAST_EIGEN_SOLVER_H_
#include "fesa/solvers/eigen/eigen_solver.h"
namespace fesa {
/// @brief Adapts standard and symmetric-definite sparse pencils to FEAST.
class MklFeastEigenSolver final : public EigenSolver {
public:
/// @brief Computes all validated interval pairs for a requested lowest-mode
/// prefix.
/// @param whitened_operator Symmetric physical-lambda operator after
/// whitening.
/// @param requested_modes Number of lowest modes eventually exposed by the
/// caller.
/// @param zero_operator_scale Positive physical scale used only when A is
/// exactly zero.
/// @return Sorted all-c eigenpairs in physical lambda units or a solver
/// failure.
/// @note The implementation fixes oneMKL local thread count to one during
/// every call.
Result<FeastEigenResult> Solve(const SparseMatrix& whitened_operator,
std::size_t requested_modes,
double zero_operator_scale) const override;
/// @brief Solves the original sparse symmetric definite K/M pencil.
/// @param mass_lower_bound Certified positive lower spectral bound of M,
/// including floating-point assembly uncertainty; never a diagonal estimate.
/// @param classification_scale Positive max |Kii|/Mii in physical units.
/// @note Eigenvectors are mass-normalized. For this API the historical
/// whitened_residuals field contains original-pencil eta_r; no whitening
/// is performed. Intervals/eigenvalues in normalized backend evidence use
/// classification_scale, while eigenvalues are returned in physical units.
Result<FeastEigenResult> SolveGeneralized(const SparseMatrix& stiffness,
const SparseMatrix& mass,
std::size_t requested_modes,
double mass_lower_bound,
double classification_scale) const override;
private:
/// @brief Shares deterministic count/search controls without changing
/// pencils.
Result<FeastEigenResult> SolveImpl(const SparseMatrix& stiffness,
const SparseMatrix* mass,
std::size_t requested_modes,
double physical_scale,
double mass_lower_bound) const;
};
} // namespace fesa
#endif // FESA_SOLVERS_EIGEN_MKL_FEAST_EIGEN_SOLVER_H_