jaxdem.simulation_status#

Optional checked orchestration for simulation steps.

Functions

checked_steps(state, system, n)

Single-snapshot implementation; checks stay on device.

simulation_status(state, system)

Check particle state, contact history, pending loads, and domain geometry.

Classes

SimulationStatus(*values)

JIT-safe status bits; both failure bits may be present.

StepResult(state, system, steps, status)

Last accepted state, accepted step count, and persistent failure status.

class jaxdem.simulation_status.SimulationStatus(*values)[source]#

Bases: IntFlag

JIT-safe status bits; both failure bits may be present.

SUCCESS = 0#
SEARCH_OVERFLOW = 1#
NONFINITE = 2#
class jaxdem.simulation_status.StepResult(state: State, system: System, steps: jax.Array, status: jax.Array)#

Bases: object

Last accepted state, accepted step count, and persistent failure status.

state: State#
system: System#
steps: jax.Array#
status: jax.Array#
check() → None[source]#

Synchronize and raise if any snapshot failed.

jaxdem.simulation_status.simulation_status(state: State, system: System) → jax.Array[source]#

Check particle state, contact history, pending loads, and domain geometry.

Model parameters can intentionally contain infinity (e.g. disabled plastic relaxation). Their physical validity belongs to setup validation; this function detects nonfinite particle state, not every invalid parameter.

jaxdem.simulation_status.checked_steps(state: State, system: System, n: int) → StepResult[source]#

Single-snapshot implementation; checks stay on device.