pub struct PdSensBacksolver { /* private fields */ }Expand description
Adapter from PdFullSpaceSolver to SensBacksolver. Holds
owning clones of the four pieces of the algorithm’s converged
state, plus the 8-block iterate template used to allocate fresh
RHS / LHS vectors.
The PD solver lives behind an Rc<RefCell<…>> because
SensBacksolver::solve is &self but the upstream signature
for PdFullSpaceSolver::solve is &mut self (it caches the
last-solve dependency tags and the augsys-improved flag). The
RefCell is single-thread-only, single-borrow, exactly matching
the call pattern from pounce-sensitivity’s pipeline.
Owning (rather than borrowing) the four handles is what lets a
PdSensBacksolver outlive the on_converged callback frame —
required by the public Solver session API in pounce-algorithm,
which retains the backsolver for repeated parametric_step /
kkt_solve / compute_reduced_hessian calls after the IPM has
returned. The data, cq, and nlp handles are already
Rc<RefCell<…>> cheap-clone handles upstream, so this carries no
allocation overhead.
Implementations§
Source§impl PdSensBacksolver
impl PdSensBacksolver
Sourcepub fn new(
data: &IpoptDataHandle,
cq: &IpoptCqHandle,
nlp: &Rc<RefCell<dyn IpoptNlp>>,
pd: Rc<RefCell<PdFullSpaceSolver>>,
) -> Result<Self, ()>
pub fn new( data: &IpoptDataHandle, cq: &IpoptCqHandle, nlp: &Rc<RefCell<dyn IpoptNlp>>, pd: Rc<RefCell<PdFullSpaceSolver>>, ) -> Result<Self, ()>
Construct from the four handles handed in by the on_converged
callback. Returns Err(()) if data has no curr (i.e. the
algorithm never reached an iterate — should not happen on
SolveSucceeded).
Sourcepub fn block_dims(&self) -> [usize; 8]
pub fn block_dims(&self) -> [usize; 8]
Block dimensions of the compound KKT vector at convergence, in
(x, s, y_c, y_d, z_l, z_u, v_l, v_u) order. Sum equals
SensBacksolver::dim. Useful when a caller needs to compute
the flat offset of a non-x block (e.g. n_x + n_s for the
start of the equality-multiplier y_c block).
Trait Implementations§
Source§impl Clone for PdSensBacksolver
impl Clone for PdSensBacksolver
Source§fn clone(&self) -> PdSensBacksolver
fn clone(&self) -> PdSensBacksolver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl SensBacksolver for PdSensBacksolver
impl SensBacksolver for PdSensBacksolver
Auto Trait Implementations§
impl Freeze for PdSensBacksolver
impl !RefUnwindSafe for PdSensBacksolver
impl !Send for PdSensBacksolver
impl !Sync for PdSensBacksolver
impl Unpin for PdSensBacksolver
impl UnsafeUnpin for PdSensBacksolver
impl !UnwindSafe for PdSensBacksolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more