cb-geo / mpm

CB-Geo High-Performance Material Point Method
https://www.cb-geo.com/research/mpm
Other
238 stars 83 forks source link

[Hotfix] Particle on edge error #657

Closed bodhinandach closed 4 years ago

bodhinandach commented 4 years ago

Describe the PR A nudge is implemented inside is_point_in_cell(), shifting the relative coordinate using std::numeric_limit<double>::epsilon(), if a particle is lying exactly on element edge.

Related Issues/PRs Fix #656.

codecov[bot] commented 4 years ago

Codecov Report

Merging #657 into develop will decrease coverage by 0.00%. The diff coverage is 91.67%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #657      +/-   ##
===========================================
- Coverage    96.56%   96.55%   -0.00%     
===========================================
  Files          122      122              
  Lines        25316    25336      +20     
===========================================
+ Hits         24444    24463      +19     
- Misses         872      873       +1     
Impacted Files Coverage Δ
include/cell.tcc 87.46% <81.82%> (-0.04%) :arrow_down:
tests/cell_test.cc 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 cd87a8f...e5c889d. Read the comment docs.

bodhinandach commented 4 years ago

@ezrayst Is this what you want to see:

Without correction (develop): many

With correction (this branch): many_cor

ezrayst commented 4 years ago

@bodhinandach, in the results you show with 3x3 material points, why does the error happen when the last column of the material points hit the edge (not the first column)? I feel that the problem happens if the material all the material points in that element lie on the edge - do you agree with me?