hyperell_regulator.regulator.diagnostics module

Integration budgets and progress records.

Limits are enforced at quadrature checkpoints.

exception IntegrationLimitError(message, record)[source]

Bases: TimeoutError

A time or work limit was exceeded; record gives the interrupted edge.

class IntegrationMonitor(max_edge_seconds=15.0, max_edge_steps=100000, callback=None, progress_interval=1.0, clock=<built-in function perf_counter>)[source]

Bases: object

Record edge diagnostics and enforce optional time and work limits.

callback receives start, progress and end events. A step is one new quadrature node; None disables a limit.

checkpoint(counter=None, amount=1, **state)[source]
edge(name, degree=None, **state)[source]
phase(name, **state)[source]
checkpoint(counter=None, amount=1, **state)[source]

Update the operation count and enforce the edge budget.

phase(name, **state)[source]

Assign the enclosed work to an integration phase.