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

Rod sphere contact #298

Conversation

Rahul-JOON
Copy link
Contributor

This PR attempts to add Rod SPhere contact functionality as per #266.

@Rahul-JOON
Copy link
Contributor Author

Changes in examples/Binder have been repeated from #294 since this formatting has not been done in the update-0.3.2 branch. These changes are done by auto-formatting while committing.

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2023

Codecov Report

Patch coverage is 71.42% of modified lines.

❗ Current head 58d2a0c differs from pull request most recent head 82d4425. Consider uploading reports for the commit 82d4425 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Changed Coverage
elastica/contact_forces.py 63.63%
elastica/contact_utils.py 100.00%

📢 Thoughts on this report? Let us know!.

@Rahul-JOON Rahul-JOON marked this pull request as ready for review September 9, 2023 04:23
@Rahul-JOON Rahul-JOON changed the title Rod sphere contact attempt Rod sphere contact Sep 9, 2023
@Ali-7800 Ali-7800 added enhancement New feature or request prio:medium Priority level: medium labels Sep 14, 2023
@Ali-7800
Copy link
Collaborator

@Rahul-JOON Can you add tests for the RodSphereContact class? Otherwise looks good to me just some minor comments

Copy link
Contributor

@armantekinalp armantekinalp left a comment

Choose a reason for hiding this comment

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

minor comments.

x_sph,
system_two.radius * system_two.director_collection[2, :, 0],
system_one.radius + system_two.radius,
system_one.lengths + system_two.lengths,
Copy link
Contributor

Choose a reason for hiding this comment

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

Length doesn't make much sense of sphere, and it is set as length = 2*radius. Maybe here we replace with following

Suggested change
system_one.lengths + system_two.lengths,
system_one.lengths + 2 * system_two.radius,

Copy link
Contributor

Choose a reason for hiding this comment

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

@Ali-7800 what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree, maybe we should remove it later too cause it only makes sense for cylinders.

system_two.position_collection[..., 0]
- system_two.radius * system_two.director_collection[2, :, 0]
system_two.position[..., 0]
- system_two.radius * system_two.director[2, :, 0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

x_sph,
system_two.radius * system_two.director_collection[2, :, 0],
system_two.radius * system_two.director[2, :, 0],
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

system_one.internal_forces,
system_one.external_forces,
system_two.external_forces,
system_two.external_torques,
system_two.director_collection[:, :, 0],
system_two.director[:, :, 0],
Copy link
Collaborator

Choose a reason for hiding this comment

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

here too

system_two.position_collection,
system_two.director_collection,
system_two.radius[0],
system_two.position,
Copy link
Collaborator

Choose a reason for hiding this comment

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

It was correct before why did you change it?

@Ali-7800 Ali-7800 assigned Ali-7800 and unassigned Ali-7800 Oct 2, 2023
@armantekinalp armantekinalp changed the base branch from update-0.3.2 to 266_Rod_and_Sphere_Contact_temp October 2, 2023 21:22
@armantekinalp armantekinalp merged commit 1f48590 into GazzolaLab:266_Rod_and_Sphere_Contact_temp Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio:medium Priority level: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants