iterative-solver 0.0
 
Loading...
Searching...
No Matches
molpro::linalg::itsolv::detail Namespace Reference

Namespaces

namespace  dspace
 

Classes

class  DSpaceResetter
 Resets D space constructing full solutions as the new working set, removing instabilities from Q space, and clearing D space. More...
 
struct  eigenvalue_order
 Orders eigenvalues by non-descending real part, then by imaginary part. More...
 
class  MetricChecker
 Checks that the metric of a generalised problem has the properties that its kind declares, as far as the subspace shows them. More...
 
struct  MetricSolutions
 The actions of a metric applied on the fly on solutions, in R vectors or, if there are not enough of them, Q vectors. More...
 
struct  orthogonalised_subspace
 A generalised eigenproblem reduced to a standard one by symmetric orthogonalisation of the metric. More...
 
class  ScopedFpeSuspend
 

Functions

template<typename value_type >
int eigensolver_hermitian_kernel (std::false_type, std::span< value_type > a, std::span< real_type_t< value_type > > w, size_t dimension)
 Eigen implementation of the hermitian eigenproblem, used for every scalar type LAPACK does not cover.
 
template<typename value_type >
int eigensolver_hermitian_lowest_kernel (std::false_type, std::span< value_type > a, std::span< value_type > z, std::span< real_type_t< value_type > > w, size_t dimension, size_t nroots)
 The lowest nroots eigenpairs of a hermitian matrix: without a partial kernel, the whole decomposition, truncated.
 
template<typename value_type >
std::list< SVD< value_type > > svd_system_impl (size_t nrows, size_t ncols, const array::Span< value_type > &m, real_type_t< value_type > threshold, bool hermitian, bool reduce_to_rank)
 Implementation of svd_system(), shared by its real and complex overloads.
 
template<typename value_type >
orthogonalised_subspace< value_type > orthogonalise_subspace (const std::vector< value_type > &matrix, const std::vector< value_type > &metric, size_t dimension, real_type_t< value_type > svdThreshold, int verbosity)
 Reduce H C = S C E to the standard eigenproblem Hbar U = U E, whose solution is C = X U.
 
template<typename value_type , typename matrix_type , typename vector_type >
bool hermitian_lowest_by_cholesky (const std::vector< value_type > &matrix, const std::vector< value_type > &metric, size_t dimension, size_t nroots, real_type_t< value_type > svdThreshold, matrix_type &eigenvectors, vector_type &eigenvalues)
 The lowest nroots eigenpairs of a hermitian H C = S C E by Cholesky reduction, where that is safe.
 
template<typename value_type >
void solve_LinearEquations_impl (std::vector< value_type > &solution, std::vector< value_type > &eigenvalues, const std::vector< value_type > &matrix, const std::vector< value_type > &metric, const std::vector< value_type > &rhs, const size_t dimension, size_t nroot, real_type_t< value_type > augmented_hessian, real_type_t< value_type > svdThreshold, int verbosity)
 Implementation of solve_LinearEquations(), shared by its real and complex overloads.
 
template<typename value_type >
void solve_DIIS_impl (std::vector< value_type > &solution, const std::vector< value_type > &matrix, const size_t dimension, real_type_t< value_type > svdThreshold, int verbosity)
 Implementation of solve_DIIS(), shared by its real and complex overloads.
 
template<typename value_type , typename value_type_abs >
auto redundant_parameters (const subspace::Matrix< value_type > &overlap, const size_t oR, const size_t nR, const value_type_abs svd_thresh, Logger &logger)
 Deduces a set of parameters that are redundant due to linear dependencies.
 
template<class R , class Q , class P , typename value_type >
void resize_qspace (subspace::IXSpace< R, Q, P > &xspace, const subspace::Matrix< value_type > &solutions, std::size_t max_size, Logger &logger)
 Removes Q parameters that have smallest contribution to any solution until Q space size is within limit.
 
template<class R , class Q , class P , typename value_type , typename Index >
void erase_qspace (subspace::IXSpace< R, Q, P > &xspace, subspace::Matrix< value_type > &solutions, std::vector< Index > indices)
 Erases Q parameters with the given indices together with the corresponding columns of a solutions matrix.
 
template<class R , class Q >
auto max_overlap_with_R (const CVecRef< R > &rparams, const CVecRef< Q > &qparams, array::ArrayHandler< R, Q > &handler, Logger &logger)
 Returns list of Q indices with maximum overlap to R parameters, sorted in descending order.
 
