cb-geo / mpm

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

Feature/contact/compute displacements #649

Closed thiagordonho closed 4 years ago

thiagordonho commented 4 years ago

Implement a function in the Particle class that maps the displacements from the material points to the nodal properties pool. Additionally, implement another function in the Node class to compute the nodal multimaterial displacements and separation vectors. Both of these functions are called from the MPMExplicit solve function within every computation step by iterating over all particles and all nodes, respectively. The following describes the rationale behind the map_multimaterial_displacements_to_nodes() function:

The following describes the rationale behind the compute_multimaterial_separation_vector() function:

This PR is related to the RFC #636 . The calculation of the displacements and separation vectors for each node and material is expected with this PR. The separation vector is essential for the contact algorithm since it is used in a second verification of the contact between two adjacent materials.

thiagordonho commented 4 years ago

So far looks okay for me @thiagordonho. I added my suggestion and have one minor comment: will that be better if we somehow change the naming of displacement_ to something like contact_displacement_ to avoid confusion of nodal variable. I was thinking displacement_ is the integration of velocity_.

I think that is a very good idea! I will change all the related variables. Thank you for that and for the other remarks.

codecov[bot] commented 4 years ago

Codecov Report

Merging #649 into develop will decrease coverage by 0.00%. The diff coverage is 95.89%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #649      +/-   ##
===========================================
- Coverage    96.56%   96.56%   -0.00%     
===========================================
  Files          122      122              
  Lines        25247    25316      +69     
===========================================
+ Hits         24378    24444      +66     
- Misses         869      872       +3     
Impacted Files Coverage Δ
include/node.h 100.00% <ø> (ø)
include/node_base.h 100.00% <ø> (ø)
include/particles/particle.h 100.00% <ø> (ø)
include/particles/particle_base.h 100.00% <ø> (ø)
include/solvers/mpm_explicit.tcc 62.75% <25.00%> (-1.25%) :arrow_down:
include/mesh.tcc 84.06% <100.00%> (+0.07%) :arrow_up:
include/node.tcc 95.67% <100.00%> (+0.34%) :arrow_up:
include/particles/particle.tcc 94.27% <100.00%> (+0.08%) :arrow_up:
tests/interface_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 038bb23...9e61b72. Read the comment docs.