Skip to content

Validation

Rend first checks the CSV, then screens candidate equations during the Rust search and verifies the returned models in Python. Use search_checks to add conditions for candidate acceptance. Use post_search_checks to request additional evidence on the models you receive.

Validation flow. CSV preflight leads to Rust screening, Hall of Fame admission and final validation. Accepted equations enter the Python float64 audit, optional constitutive and FEM checks, and sampled applicability scan before appearing in the report. Final Rust rejections are listed with reasons.

Phase Where / when Can users disable it? Effect
1. Built-in rsr validation Rust, during evolution, Hall of Fame admission and before return No Numerical guards, quick penalties and required final admissibility. Rejects invalid models from the Rust result set.
2. Search-time physics checks Rust, during search / final Rust admission Yes, search_checks Optional sampled strong ellipticity and reference tangent PSD criteria, influencing which models can be returned.
3. Post-search verification Python, after Rust returns Partly, post_search_checks Mandatory float64 audit and sampled applicability scan. Optional constitutive and FEM evidence. Never refits Rust coefficients or deletes reported models.

1. Mandatory built-in Rust checks

The following checks are always enabled during the Rust search and final candidate selection. They operate on the engine's single-precision (f32) numerical representation.

Step Trigger Actual algorithm Consequence
Expression/evaluator guards Candidate evaluation and fitness calculation Rejects invalid instruction types, nonfinite evaluations and numerical errors as appropriate Cannot produce a valid model score
quick_check Cheap search-time physics evaluation Numerical reference-response checks and inexpensive probes: adds a scaled physics penalty, not a universal binary gate Changes search fitness, but does not necessarily discard the individual immediately
intermediate_check Local Hall of Fame admission Reference and representative sampled physics checks Filters promising candidates before promotion
Detailed validate Global Hall of Fame admission Reference response, finite energy and configured sampled loading states, optional physics criteria when enabled Accepts or rejects promotion
Final validate Just before constructing Rust results Reapplies detailed physical acceptance to returned candidates Invalid candidates are excluded. Reasons are collected in DiscoveryResult.rejected_models where available
Reference-energy shift Accepted output serialization Subtracts the reference energy, normalizing the returned model to W(I)=0 Normalization, not rejection merely because original W(I) was nonzero

Required reference-stress screening is different from the optional reference tangent PSD test. Incompressible reference stress is assessed up to its undetermined hydrostatic pressure: zero raw dW/dF is not required. Acceptance thresholds reflect the measured stress variance and f32 numerical precision rather than an unconditional unit-free zero tolerance.

ValidationRanges determines which nonreference loading families are sampled by Rust. Setting a family to None skips its probes and keeps its measurements in the fit. Reference checks remain. For anisotropic and cubic profiles, the detailed and intermediate checks also probe stretches and shears aligned with each declared reference material axis.

from rend import ValidationRanges, DeformationRange

ranges = ValidationRanges(
    uniaxial=DeformationRange(1.0, 2.0),
    biaxial=DeformationRange(1.0, 1.5),
    planar=None,
    shear=DeformationRange(-0.3, 0.3),
)

2. Optional search-time Rust physics checks

Use SearchPhysicsChecks to enable additional physical stability requirements during the Rust search. These checks influence which candidate models can be returned.

from rend import SearchPhysicsChecks, StrongEllipticityCheck

search_checks = SearchPhysicsChecks(
    strong_ellipticity=StrongEllipticityCheck(step=0.04),
    reference_stability=True,
)

The default is search_checks=None (equivalent to SearchPhysicsChecks()): no extra physics checks. Required screening from phase 1 remains enabled.