std::vector< std::pair< size_t, size_t > > parameter_batches (const size_t nsol, const size_t nparam)
 
template<typename T >
std::vector< std::vector< T > > construct_vectorP (const std::vector< int > &roots, const subspace::Matrix< T > &solutions, const size_t oP, const size_t nP)
 
template<class R , typename T >
void update_errors (std::vector< T > &errors, const CVecRef< R > &residual, array::ArrayHandler< R, R > &handler)
 
template<typename T >
std::vector< int > select_working_set (const size_t nw, const std::vector< T > &errors, const T threshold, const std::vector< T > &value_errors, const T value_threshold)
 
template<class R >
void normalise (VecRef< R > &params, array::ArrayHandler< R, R > &handler, Logger &logger, typename array::ArrayHandler< R, R >::value_type_abs thresh=1/std::numeric_limits< typename array::ArrayHandler< R, R >::value_type_abs >::max())
 
template<class R , class Q , class P , typename Index >
void erase_qspace (subspace::IXSpace< R, Q, P > &xspace, std::vector< Index > indices)
 Erases Q parameters with the given indices, in descending order so that the remaining indices stay valid.
 
template<class R , class Q , class P , typename value_type >
auto append_overlap_with_r (const subspace::Matrix< value_type > &overlap, const CVecRef< R > &params, const CVecRef< P > &pparams, const CVecRef< Q > &qparams, const CVecRef< Q > &dparams, ArrayHandlers< R, Q, P > &handlers, Logger &logger)
 Constructs overlap of the full subspace by appending overlap with new parameters to the overlap of previous subspace.
 
template<class R , class Q , class P , typename value_type >
subspace::Matrix< value_type > contribution_solutions (const subspace::Matrix< value_type > &solutions, const subspace::IXSpace< R, Q, P > &xspace)
 The solutions scaled to unit length, as needed wherever thresholds apply to their coefficients or to norms of their projections (limit_qspace_size(), construct_dspace(), D space resets): with a metric, the solutions are normalised in it, and the thresholds would otherwise depend on the scale of the metric.
 
template<typename value_type >
std::vector< std::size_t > limit_qspace_size (const subspace::Dimensions &dims, const QSpaceOptions &opts, const subspace::Matrix< value_type > &solutions, Logger &logger)
 Ensures that size Q space is within limit by proposing Q parameters for deletion.
 
template<class R , class Q , class P , typename value_type , typename value_type_abs >
auto construct_dspace (const subspace::Matrix< value_type > &solutions, const subspace::IXSpace< R, Q, P > &xspace, const std::vector< std::size_t > &q_delete, const value_type_abs norm_thresh, const value_type_abs svd_thresh, array::ArrayHandler< Q, Q > &handler, Logger &logger)
 Constructs the new D space by projecting the solutions onto Qd+D subspace and ensuring they are well conditioned.
 
template<class R , class Q , class P , typename value_type , typename value_type_abs >
auto project_out_and_orthonormalise (const VecRef< R > &rparams, const subspace::Matrix< value_type > &overlap, const subspace::Matrix< value_type > &rx_overlap, const subspace::Dimensions &dims, const CVecRef< P > &pparams, const CVecRef< Q > &qparams, const CVecRef< Q > &dparams, const value_type_abs norm_thresh, ArrayHandlers< R, Q, P > &handlers, Logger &logger)
 Projects R parameters out of the P+Q+D subspace and orthonormalises them among themselves.
 
template<class R >
auto get_new_working_set (const std::vector< int > &working_set, const CVecRef< R > &params, const CVecRef< R > &wparams)
 Returns new working set based on parameters included in wparams.
 
template<class R , class Q , class P >
auto propose_rspace (IterativeSolver< R, Q, P > &solver, const VecRef< R > &parameters, const VecRef< R > &residuals, subspace::IXSpace< R, Q, P > &xspace, subspace::ISubspaceSolver< R, Q, P > &subspace_solver, ArrayHandlers< R, Q, P > &handlers, Logger &logger, const RSpaceOptions< typename array::ArrayHandler< R, R >::value_type_abs > &r_opts, const QSpaceOptions &q_opts, molpro::profiler::Profiler &profiler)
 Proposes new parameters for the subspace from the preconditioned residuals.
 
template<typename T , typename S , typename = std::enable_if_t<std::is_base_of<molpro::linalg::array::DistrArray, T>::value>>
void precondition_default (const VecRef< T > &action, const std::vector< S > &shift, const T &diagonals, const T *metric_diagonals, const bool regularise)
 
