neco-contact 0.1.0

Hertz contact and spatial helpers on uniform 2D fields
Documentation
  • Coverage
  • 41.67%
    5 out of 12 items documented0 out of 9 items with examples
  • Size
  • Source code size: 13.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.45 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 53s Average build duration of successful builds.
  • all releases: 53s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • barineco/neco-crates
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • barineco

neco-contact

日本語

Hertz contact dynamics and small spatial helper routines for uniform 2D fields.

This crate isolates reusable contact and mask logic from larger solver crates so the helpers can be tested independently of any specific PDE update loop. The array storage layer uses neco-array2, and 2D buffers stay on that representation rather than neco-gridfield.

API

Item Description
find_nearest(x, y, tx, ty) Find the grid cell closest to a target point
build_spatial_mask(x, y, hx, hy, width, interior) Build a normalized cosine-taper mask
collect_interior(interior, margin) Collect active cells that are at least margin cells from the border
HertzContact::new(...) Construct a simple Hertz beater model
HertzContact::step(w_surface, dt) Advance one step and return the contact force
HertzContact::energy() Return the current beater kinetic energy
HertzContact::contact_ended() Report whether rebound ended the contact
HertzContact::set_contact_ended(ended) Override the end-of-contact flag

Preconditions

  • build_spatial_mask normalizes nonzero masks to sum to 1.
  • collect_interior only filters by the provided boolean mask and integer margin; geometry inference is a caller-side operation.
  • HertzContact stores beater position and velocity as public state to keep solver checkpoint integration simple.

License

MIT