  An efficient and momentum conserving algorithm for enforcing contact between
solid bodies is proposed. Previous advances in the material point method (MPM)
led to a fast and simple, but potentially momentum violating, strategy for
enforcing contact. This was achieved through a combination of velocity
transfers between background and foreground grids, and a background grid
velocity field update. We propose a modified strategy which ensures
conservation of both linear and angular momentum with a novel use of the affine
particle-in-cell (APIC) method. Two issues common to particle-in-cell based
algorithms for contact are also addressed: material bodies tend to stick at a
gap which is proportional to the grid spacing; and material points tend to
stick together permanently when located within the same grid cell, making
material rebound and friction challenging. We show that the use of APIC,
combined with a grid transfer and momentum update algorithm results in contact
being enforced at essentially zero gap. For the second issue, we propose a
novel iterative scheme which allows particles interacting through the
background grid to naturally separate after contact and enforce friction, while
still satisfying momentum conservation.