template<class T , typename S >
void precondition_default (const VecRef< T > &action, const std::vector< S > &shift, const T &diagonals, const T *metric_diagonals, const bool regularise, typename T::iterator *=nullptr)
 
template<typename T , typename S , typename = std::enable_if_t<!std::is_base_of<molpro::linalg::array::DistrArray, T>::value>, class = void>
void precondition_default (const VecRef< T > &action, const std::vector< S > &shift, const T &diagonals, const T *metric_diagonals, const bool regularise, typename std::enable_if<!has_iterator< T >::value, void * >::type=nullptr)
 

Function Documentation

◆ append_overlap_with_r()

template<class R , class Q , class P , typename value_type >
auto molpro::linalg::itsolv::detail::append_overlap_with_r ( const subspace::Matrix< value_type > &  overlap,
const CVecRef< R > &  params,
const CVecRef< P > &  pparams,
const CVecRef< Q > &  qparams,
const CVecRef< Q > &  dparams,
ArrayHandlers< R, Q, P > &  handlers,
Logger &  logger 
)

Constructs overlap of the full subspace by appending overlap with new parameters to the overlap of previous subspace.

Parameters
ovoverlap of P+Q+D
paramsnew parameters
pparamsP space parameters
qparamsQ space parameters
dparamsD space parameters
handlersarray handlers
loggerlogger

◆ construct_dspace()

template<class R , class Q , class P , typename value_type , typename value_type_abs >
auto molpro::linalg::itsolv::detail::construct_dspace ( const subspace::Matrix< value_type > &  solutions,
const subspace::IXSpace< R, Q, P > &  xspace,
const std::vector< std::size_t > &  q_delete,
const value_type_abs  norm_thresh,
const value_type_abs  svd_thresh,
array::ArrayHandler< Q, Q > &  handler,
Logger &  logger 
)

Constructs the new D space by projecting the solutions onto Qd+D subspace and ensuring they are well conditioned.

Parameters
xspaceX space container
q_deleteQ parameters marked for deletion
norm_threshnorm threshold for parameters to be considered null
svd_threshsvd threshold for marking the null space
handlerarray handler
loggerlogger
Returns
D space parameters, actions, actions of the metric if the subspace stores them (otherwise empty), and the coefficients of the new D vectors in the deleted Q vectors (columns in the order of q_delete) followed by the old D vectors, one row per D vector

◆ construct_vectorP()

template<typename T >
std::vector< std::vector< T > > molpro::linalg::itsolv::detail::construct_vectorP ( const std::vector< int > &  roots,
const subspace::Matrix< T > &  solutions,
const size_t  oP,
const size_t  nP 
)

◆ contribution_solutions()

template<class R , class Q , class P , typename value_type >
subspace::Matrix< value_type > molpro::linalg::itsolv::detail::contribution_solutions ( const subspace::Matrix< value_type > &  solutions,
const subspace::IXSpace< R, Q, P > &  xspace 
)

The solutions scaled to unit length, as needed wherever thresholds apply to their coefficients or to norms of their projections (limit_qspace_size(), construct_dspace(), D space resets): with a metric, the solutions are normalised in it, and the thresholds would otherwise depend on the scale of the metric.

◆ eigensolver_hermitian_kernel()

template<typename value_type >
int molpro::linalg::itsolv::detail::eigensolver_hermitian_kernel ( std::false_type  ,
std::span< value_type >  a,
std::span< real_type_t< value_type > >  w,
size_t  dimension 
)

Eigen implementation of the hermitian eigenproblem, used for every scalar type LAPACK does not cover.

Parameters
[in,out]aon entry the matrix in column-major order, on exit the eigenvectors as its columns
[out]wthe eigenvalues in ascending order
[in]dimensionlength of one axis of the matrix
Returns
0 on success, 1 if the decomposition did not converge

◆ eigensolver_hermitian_lowest_kernel()

template<typename value_type >
int molpro::linalg::itsolv::detail::eigensolver_hermitian_lowest_kernel ( std::false_type  ,
std::span< value_type >  a,
std::span< value_type >  z,
std::span< real_type_t< value_type > >  w,
size_t  dimension,
size_t  nroots 
)

The lowest nroots eigenpairs of a hermitian matrix: without a partial kernel, the whole decomposition, truncated.

Parameters
[in,out]aon entry the matrix in column-major order; overwritten
[out]zthe eigenvectors as the columns of a column-major dimension x nroots matrix
[out]wthe eigenvalues in ascending order, nroots of them