strong_ellipticity

  • Question: On sampled deformations and rank-one directions, is the Legendre–Hadamard curvature nonnegative within tolerance?
  • Method: D²W(F)[a⊗b, a⊗b], approximated by [W(F+hH) − 2W(F) + W(F−hH)] / h², H = a⊗b.
  • Setting: StrongEllipticityCheck(step=0.04), with permitted range 0.005 ≤ step ≤ 0.15. The step is a finite-difference perturbation, not a deformation interval.
  • Sampling: The rsr quick stage uses a small fixed number of rank-one probes. Detailed validation includes coordinate, oblique and configured material-axis directions on the selected uniaxial/biaxial/planar/shear/volumetric paths. Incompressible rank-one perturbations are projected onto the isochoric tangent constraint.
  • Numerical acceptance: Small negative curvature can be tolerated according to a stress-scaled threshold accounting for f32 roundoff and the perturbation size.
  • A pass means the sampled rank-one curvatures met that tolerance at the tested deformations and directions.
  • Failure impact: Search-time penalty and/or rejection at Rust candidate admission.

reference_stability

  • Question: Is the reference-state constitutive tangent positive semidefinite (within numerical tolerance)?
  • Method: Numerically sampled reference Hessian and a tolerance-aware PSD/Cholesky-style test, at fixed internal step h=0.04. This is not the StrongEllipticityCheck.step parameter.
  • Directions: Six symmetric deformation directions for compressible, five isochoric symmetric directions for incompressible material. The compressible case also has a hydrostatic stiffness guard.
  • Failure impact: Rejects a candidate during detailed rsr admission and at final rsr validation.

3. Post-search verification

These checks run in Python after Rust returns the candidate equations.

from rend import PostSearchChecks, ConstitutiveChecks, FEChecks

post_search_checks = PostSearchChecks(
    constitutive=ConstitutiveChecks(max_states=30),
    fe=FEChecks(kinematic=True, robustness=True, benchmark=False, convergence=False),
)

post_search_checks=None disables only optional constitutive and FE groups. Two checks remain mandatory for every returned model. Their results may be FAILED or UNVERIFIED, but the models still appear in the HTML report.

3a. Mandatory independent Python float64 audit

The audit re-evaluates the printed returned expression via NumPy float64, independently of the Rust f32.

It checks only that W(F) is a real, finite, scalar float64 value on the identity and configured sampled loading paths (including configured material orientations) and that the sampled deformation gradients have positive J. Numerically finite but physically unstable or reference-inconsistent laws can pass this audit. An f64 failure does not remove a returned model.

3b. Optional ConstitutiveChecks

Constructing ConstitutiveChecks() enables all seven switches, but they only execute if supplied through PostSearchChecks(constitutive=...).

Switch Mathematical/numerical test Important interpretation
stress Complex-step first derivative of W vs fourth-order central finite-difference nominal stress Returns UNVERIFIED when the energy function does not support complex-step differentiation.
tangent Central Jacobian of complex-step stress vs Jacobian of finite-difference stress Tests numerical derivative consistency, not external solver DDSDDE
objectivity W(QF) ≈ W(F) under three seeded random left proper rotations Frame indifference, not material isotropy
stress_covariance P(QF) ≈ Q P(F) using numerical stress under two left rotations For incompressibility, hydrostatic pressure is not determined by W
material_symmetry W(FQ) ≈ W(F) under right rotations justified by profile/directions Isotropic profiles use sampled right rotations. Cubic profiles use all 24 proper cube rotations in the supplied lattice basis. Fiber profiles use rotations that preserve the supplied axes as described below.
reference \|W(I)\| and reference stress residual (modulo pressure if incompressible) Does not establish positive tangent stiffness
domain Finite energy and first derivatives at selected states No global coercivity/boundedness claim

Defaults: relative_tolerance=0.02, absolute_tolerance=1e-5, step=2e-4, max_states=18. The comparison uses a normalized error of the form |a-b| / (abs_tol + rel_tol * max(|a|,|b|)) ≤ 1. The state budget is allocated in round-robin order across all enabled loading families, retaining the identity and avoiding bias toward uniaxial/biaxial samples. Material-axis-aligned uniaxial/biaxial/planar/shear states are included for oriented materials.

