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

Functions

std::vector< std::size_t > projected_solutions_basis (const subspace::Dimensions &dims, const std::vector< std::size_t > &remove_qspace)
 Returns subspace indices of the vectors u_k that the columns of a projected solutions matrix refer to: the Q vectors moved into Q_{delete}, followed by the current D vectors.
 
template<typename value_type >
auto construct_projected_solution (const subspace::Matrix< value_type > &solutions, const subspace::Dimensions &dims, const std::vector< std::size_t > &remove_qspace, Logger &logger)
 Projects solution from the full subspace on to Q_{delete} and current D space.
 
template<typename value_type >
auto projected_solutions_overlap (const subspace::Matrix< value_type > &solutions_proj, const subspace::Matrix< value_type > &overlap, const std::vector< std::size_t > &basis, const std::vector< std::size_t > &indices)
 Constructs overlaps of projected solutions with subspace vectors.
 
template<typename value_type >
auto projected_solutions_overlap (const subspace::Matrix< value_type > &solutions_proj, const subspace::Matrix< value_type > &overlap, const std::vector< std::size_t > &basis)
 Constructs the overlap matrix of projected solutions among themselves.
 
template<typename value_type >
auto construct_projected_solutions_overlap (const subspace::Matrix< value_type > &solutions_proj, const subspace::Matrix< value_type > &overlap, const subspace::Dimensions &dims, const std::vector< std::size_t > &remove_qspace, Logger &logger)
 Constructs overlap matrix for projected solutions.
 
template<typename value_type , typename value_type_abs >
void remove_null_norm_and_normalise (subspace::Matrix< value_type > &parameters, subspace::Matrix< value_type > &overlap, const value_type_abs norm_thresh, Logger &logger)
 Removes parameters with norm less than threshold and normalises the rest.
 
template<typename value_type , typename value_type_abs >
auto remove_null_projected_solutions (const subspace::Matrix< value_type > &solutions_proj, const subspace::Matrix< value_type > &overlap_proj, const value_type_abs svd_thresh, Logger &logger)
 Transforms to a stable subspace of projected solutions via SVD.
 
template<typename value_type , typename value_type_abs >
auto stable_projected_solutions (const subspace::Matrix< value_type > &solutions, const subspace::Matrix< value_type > &overlap, const subspace::Dimensions &dims, const std::vector< std::size_t > &remove_qspace, const value_type_abs norm_thresh, const value_type_abs svd_thresh, Logger &logger)
 Projects solutions onto Q_{delete} and the current D space, and transforms them to a normalised set without null space.
 
template<typename value_type >
auto construct_full_subspace_overlap (const subspace::Matrix< value_type > &solutions_proj, const subspace::Dimensions &dims, const std::vector< std::size_t > &remove_qspace, const subspace::Matrix< value_type > &overlap, const size_t nR)
 Constructs overlap matrix of P+Q+R+(projected solutions) subspaces, where Q is without removed parameters.
 

Function Documentation

◆ construct_full_subspace_overlap()

template<typename value_type >
auto molpro::linalg::itsolv::detail::dspace::construct_full_subspace_overlap ( const subspace::Matrix< value_type > &  solutions_proj,
const subspace::Dimensions &  dims,
const std::vector< std::size_t > &  remove_qspace,
const subspace::Matrix< value_type > &  overlap,
const size_t  nR 
)

Constructs overlap matrix of P+Q+R+(projected solutions) subspaces, where Q is without removed parameters.

Parameters
solutions_projsolutions matrix with Q deleted + current D space as columns
dimsdimensions of the current subspace
remove_qspaceindices of Q parameters to be removed
overlapoverlap of current subspace P+Q+D+R, including all of the current Q space
nRnumber of new parameters
Returns
overlap matrix for the subspace P+Q+R+(projected solutions), Q without deleted vectors

◆ construct_projected_solution()

template<typename value_type >
auto molpro::linalg::itsolv::detail::dspace::construct_projected_solution ( const subspace::Matrix< value_type > &  solutions,
const subspace::Dimensions &  dims,
const std::vector< std::size_t > &  remove_qspace,
Logger &  logger 
)

Projects solution from the full subspace on to Q_{delete} and current D space.

Parameters
solutionssolution matrix in the full subspace
dimsdimensions for partitioning of subspace
remove_qspaceindices to remove from current Q space and move into Q_{delete}
norm_threshvectors with norm less than this threshold are considered null
Returns
projected solutions, and their overlap matrix

◆ construct_projected_solutions_overlap()

template<typename value_type >
auto molpro::linalg::itsolv::detail::dspace::construct_projected_solutions_overlap ( const subspace::Matrix< value_type > &  solutions_proj,
const subspace::Matrix< value_type > &  overlap,
const subspace::Dimensions &  dims,
const std::vector< std::size_t > &  remove_qspace,
Logger &  logger 
)