◆ erase_qspace() [1/2]

template<class R , class Q , class P , typename Index >
void molpro::linalg::itsolv::detail::erase_qspace ( subspace::IXSpace< R, Q, P > &  xspace,
std::vector< Index >  indices 
)

Erases Q parameters with the given indices, in descending order so that the remaining indices stay valid.

◆ erase_qspace() [2/2]

template<class R , class Q , class P , typename value_type , typename Index >
void molpro::linalg::itsolv::detail::erase_qspace ( subspace::IXSpace< R, Q, P > &  xspace,
subspace::Matrix< value_type > &  solutions,
std::vector< Index >  indices 
)

Erases Q parameters with the given indices together with the corresponding columns of a solutions matrix.

◆ get_new_working_set()

template<class R >
auto molpro::linalg::itsolv::detail::get_new_working_set ( const std::vector< int > &  working_set,
const CVecRef< R > &  params,
const CVecRef< R > &  wparams 
)

Returns new working set based on parameters included in wparams.

◆ hermitian_lowest_by_cholesky()

template<typename value_type , typename matrix_type , typename vector_type >
bool molpro::linalg::itsolv::detail::hermitian_lowest_by_cholesky ( const std::vector< value_type > &  matrix,
const std::vector< value_type > &  metric,
size_t  dimension,
size_t  nroots,
real_type_t< value_type >  svdThreshold,
matrix_type &  eigenvectors,
vector_type &  eigenvalues 
)

The lowest nroots eigenpairs of a hermitian H C = S C E by Cholesky reduction, where that is safe.

orthogonalise_subspace() decomposes the whole metric and transforms H with it, then the whole reduced matrix is diagonalized, all to O(dimension^3) work, even though the solvers want only a few roots. When S is comfortably positive definite, symmetric orthogonalisation would keep every one of its directions, so the Cholesky reduction of LAPACK's ?sygvx/?hegvx solves the same problem, computing only the wanted eigenvectors. That holds when the estimated reciprocal condition number of S, which is at most the ratio of its extreme eigenvalues (bounded below by the true one, and estimated to within a modest factor), exceeds the rank threshold with a wide margin; it is also held well above the working precision, so the factorisation stays accurate.

Applies only to the scalar types LAPACK covers, and only when fewer roots than the dimension are wanted, so a caller asking for the whole spectrum keeps the behaviour it had.

Parameters
matrixH, row-major, as subspace::Matrix stores it
metricS, row-major, as subspace::Matrix stores it
Returns
whether eigenvectors (dimension x wanted, S-orthonormal) and eigenvalues (ascending) were computed

◆ limit_qspace_size()

template<typename value_type >
std::vector< std::size_t > molpro::linalg::itsolv::detail::limit_qspace_size ( const subspace::Dimensions &  dims,
const QSpaceOptions &  opts,
const subspace::Matrix< value_type > &  solutions,
Logger &  logger 
)

Ensures that size Q space is within limit by proposing Q parameters for deletion.

Parameters
dimsdimensions of current P+Q+D subspace
max_size_qspacemaximum size of Q space
solutionssolutions matrix
loggerlogger
Returns
q parameters marked for deletions

◆ max_overlap_with_R()

template<class R , class Q >
auto molpro::linalg::itsolv::detail::max_overlap_with_R ( const CVecRef< R > &  rparams,
const CVecRef< Q > &  qparams,
array::ArrayHandler< R, Q > &  handler,
Logger &  logger 
)

Returns list of Q indices with maximum overlap to R parameters, sorted in descending order.

Parameters
rparamsR parameters
qparamsQ parameters to calculate maximum overlap of with R
handlerarray handler
loggerlogger

◆ normalise()

template<class R >
void molpro::linalg::itsolv::detail::normalise ( VecRef< R > &  params,
array::ArrayHandler< R, R > &  handler,
Logger &  logger,
typename array::ArrayHandler< R, R >::value_type_abs  thresh = 1 / std::numeric_limits<typename array::ArrayHandler<R, R>::value_type_abs>::max() 
)

◆ orthogonalise_subspace()

template<typename value_type >
orthogonalised_subspace< value_type > molpro::linalg::itsolv::detail::orthogonalise_subspace ( const std::vector< value_type > &  matrix,
const std::vector< value_type > &  metric,
size_t  dimension,
real_type_t< value_type >  svdThreshold,
int  verbosity 
)

Reduce H C = S C E to the standard eigenproblem Hbar U = U E, whose solution is C = X U.