Anisotropic symmetry rules. With one fiber axis, the verifier samples right rotations about that axis. With multiple directions, it tests proper rotations that preserve every supplied axis up to its sign. For dispersive two-fiber I8 coupling, the first two signs must change together. If no nontrivial symmetry follows from the axes, the result is UNVERIFIED (passed=None). A pass means the energy agreed within tolerance for the tested deformations and rotations. Establishing the material's symmetry experimentally requires measurements in relevant orientations.

3c. Optional finite-element checks (FEChecks)

The internal FE backend uses eight-node total-Lagrangian displacement elements, 2×2×2 quadrature, JAX-derived consistent tangents and a static-condensation-equivalent element-average-J near-incompressible penalty.

Switch Physical/numerical question Probe settings
kinematic (default True) Do incremental nonlinear uniaxial/biaxial/shear boundary-value problems converge? 2 points per axis, 5 increments, deformation cap about ±0.20
robustness (default True) Does a selected load solve under different meshes/increment counts? 4/6 points per axis, 5/10 increments, load cap about ±0.30
benchmark (default False) Does a fully prescribed affine patch reproduce constitutive stress and face reactions? 2 and 3 points per axis, identity/rotations/3D/shear/volume as applicable
convergence (default False) How sensitive are free-DOF energy, reactions and average PK1 to mesh and time-step resolution? (4,10), (6,5), (6,10) with default 5% relative and 1e-5 absolute comparison tolerance

3d. Mandatory sampled applicability scan

This automatic scan runs for each returned model. It tests finite energy, finite numerical stress and tangent, objectivity, stress covariance, rank-one curvature and justified material symmetry where available.

Path Fixed scan window Coordinate
Uniaxial 1e−4 … 1e4 stretch λ
Biaxial (incompressible and compressible) 1e−4 … 1e4 stretch λ with equibiaxial and mixed (λ,1)/(1,λ) probes
Planar 1e−4 … 1e4 stretch λ
Shear −1000 … 1000 signed engineering shear γ
Volumetric (compressible only) 1e−6 … 1e6 volume ratio J (Rust ValidationRanges.volumetric uses principal stretch)

These fixed windows use dimensionless kinematic coordinates. The report compares passing intervals with any original intervals from validation_ranges. Probing starts at the identity and uses 13 base samples per direction (signed logarithmic magnitudes for shear), plus any configured original-range endpoints inside the fixed window, with seven bisection refinements on the first observed failure. Anisotropic/cubic profiles use three principal-axis permutations, six shear directions and available material-axis-aligned paths. Unknown material symmetries remain unassessed rather than incorrectly tested.

The numerical checks prescribe representative deformation gradients. For compressible uniaxial probes the transverse stretches are set to one, and for biaxial probes the thickness stretch is set to one. The fit uses the transverse stretches from the CSV and adds the appropriate free-face stress targets. The representative planar probes use \(F=\operatorname{diag}(\lambda,1,1/\lambda)\) for either compressibility class. Compressible planar measurements follow their recorded thickness stretch. Set planar=None to disable the configurable planar probes while retaining planar observations in the fit. The independent fixed applicability scan keeps its own probe windows. The optional nonlinear FEM checks do not implement a dedicated planar boundary-value problem.

An affine FEM patch prescribes the full deformation. Its volumetric probes use the configured principal stretches, with \(J\) capped to \(0.75\)–\(1.25\). The free-DOF FEM checks instead solve equilibrium under their own boundary conditions.

The intervals summarize passing samples along the representative one-dimensional paths. The report records coverage when the configured bounds lie within the common sampled passing interval. States between samples and other deformation paths remain untested. Compare the original interval and failure bracket in the HTML report.

Reading the results and console

Result Meaning
PASSED / True The check met its acceptance criteria
FAILED / False The check found a violation or numerical failure. See detail or reason.
NOT RUN / None Check disabled or inapplicable
UNVERIFIED / passed=None with reason Numerical verification was unavailable for this check, or the supplied axes give no nontrivial symmetry to test.
rejected_models Candidates rejected by final Rust validation, not every candidate penalized during evolution

The HTML report shows individual post-search check results and any numerical warnings for each equation. The console summarizes independent audit failures and shows input warnings and execution errors. Repeated warning messages appear once.