Struct NrWorkspace
pub struct NrWorkspace {Show 18 fields
pub f_vec: Vec<f64>,
pub jacobian: Vec<f64>,
pub currents: Vec<f64>,
pub derivatives: Vec<f64>,
pub rhs: Vec<f64>,
pub jac_copy: Vec<f64>,
pub b_nl: Vec<f64>,
pub port_group: Vec<(usize, usize)>,
pub dev_currents: Vec<f64>,
pub dev_jacobian: Vec<f64>,
pub full_dev_jac: Vec<f64>,
pub cached_sys_jac: Vec<f64>,
pub cached_currents: Vec<f64>,
pub has_cached_jac: bool,
pub v_trial: Vec<f64>,
pub ls_currents: Vec<f64>,
pub frozen_failures: u8,
pub iters_used: usize,
}Expand description
Pre-allocated workspace for the multi-port NR solver. Eliminates per-sample heap allocations by reusing buffers across calls.
Fields§
§f_vec: Vec<f64>§jacobian: Vec<f64>§currents: Vec<f64>§derivatives: Vec<f64>§rhs: Vec<f64>§jac_copy: Vec<f64>§b_nl: Vec<f64>§port_group: Vec<(usize, usize)>§dev_currents: Vec<f64>§dev_jacobian: Vec<f64>§full_dev_jac: Vec<f64>§cached_sys_jac: Vec<f64>§cached_currents: Vec<f64>§has_cached_jac: bool§v_trial: Vec<f64>§ls_currents: Vec<f64>§frozen_failures: u8§iters_used: usizeActual NR iterations consumed by the most recent solve call.
Written by both multi_port_nr_solve_into and multi_port_nr_solve_grouped_into
so that MultiNlStage::process can deduct from the per-base-sample budget.
Implementations§
§impl NrWorkspace
impl NrWorkspace
pub fn new(n_nl: usize) -> NrWorkspace
pub fn new(n_nl: usize) -> NrWorkspace
Create a workspace sized for n_nl nonlinear ports with independent devices.
pub fn new_grouped(n_nl: usize, max_group_ports: usize) -> NrWorkspace
pub fn new_grouped(n_nl: usize, max_group_ports: usize) -> NrWorkspace
Create a workspace sized for n_nl nonlinear ports with grouped devices.
Trait Implementations§
§impl Clone for NrWorkspace
impl Clone for NrWorkspace
§fn clone(&self) -> NrWorkspace
fn clone(&self) -> NrWorkspace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NrWorkspace
impl RefUnwindSafe for NrWorkspace
impl Send for NrWorkspace
impl Sync for NrWorkspace
impl Unpin for NrWorkspace
impl UnsafeUnpin for NrWorkspace
impl UnwindSafe for NrWorkspace
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
Mutably borrows from an owned value. Read more