32 public Step<EigenproblemEnvironment<double>> {
36 size_t maximum_subspace_dimension;
49 SubspaceUpdate(
const size_t maximum_subspace_dimension = 15,
const double threshold = 1.0e-03) :
50 maximum_subspace_dimension {maximum_subspace_dimension},
51 threshold {threshold} {}
62 return "Add projected correction vectors to the subspace (if their norm is large enough) and collapse the subspace becomes too large. The new subspace vectors (after a collapse) are linear combinations of current subspace vectors, with coefficients found in the lowest eigenvectors of the subspace matrix.";
73 auto& V = environment.
V;
74 const auto& Delta = environment.
Delta;
77 const auto current_subspace_dimension = V.cols();
78 if (current_subspace_dimension + Delta.cols() > this->maximum_subspace_dimension) {
84 for (
size_t column_index = 0; column_index < Delta.cols(); column_index++) {
85 VectorX<double> v = Delta.col(column_index) - V * (V.transpose() * Delta.col(column_index));
86 const double norm = v.norm();
89 if (norm > this->threshold) {
90 V.conservativeResize(Eigen::NoChange, V.cols() + 1);
91 V.col(V.cols() - 1) = v;
Definition: EigenproblemEnvironment.hpp:35
MatrixX< Scalar > X
Definition: EigenproblemEnvironment.hpp:79
MatrixX< Scalar > V
Definition: EigenproblemEnvironment.hpp:73
MatrixX< Scalar > Delta
Definition: EigenproblemEnvironment.hpp:86
Definition: Matrix.hpp:47
Definition: SubspaceUpdate.hpp:32
std::string description() const override
Definition: SubspaceUpdate.hpp:61
void execute(EigenproblemEnvironment< double > &environment) override
Definition: SubspaceUpdate.hpp:71
SubspaceUpdate(const size_t maximum_subspace_dimension=15, const double threshold=1.0e-03)
Definition: SubspaceUpdate.hpp:49
Definition: BaseOneElectronIntegralBuffer.hpp:25