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

Bugfix friction #24

Merged
merged 13 commits into from
Nov 9, 2021
Merged

Bugfix friction #24

merged 13 commits into from
Nov 9, 2021

Conversation

armantekinalp
Copy link
Contributor

  • Bug in computing kinetic friction has been fixed.
  • Continuum Snake example changed according to recent paper from our group Zhang et. al. Nature Comm. 2021. Simulation results are compared with the actual snake curvature profile.

armantekinalp and others added 11 commits October 17, 2021 14:41
This commit fixes the bug in kinetic friction module for both Numba and Numpy branch. Rolling (transverse) and axial kinetic friction forces uses the weight of rod elements. Previously weight of the element was not projected correctly in rolling and axial directions. This bug could only been seen in snake simulation, because snake is the only case where both friction directions appear for the same problem.
This commit adds an improvement for force calculations. Friction plane should be the last external forcing class that has to be evaluated. Previously user has to be carefully add friction plane class as a last external forcing class. Now in backhand Elastica sorts forcing classes and pushes the friction class at the end of forcing list.
This commit changes the b-spline implementation in code base. B-spline is used to generate muscle torques on continuum snake and flagella. Previously b-spline was forcing end control points to be zero, but with this commit we remove this constrain. Thus, for flagella we added zero control points to the ends to make sure it gives consistent results.
We moved the function into the Slithering_Snake.ipynb so we can remove
this file from the repository.
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2021

Codecov Report

Merging #24 (e50026e) into master (102aed3) will increase coverage by 0.01%.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   90.56%   90.57%   +0.01%     
==========================================
  Files          58       58              
  Lines        3127     3131       +4     
  Branches      224      227       +3     
==========================================
+ Hits         2832     2836       +4     
  Misses        272      272              
  Partials       23       23              
Impacted Files Coverage Δ
elastica/_elastica_numba/_external_forces.py 95.60% <50.00%> (+0.04%) ⬆️
elastica/_elastica_numba/_interaction.py 100.00% <100.00%> (ø)
elastica/_elastica_numpy/_interaction.py 100.00% <100.00%> (ø)
elastica/utils.py 98.18% <100.00%> (-0.18%) ⬇️
elastica/wrappers/forcing.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 102aed3...e50026e. Read the comment docs.

This commit adds a new unit test for forcing wrapper. Forcing wrapper now needs to sort and push any friction forces to the last for evaluated forces list. New test is testing this functionality.
@armantekinalp armantekinalp merged commit 4c12df7 into master Nov 9, 2021
@armantekinalp armantekinalp deleted the bugfix-friction branch November 9, 2021 04:32
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.

None yet

3 participants