pub struct ParallelJacobianStrategy {
pub use_parallel: bool,
pub is_sparse: bool,
pub sparsity_pattern: Option<Array2<bool>>,
pub jacobian: Option<Array2<f64>>,
pub num_threads: usize,
}Expand description
Struct to manage parallel Jacobian computation strategy
Fields§
§use_parallel: boolWhether to use parallel computation
is_sparse: boolWhether the Jacobian is sparse
sparsity_pattern: Option<Array2<bool>>Sparsity pattern if known
jacobian: Option<Array2<f64>>Last computed Jacobian
num_threads: usizeNumber of threads to use
Implementations§
Source§impl ParallelJacobianStrategy
impl ParallelJacobianStrategy
Sourcepub fn set_sparsity_pattern(&mut self, pattern: Array2<bool>)
pub fn set_sparsity_pattern(&mut self, pattern: Array2<bool>)
Set the sparsity pattern
Sourcepub fn compute_jacobian<F, Func>(
&mut self,
f: &Func,
t: F,
y: &Array1<F>,
f_current: &Array1<F>,
perturbation_scale: F,
) -> IntegrateResult<Array2<F>>
pub fn compute_jacobian<F, Func>( &mut self, f: &Func, t: F, y: &Array1<F>, f_current: &Array1<F>, perturbation_scale: F, ) -> IntegrateResult<Array2<F>>
Compute the Jacobian matrix
Sourcepub fn is_parallel_available(&self) -> bool
pub fn is_parallel_available(&self) -> bool
Check if parallel computation is available and enabled
Auto Trait Implementations§
impl Freeze for ParallelJacobianStrategy
impl RefUnwindSafe for ParallelJacobianStrategy
impl Send for ParallelJacobianStrategy
impl Sync for ParallelJacobianStrategy
impl Unpin for ParallelJacobianStrategy
impl UnwindSafe for ParallelJacobianStrategy
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
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>
Converts
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>
Converts
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