Skip to content

Conversation

tmisawa
Copy link
Contributor

@tmisawa tmisawa commented Apr 24, 2025

I fixed a bug where the two-body Green's function was being output even when not explicitly specified,
while trying to compute the three-, four-, and six-body Green's functions.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses the bug where the two-body Green's function was output unexpectedly during the computation of higher-order Green’s functions. Key changes include:

  • Wrapping the file open operation for the two-body Green’s function in a conditional block.
  • Similarly adding a conditional block to close the file pointer only when the condition is met.
  • Removing a commented-out debug print statement.
Comments suppressed due to low confidence (2)

src/expec_cisajscktaltdc.c:157

  • [nitpick] Consider adding an inline comment to explain why the file open operation is conditional on NCisAjtCkuAlvDC to improve code clarity and maintainability.
  if(X->Def.NCisAjtCkuAlvDC>0){

src/expec_cisajscktaltdc.c:217

  • [nitpick] It may be helpful to add a comment here to clarify that the file is only closed when it was opened under the NCisAjtCkuAlvDC condition, ensuring maintainability and clarity about the file handling logic.
  if(X->Def.NCisAjtCkuAlvDC>0){

@k-yoshimi
Copy link
Contributor

@tmisawa
Please modify your codes following the copilot comments.

Comments suppressed due to low confidence (2)

src/expec_cisajscktaltdc.c:157

  • [nitpick] Consider adding an inline comment to explain why the file open operation is conditional on NCisAjtCkuAlvDC to improve code clarity and maintainability.
  if(X->Def.NCisAjtCkuAlvDC>0){

src/expec_cisajscktaltdc.c:217

  • [nitpick] It may be helpful to add a comment here to clarify that the file is only closed when it was opened under the NCisAjtCkuAlvDC condition, ensuring maintainability and clarity about the file handling logic.
  if(X->Def.NCisAjtCkuAlvDC>0){

@tmisawa
Copy link
Contributor Author

tmisawa commented Jun 18, 2025

@k-yoshimi
I have checked the comments by Copilot and added several comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants