Skip to content

Commit

Permalink
Some truncation statments for Chi and PQ before assembling alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
ahurta92 committed Oct 24, 2023
1 parent d313f34 commit eb2706f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/apps/molresponse/FrequencyResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void FrequencyResponse::iterate(World &world) {
max_rotation = .01;
}
PQ = generator(world, *this);
PQ.truncate();

vector<bool> converged(Chi.num_states(), false);
Chi.reset_active();
Expand Down Expand Up @@ -221,6 +222,8 @@ void FrequencyResponse::iterate(World &world) {

auto dnorm = norm2s_T(world, rho_omega);
iter_function_data["d"] = dnorm;

Chi.truncate();
polar = ((compute_y) ? -2 : -4) * response_context.inner(Chi, PQ);
res_polar = ((compute_y) ? -2 : -4) * response_context.inner(new_res.residual, PQ);
inner_to_json(world, "alpha", polar, iter_function_data);
Expand Down

0 comments on commit eb2706f

Please sign in to comment.