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 momenta change #648

Closed thiagordonho closed 4 years ago

thiagordonho commented 4 years ago

Implement a function in the Node class that computes the change in momentum of all the properties in the nodal properties pool, and call this function from the MPMExplicit by iterating over all nodes. The following describe the rationale behind the compute_multimaterial_change_in_momentum() function:

After proper implementation, call this function while iterating over nodes at every computational step in the MPMExplicit class.

    if (interface_)
      mesh_->iterate_over_nodes(std::bind(
          &mpm::NodeBase<Tdim>::compute_multimaterial_change_in_momentum,
          std::placeholders::_1));

This function is only called after the velocities at the nodes are computed but before velocity constraints are applied. Additionally, the computation must only be done if interface_ == true.

This PR is related to the RFC #636 . The calculation of the change in momentum for each node and different material is expected with this PR. This property is essential for the contact algorithm since it represents one of the verifications of the contact between two adjacent materials while also being the main property used to change the momentum accordingly if contact is identified.

codecov[bot] commented 4 years ago

Codecov Report

Merging #648 into develop will increase coverage by 0.00%. The diff coverage is 98.41%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #648   +/-   ##
========================================
  Coverage    96.56%   96.56%           
========================================
  Files          122      122           
  Lines        25200    25247   +47     
========================================
+ Hits         24332    24378   +46     
- Misses         868      869    +1     
Impacted Files Coverage Δ
include/node.h 100.00% <ø> (ø)
include/node_base.h 100.00% <ø> (ø)
include/solvers/mpm_explicit.tcc 64.00% <50.00%> (-0.19%) :arrow_down:
include/mesh.tcc 83.99% <100.00%> (+0.04%) :arrow_up:
include/node.tcc 95.32% <100.00%> (+0.19%) :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 8d14865...0a74d35. Read the comment docs.