Skip to content

Commit

Permalink
Taking active residuals only shouldn't affect the calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ahurta92 committed Jul 1, 2024
1 parent 0cec8a1 commit f7c75dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/apps/molresponse/FrequencyResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ void FrequencyResponse::iterate(World &world) {
if (r_params.print_level() >= 1) { molresponse::start_timer(world); }
x_residual = copy(new_res.residual_norms);
iter_function_data["x_residuals"] = x_residual;
residuals = new_res.residual.copy();
if (r_params.print_level() >= 1) {
molresponse::end_timer(world, "copy_response_data", "copy_response_data", iter_timing);
}
Expand Down
3 changes: 1 addition & 2 deletions src/apps/molresponse/ResponseBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,7 @@ auto ResponseBase::update_residual(World &world, const X_space &chi, const X_spa
bool compute_y = r_params.omega() != 0.0;
// compute residual
Tensor<double> residual_norms = copy(old_residuals);
X_space res = xres_old.copy();
res.set_active(chi.active);
X_space res(world, m, n);
if (compute_y) {
res = chi - g_chi;
auto rx = to_response_matrix(res);
Expand Down

0 comments on commit f7c75dc

Please sign in to comment.