Expand description
SIMD-accelerated bulk material evaluation using Structure-of-Arrays (SoA) layout.
This module provides batch (N-point) evaluation kernels for the most compute-intensive constitutive relations in OxiPhysics. Data is arranged in SoA format so that LLVM’s auto-vectorizer can emit wide SIMD instructions (SSE2 / AVX2 / NEON) on the inner loops.
§Constitutive kernels
| Function | Model | Description |
|---|---|---|
elastic_stress_batch | Isotropic linear elastic | σ = λ tr(ε) I + 2μ ε |
von_mises_yield_batch | Von Mises plasticity | f = √(3/2 s:s) − σ_y |
neo_hookean_stress_batch | Neo-Hookean hyperelastic | First Piola–Kirchhoff via F |
viscoplastic_rate_batch | Perzyna viscoplasticity | γ̇ = ⟨f/σ_y⟩ⁿ / η |
miner_damage_batch | Miner’s rule fatigue | D += n/N_f per cycle block |
thermal_expansion_stress_batch | Thermo-elastic | σ_th = −3K α ΔT I |
§SoA storage
SoaMaterialPoints stores the full state of N integration points with each
field in its own contiguous Vec<f64> so the batch kernels read and write
aligned slices that the compiler can vectorize.
§Usage
use oxiphysics_materials::simd_paths::{SoaMaterialPoints, elastic_stress_batch};
let n = 8;
let mut pts = SoaMaterialPoints::new(n);
// Set strains: ε_xx = 0.001 for all points
for i in 0..n { pts.strain_xx[i] = 0.001; }
let e = 210e9_f64;
let nu = 0.3;
elastic_stress_batch(&mut pts, e, nu);
// σ_xx should equal E/(1-ν²) * ε_xx for plane stress
assert!(pts.stress_xx[0] > 0.0);Structs§
- Material
Batch Stats - Summary statistics for a batch of material points.
- SoaMaterial
Points - Structure-of-Arrays storage for
nmaterial integration points.
Functions§
- elastic_
stress_ batch - Compute isotropic linear elastic stress for all
nmaterial points. - elastic_
stress_ batch_ x4 - Same as
elastic_stress_batchbut processes 4 points at once with manually unrolled 4-wide scalar arithmetic (auto-vectorizer helper). - lame
- Compute Lamé parameters (λ, μ) from Young’s modulus E and Poisson ratio ν.
- miner_
damage_ batch - Accumulate Miner’s rule fatigue damage for a block of
n_appliedloading cycles. - neo_
hookean_ stress_ batch - Compute the Cauchy stress for a Neo-Hookean hyperelastic material at each point.
- return_
mapping_ batch - Radial return mapping for isotropic J2 plasticity (batch, linear isotropic hardening).
- thermal_
expansion_ stress_ batch - Add the thermal expansion stress increment to existing stress.
- viscoplastic_
rate_ batch - Compute the viscoplastic strain rate for each point (Perzyna model).
- von_
mises_ yield_ batch - Evaluate the Von Mises yield function for each material point.