Compiling Progressive Damage Codes by Exploiting Irreversibility

Engineers predict how composite parts fail with progressive damage simulations. These finite element codes do not delete a part the moment a stress limit is crossed. Instead they repeatedly check failure criteria at every element, soften the stiffness of elements that have cracked, let stress flow into intact neighbors, and check again. The resulting inner loop is full of data-dependent branches, early exits, and per-element "already failed, skip" jumps. That kind of tangled, unstructured control flow is exactly what auto-parallelizing compilers refuse to touch. The cost shows up in the physics: a validated drilling model had to shrink its workpiece to 0.4 mm to finish in reasonable time (Bi et al.). A flywheel burst model still runs on standard Newton–Raphson iterations in ANSYS, with no algorithmic acceleration at all (Chen).

This note proposes a way out that uses the physics itself. Damage is irreversible: once an element's matrix has cracked, it never un-cracks. So every "is this failure mode active here?" branch can flip from false to true at most once over a whole simulation. We argue that this one-way property turns apparently unstructured failure logic into a structured, monotone fixed-point computation. A compiler can then parallelize it, prune work in it, and check it against the original, all without the general-case machinery that fails on irreducible control flow. We would build that restructuring, measure what it buys on real damage workloads, and verify that the optimized code predicts the same failure sequence as the original.

Core Claim

Let $d_e^m(t) \in [0, d_{\max}]$ be the damage variable of failure mode $m$ (fiber breakage, matrix cracking, delamination, fiber–matrix shear) at element $e$ after load step $t$. Progressive damage models require

$$ d_e^m(t+1) \ge d_e^m(t), \qquad d_{\max} < 1, $$

where the second condition is the residual-stiffness cap that damage codes already use to keep solvers stable (Li et al.). Under this monotonicity, the degrade-and-shed loop is an ascending iteration on a finite-height lattice. Three things follow.

First, the branches that create multi-entry loops can be replaced by predicated (masked) updates over all elements. This yields a reducible control flow graph, meaning every loop has one entry header.

Second, elements whose modes have saturated can be removed from the active set permanently. This pruning is sound, not heuristic.

Third, the restructured code has the single-entry loop shape that existing relative-verification tools require. That makes it possible to check mechanically that the optimized simulation preserves the failure ordering of the original.

The claim is specific and falsifiable. On progressive damage kernels, monotonicity-aware restructuring should let a data-centric compiler parallelize loops it currently rejects, deliver wall-clock gains beyond a hand-masked OpenMP version, and reproduce the original model's failure-onset and burst loads within its published experimental error.

Why This Is Different From Existing Work

Three pieces of prior work supply the methods, and each stops short of this problem in a documented way. Lifting C Semantics for Dataflow Optimization lifts sequential C into stateful dataflow multigraphs. These are a representation that separates computation, memory movement, and data containers. The lifting resolves indirect accesses such as A[col_idx[i]] and parallelizes all 16 loops of the LULESH unstructured-mesh proxy, where icc and Pluto found none. However, it requires static control structure and excludes recursion and function pointers. It was never applied to stateful failure logic. Differential assertion checking proves that a new program version introduces no assertion failures that an old version lacks, using conjunctive invariants inferred by the HOUDINI algorithm. Its efficient modular mode needs reducible control flow. Smaug shows that branchy code can be turned into predicated, trace-oblivious form inside LLVM. This is the same masking move we use, but it is motivated by cryptographic secrecy, and its dominance-based passes also struggle with irreducible loops.

None of these tools uses domain monotonicity to make the control flow tractable. That is the new ingredient here. On the physics side, AmorFEA accelerates finite element optimization by 500x–1000x by training networks on a potential-energy loss. Path-dependent, non-conservative damage has no such potential, so that route is closed for our setting. We do not compete with AmorFEA on its own tasks. We accelerate the exact solver it cannot replace.

Research Program

Reference code. We will write an open, instrumentable C reference implementation of progressive damage. Commercial solvers cannot be recompiled, so this is a necessary step. The code will have two variants. The first is an implicit, Newton–Raphson, modified-Hashin, four-mode variant following Chen's flywheel model. The second is an explicit Hashin–Puck variant with linear stiffness degradation and cohesive interfaces following the drilling model of Bi et al.. Before any optimization, we will confirm that each variant reproduces its source paper's numbers, because without that check the later comparisons have no physical meaning.

Restructuring pass. The pass works in three steps. It detects monotone state variables, either through user annotation or by checking that every write is a max or a clamped increment. It rewrites the check-degrade-shed region into masked bulk updates plus an outer fixed-point loop. It then maintains a compacted active-element set. The rewritten code is lifted into the dataflow representation, and the existing symbolic-access and reduction machinery handles the stress-redistribution scatter.

Differential check. We compose the reference and optimized programs and assert two things: per-element equality of the boolean mode-activation masks at each load step, and agreement of onset and burst loads within a tolerance. Mask equality is a conjunction of equalities, which is exactly the class of invariant HOUDINI can infer. Floating-point reassociation in the parallel reductions means stress values will not match bit for bit. For that reason the formal check covers control decisions under an abstraction that treats the arithmetic as exact, and stress agreement is measured empirically. We will report where these two levels disagree.