The metric is hermitian and positive semi-definite, so its eigendecomposition is also its SVD. Directions whose singular value falls below svdThreshold relative to the largest are discarded; that is how a rank-deficient metric is handled, and it is why the reduced problem can be smaller than the subspace.

Parameters
matrixH, row-major, as subspace::Matrix stores it
metricS, row-major, as subspace::Matrix stores it

◆ parameter_batches()

std::vector< std::pair< size_t, size_t > > molpro::linalg::itsolv::detail::parameter_batches ( const size_t  nsol,
const size_t  nparam 
)
inline

◆ precondition_default() [1/3]

template<typename T , typename S , typename = std::enable_if_t<std::is_base_of<molpro::linalg::array::DistrArray, T>::value>>
void molpro::linalg::itsolv::detail::precondition_default ( const VecRef< T > &  action,
const std::vector< S > &  shift,
const T &  diagonals,
const T *  metric_diagonals,
const bool  regularise 
)

◆ precondition_default() [2/3]

template<typename T , typename S , typename = std::enable_if_t<!std::is_base_of<molpro::linalg::array::DistrArray, T>::value>, class = void>
void molpro::linalg::itsolv::detail::precondition_default ( const VecRef< T > &  action,
const std::vector< S > &  shift,
const T &  diagonals,
const T *  metric_diagonals,
const bool  regularise,
typename std::enable_if<!has_iterator< T >::value, void * >::type  = nullptr 
)

◆ precondition_default() [3/3]

template<class T , typename S >
void molpro::linalg::itsolv::detail::precondition_default ( const VecRef< T > &  action,
const std::vector< S > &  shift,
const T &  diagonals,
const T *  metric_diagonals,
const bool  regularise,
typename T::iterator *  = nullptr 
)

◆ project_out_and_orthonormalise()

template<class R , class Q , class P , typename value_type , typename value_type_abs >
auto molpro::linalg::itsolv::detail::project_out_and_orthonormalise ( const VecRef< R > &  rparams,
const subspace::Matrix< value_type > &  overlap,
const subspace::Matrix< value_type > &  rx_overlap,
const subspace::Dimensions &  dims,
const CVecRef< P > &  pparams,
const CVecRef< Q > &  qparams,
const CVecRef< Q > &  dparams,
const value_type_abs  norm_thresh,
ArrayHandlers< R, Q, P > &  handlers,
Logger &  logger 
)

Projects R parameters out of the P+Q+D subspace and orthonormalises them among themselves.

The projection subtracts V S^{-1} V^dagger r in one step, with S the overlap matrix of the P+Q+D vectors V, which therefore need not be orthonormal. The projected parameters are then Gram-Schmidt orthonormalised among themselves. New vectors with norm less than threshold are considered null and are not normalised. Their indices in params are returned.

Parameters
rparamsR space parameters
overlapoverlap of P+Q+D subspace
rx_overlapoverlaps <r_j|x_i> of the R space parameters (rows) with the P+Q+D parameters (columns), as already calculated by append_overlap_with_r()
dimsdimensions of P+Q+D subspace
pparamsP space parameters
qparamsQ space parameters
dparamsD space parameters
handlersarray handlers
norm_threshparameters with norm less than threshold are considered null and won't be orthogonalised against
Returns
indices of null parameters

◆ propose_rspace()

template<class R , class Q , class P >
auto molpro::linalg::itsolv::detail::propose_rspace ( IterativeSolver< R, Q, P > &  solver,
const VecRef< R > &  parameters,
const VecRef< R > &  residuals,
subspace::IXSpace< R, Q, P > &  xspace,
subspace::ISubspaceSolver< R, Q, P > &  subspace_solver,
ArrayHandlers< R, Q, P > &  handlers,
Logger &  logger,
const RSpaceOptions< typename array::ArrayHandler< R, R >::value_type_abs > &  r_opts,
const QSpaceOptions &  q_opts,
molpro::profiler::Profiler &  profiler 
)

Proposes new parameters for the subspace from the preconditioned residuals.

