Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning up the redundant line inside the for loop in evalSurfaces() #1438

Merged
merged 2 commits into from
Feb 17, 2023

Conversation

gkogekar
Copy link
Member

Changes proposed in this pull request
The LHS array in evalSurfaces() is set to 1 by default. The line LHS[loc] = 1 inside the for loop is removed, as it is redundant and confusing.

Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

LGTM, although only after checking

m_LHS.assign(m_nv, 1);

... I assume that there never was an intent to change LHS values in this loop? I'm wondering whether setting LHS[loc] = 1.0 on line 302/303 is required at all.

ischoegl
ischoegl previously approved these changes Feb 17, 2023
Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

Approving as the change has no effect on behavior and removes a puzzling indication that there should be a change where there is none.

@speth
Copy link
Member

speth commented Feb 17, 2023

Yes, I agree, the statement LHS[loc] = 1.0; on line 302/303 (right after the loop) could be removed as well.

@gkogekar
Copy link
Member Author

I just removed the other line as well.

@ischoegl ischoegl merged commit 924bdf3 into Cantera:main Feb 17, 2023
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.

3 participants