Baselines

Naive reference: the unmodified reference code. The first baseline is the serial reference code compiled with gcc and icc at their highest optimization levels. This is the "do nothing" point and the denominator for every speedup. We expect these compilers to parallelize few or none of the damage loops, as they did on LULESH.

Strongest existing automated method: DaCe lifting on the original code. The second baseline applies the dataflow lifting of Calotoiu et al. directly to the original, branchy damage code. It is the strongest competitor because it is the only tool in this space with demonstrated wins on unstructured meshes. Its reported result is that it parallelized all 16 LULESH loops and outperformed a manually tuned OpenMP version by up to 21%. We will run it on the same inputs, hardware, and thread counts, with the same autotuning budget as our pipeline. Beating it means either parallelizing damage loops it rejects or achieving lower wall-clock time on the loops both systems handle.

Strong manual reference: hand-written OpenMP with explicit masking. The third baseline is an expert-written OpenMP version of the reference code with explicit masking and active-set compaction. This baseline already encodes the monotonicity insight by hand. It is the most important comparison for separating "the insight helps" from "the compiler helps." It gets equal engineering time, which we will cap and report.

Ablations isolating the key ingredient. We run three versions of our pipeline. The first keeps masking but turns off active-set pruning. The second keeps pruning but replaces the monotone fixed-point rewrite with generic node splitting. The third deliberately breaks monotonicity by allowing healing, as a negative control in which the formal check must fail.

Fidelity reference. No runtime numbers for damage solvers were reported on Lacuna: no reported result found on Lacuna for progressive-damage solver wall-clock time. Physical fidelity, however, has published targets. Chen's model predicts burst at 1,950 rad/s against an experimental 2,009.6 rad/s, a 2.97% error. For the 20-layer T800H/2500 rotor it predicts matrix cracking onset at about 6,650 rad/s and burst at about 13,100 rad/s. The drilling model reports about 12.7% burr-factor error and at most 14% thrust-force error. Any optimized code that moves these predictions by more than a small fraction of the published error does not count as an improvement, however fast it runs.

Why not just…?

Why not just flatten the loop into a state-machine dispatcher and hand it to existing tools? Flattening always yields a structured loop, but it hides the iteration domain inside a state variable. Donaldson et al. report that loop flattening "often fails in sophisticated software" for exactly this reason. Differential checking of flattened irreducible code falls back to the non-modular mode, which Lahiri et al. measured at 10–100x slower. The second ablation runs this alternative directly. If flattening plus DaCe matches our wall-clock time and our checking cost, the monotonicity rewrite is unnecessary, and we will say so.

Why not just train a surrogate network? A potential-energy surrogate like AmorFEA is ruled out by its own formulation, because damage is irreversible and history-dependent. A supervised surrogate needs many expensive runs of the very solver we are trying to speed up, and it offers no guarantee that failure ordering is preserved. Our work is complementary: a faster exact solver makes surrogate training data cheaper. We will not claim superiority over surrogates on inference speed.

Why not just write a masked OpenMP kernel by hand? This is the real threat. An expert who knows that damage is monotone can write most of what our pass produces. The hand-masked baseline exists to settle the question. If it matches our speed, the contribution narrows to two things. The first is automation across different damage laws. The second is the mechanical equivalence check, which hand code lacks, and which matters because damage codes are typically validated once against an experiment and then modified without re-validation. We will report porting effort for a new damage law, such as the staged sulfate-attack model of Liu et al., as the deciding measure for this case.

Why not just coarsen the mesh? Coarsening changes the physics. Softening models are mesh-sensitive, and the drilling study shrank geometry rather than mesh because resolution mattered. We will include a coarsened run as a fidelity cautionary point, not as a speed baseline.

Proposed Experiments

The first decisive check is fidelity. Both reference variants, and every optimized build, must reproduce Chen's validation case (about 1,950 rad/s predicted burst) and the drilling errors (about 12.7% burr factor, at most 14% thrust) to within a small fraction of those errors. They must also reproduce the "middle-out" ordering of matrix cracking before outer fiber burst. If any build fails to do so, the speed results for that build do not count.

The second check is coverage. We count damage-kernel loops parallelized by gcc/icc, by DaCe on the original code, and by DaCe after our rewrite, using LULESH as a control to confirm no regression.

The third check is speed. We measure strong scaling and wall-clock time against all baselines on the flywheel at the published 20-layer geometry, and on the drilling model at the published 0.4 mm thickness and then at multiples of it. The practical question is whether a thicker workpiece, which the original study could not afford, becomes tractable. We will also report the 200 MPa prestress sweep, since it delays crack onset past about 7,050 rad/s and so changes how long elements stay in the active set.

The fourth check is verification. We measure time to discharge the mask-equivalence check in modular versus flattened form. We will also confirm that the healing negative control is caught.

The proposal would be clearly wrong in three cases: if pruning gives no gain because damage spreads to most elements early, if flattening matches the rewrite, or if parallel reductions shift onset loads by more than the published experimental error. Each of these is measured directly above.