Collected small changes and fixes#4766
Conversation
|
Change to Thermo::compute_ecouple() restores expected behavior for thermo output for and either: or: This won't affect anyone using the scalar value from these fixes directly. There may be use cases involving a fix with |
|
@jtclemm double imass;
if (atom->rmass)
imass = atom->rmass[i];
else
imass = atom->mass[type];can also be written as a one liner: const double imass = (atom->rmass) ? atom->rmass[i] : atom->mass[type]; |
If you'd rather have me cherry-pick those commits into the branch, just let me know. |
Just merged, took a while for me to get the chance. |
I always assumed ternarys weren't used in LAMMPS. But I guess that's just because I don't really see them. |
It is a matter of individual preference. I like using them for variable initialization. |
Summary
This pull request combines multiple small changes, refactoring, and bug fixes.
Related Issue(s)
N/A
Author(s)
Axel Kohlmeyer, Temple U
Licensing
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
Artificial Intelligence (AI) Tools Usage
By submitting this pull request, I confirm that I did NOT use any AI tools to generate
all or parts of the code and modifications in this pull request.
Backward Compatibility
N/A
Implementation Notes
The following individual changes are included:
Post Submission Checklist