Outline

  1. If the Q space is larger than allowed, or holds vectors contributing too little to all solutions (see QSpaceOptions), the Q vectors with the smallest contributions are removed. Their part of the current solutions is preserved in a new D space: the solutions are projected onto the removed Q vectors and the old D space, and made normalised and linearly independent (construct_dspace()). The subspace problem is then solved again.
  2. The residuals of the working set are normalised.
  3. Residuals that are linearly dependent on P+Q+D or on each other are discarded: for each singular value of the overlap matrix of P+Q+D and the residuals below the threshold, the residual with the largest component in the singular vector is removed (redundant_parameters()).
  4. The remaining residuals are projected out of the span of P+Q+D, using the inverse of its equilibrated overlap matrix since P+Q+D need not be orthonormal, and Gram-Schmidt orthonormalised among themselves (project_out_and_orthonormalise()). Residuals that become null are discarded.
  5. The resulting vectors are copied into parameters, and the working set is reduced to the roots whose residuals were kept.
Parameters
solversolver providing the current working set
parametersoutput new parameters for the subspace
residualspreconditioned residuals, which are modified
xspaceX space container
subspace_solversolver of the subspace problem
handlersarray handlers
loggerlogger
r_optsthresholds for screening the new parameters
q_optsoptions limiting the size of the Q space
profilerprofiler
Returns
new working set

◆ redundant_parameters()

template<typename value_type , typename value_type_abs >
auto molpro::linalg::itsolv::detail::redundant_parameters ( const subspace::Matrix< value_type > &  overlap,
const size_t  oR,
const size_t  nR,
const value_type_abs  svd_thresh,
Logger &  logger 
)

Deduces a set of parameters that are redundant due to linear dependencies.

Only the last nR parameters are considered for removal. Linear dependencies are discovered by performing SVD of the overlap matrix.

Parameters
overlapoverlap matrix of the full subspace
oRoffset to the start of parameter block
nRnumber of parameters to consider for removal
svd_threshsingular value threshold for choosing the null space
loggerlogger
Returns
indices of the last nR parameters that are considered redundant.

◆ resize_qspace()

template<class R , class Q , class P , typename value_type >
void molpro::linalg::itsolv::detail::resize_qspace ( subspace::IXSpace< R, Q, P > &  xspace,
const subspace::Matrix< value_type > &  solutions,
std::size_t  max_size,
Logger &  logger 
)

Removes Q parameters that have smallest contribution to any solution until Q space size is within limit.

Parameters
solutionsthe solutions whose coefficients measure the contributions (see contribution_solutions()), with columns for the current subspace

◆ select_working_set()

template<typename T >
std::vector< int > molpro::linalg::itsolv::detail::select_working_set ( const size_t  nw,
const std::vector< T > &  errors,
const T  threshold,
const std::vector< T > &  value_errors,
const T  value_threshold 
)

◆ solve_DIIS_impl()

template<typename value_type >
void molpro::linalg::itsolv::detail::solve_DIIS_impl ( std::vector< value_type > &  solution,
const std::vector< value_type > &  matrix,
const size_t  dimension,
real_type_t< value_type >  svdThreshold,
int  verbosity 
)

Implementation of solve_DIIS(), shared by its real and complex overloads.

The extrapolation coefficients solve the DIIS equations augmented with the Lagrange multiplier that constrains them to sum to one; the algebra is the same whatever the scalar type.

◆ solve_LinearEquations_impl()

template<typename value_type >
void molpro::linalg::itsolv::detail::solve_LinearEquations_impl ( std::vector< value_type > &  solution,
std::vector< value_type > &  eigenvalues,
const std::vector< value_type > &  matrix,
const std::vector< value_type > &  metric,
const std::vector< value_type > &  rhs,
const size_t  dimension,
size_t  nroot,
real_type_t< value_type >  augmented_hessian,
real_type_t< value_type >  svdThreshold,
int  verbosity 
)

Implementation of solve_LinearEquations(), shared by its real and complex overloads.

Only the augmented-Hessian branch differs between them, and only because Eigen's GeneralizedEigenSolver handles real matrices alone.

◆ svd_system_impl()

template<typename value_type >
std::list< SVD< value_type > > molpro::linalg::itsolv::detail::svd_system_impl ( size_t  nrows,
size_t  ncols,
const array::Span< value_type > &  m,
real_type_t< value_type >  threshold,
bool  hermitian,
bool  reduce_to_rank 
)

Implementation of svd_system(), shared by its real and complex overloads.

The two overloads exist only to give the public declarations distinct signatures; the algorithm is the same for both, and the hermitian branch dispatches to ?syevd/?heevd or to Eigen depending on the scalar type.

◆ update_errors()

template<class R , typename T >
void molpro::linalg::itsolv::detail::update_errors ( std::vector< T > &  errors,
const CVecRef< R > &  residual,
array::ArrayHandler< R, R > &  handler 
)