Constructs overlap matrix for projected solutions.

Parameters
solutions_projsolutions matrix projected onto Qd+D space
overlapoverlap matrix of the current subspace
dimsdimensions for partitioning of subspace
remove_qspaceindices to remove from current Q space and move into Q_{delete}
loggerlogger
Returns
overlap matrix

◆ projected_solutions_basis()

std::vector< std::size_t > molpro::linalg::itsolv::detail::dspace::projected_solutions_basis ( const subspace::Dimensions &  dims,
const std::vector< std::size_t > &  remove_qspace 
)
inline

Returns subspace indices of the vectors u_k that the columns of a projected solutions matrix refer to: the Q vectors moved into Q_{delete}, followed by the current D vectors.

Parameters
dimsdimensions for partitioning of subspace
remove_qspaceindices to remove from current Q space and move into Q_{delete}

◆ projected_solutions_overlap() [1/2]

template<typename value_type >
auto molpro::linalg::itsolv::detail::dspace::projected_solutions_overlap ( const subspace::Matrix< value_type > &  solutions_proj,
const subspace::Matrix< value_type > &  overlap,
const std::vector< std::size_t > &  basis 
)

Constructs the overlap matrix of projected solutions among themselves.

x_i = \sum_k C_ik u_k <x_i, x_j> = \sum_kl conj(C_ik) C_jl <u_k, u_l>

Parameters
solutions_projprojected solutions C, with columns referring to the subspace vectors basis
overlapoverlap matrix of the current subspace
basissubspace indices of the vectors u_k
Returns
hermitian overlap matrix

◆ projected_solutions_overlap() [2/2]

template<typename value_type >
auto molpro::linalg::itsolv::detail::dspace::projected_solutions_overlap ( const subspace::Matrix< value_type > &  solutions_proj,
const subspace::Matrix< value_type > &  overlap,
const std::vector< std::size_t > &  basis,
const std::vector< std::size_t > &  indices 
)

Constructs overlaps of projected solutions with subspace vectors.

x_i = \sum_k C_ik u_k <x_i, v_m> = \sum_k conj(C_ik) <u_k, v_m>

Parameters
solutions_projprojected solutions C, with columns referring to the subspace vectors basis
overlapoverlap matrix of the current subspace, S(k, l) = <v_k, v_l>
basissubspace indices of the vectors u_k
indicessubspace indices of the vectors v_m
Returns
matrix with projected solutions as rows and the vectors v_m as columns

◆ remove_null_norm_and_normalise()

template<typename value_type , typename value_type_abs >
void molpro::linalg::itsolv::detail::dspace::remove_null_norm_and_normalise ( subspace::Matrix< value_type > &  parameters,
subspace::Matrix< value_type > &  overlap,
const value_type_abs  norm_thresh,
Logger &  logger 
)

Removes parameters with norm less than threshold and normalises the rest.

Parameters
parametersrow major matrix of parameters
overlapoverlap matrix of parameters
norm_threshnorm threhsold
loggerlogger

◆ remove_null_projected_solutions()

template<typename value_type , typename value_type_abs >
auto molpro::linalg::itsolv::detail::dspace::remove_null_projected_solutions ( const subspace::Matrix< value_type > &  solutions_proj,
const subspace::Matrix< value_type > &  overlap_proj,
const value_type_abs  svd_thresh,
Logger &  logger 
)

Transforms to a stable subspace of projected solutions via SVD.

Performs SVD and transforms to right-singular vectors with singular values greater than threshold.

Parameters
solutions_projsolutions projected onto Qd+D space
solutionssolutions in the current subspace
overlap_projoverlap matrix of projected solutions
norm_thresh
logger
Returns
stable subspace of projected solutions

◆ stable_projected_solutions()

template<typename value_type , typename value_type_abs >
auto molpro::linalg::itsolv::detail::dspace::stable_projected_solutions ( const subspace::Matrix< value_type > &  solutions,
const subspace::Matrix< value_type > &  overlap,
const subspace::Dimensions &  dims,
const std::vector< std::size_t > &  remove_qspace,
const value_type_abs  norm_thresh,
const value_type_abs  svd_thresh,
Logger &  logger 
)

Projects solutions onto Q_{delete} and the current D space, and transforms them to a normalised set without null space.

Parameters
solutionssolution matrix in the full subspace
overlapoverlap matrix of the current subspace
dimsdimensions for partitioning of subspace
remove_qspaceindices to remove from current Q space and move into Q_{delete}
norm_threshprojected solutions with norm less than this threshold are considered null
svd_threshsingular value threshold for marking the null space of projected solutions
loggerlogger
Returns
projected solutions as rows, with columns as given by projected_solutions_basis()