chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
GNU Lesser General Public License v2.1
269 stars 59 forks source link

Clean up particle-particle contact force class prior refactoring particle-wall contact force class in DEM #1237

Open acdaigneault opened 1 month ago

acdaigneault commented 1 month ago

Description

The particle-particle contact force class had some redundancies, so I managed to implement functions that are now called. Some cleanup was been done here and there, but most of it is related to the call to the calculation of the contact force for a pair of particle to the proper model. Before this refactoring, each (5) loop over the adjacent pair had the same series of if constexpr (contact_model == ...), now each loop call execute_contact_calculation() according to the contact type as a template.

This clean up was done before applying the same architecture pattern for the particle-wall contact force class.

Testing

Tests are good.

Documentation

Miscellaneous (will be removed when merged)

I would like to have Gabo reviewing it before the merge since he has coded and may continue to code in the class and I want something that he agree on. However, I forbid him to do it during his mini-project hehe.

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

Pull request related list:

blaisb commented 1 week ago

@OGaboriault I think you should take over this PR. @acdaigneault has finished her master now so I'll you finalize it. I will review it over teh weekend.

voferreira commented 1 week ago

Is this ready for a review?

acdaigneault commented 3 days ago

Would be happy to awnser questions related to that PR, don't hesitate to tag me on some comments :)