Skip to main content

Module adjoint_checkpoint

Module adjoint_checkpoint 

Source
Expand description

Adjoint checkpoint wrapper for storing and retrieving forward-pass checkpoint data.

This module provides AdjointCheckpointWrapper, a thread-safe wrapper around the internal AdjointCheckpoint trait object. It is created during the forward pass of a discrete adjoint solve (via OdeWrapper::solve_adjoint_fwd) and consumed during the backward pass (via OdeWrapper::solve_adjoint_bkwd).

The internal AdjointCheckpoint trait erases the concrete matrix, codegen, and solver tag types, allowing the checkpoint to be shared between the forward and backward solvers which may use different ODE solver methods (e.g. BDF forward, ESDIRK backward).

The AdjointCheckpointData<M, CG, Tag> struct stores the concrete CheckpointingPath plus the forward solver metadata (method, linear solver, parameters).

Structsยง

AdjointCheckpointWrapper
Wrapper for an adjoint checkpoint that allows it to be shared across threads and mutated safely.