pub struct ConstrainedIntegrator { /* private fields */ }Expand description
Störmer-Verlet method for constrained systems
Implementations§
Source§impl ConstrainedIntegrator
impl ConstrainedIntegrator
Sourcepub fn new(
constraints: Box<dyn Fn(&ArrayView1<'_, f64>) -> Array1<f64>>,
constraint_jacobian: Box<dyn Fn(&ArrayView1<'_, f64>) -> Array2<f64>>,
dim: usize,
n_constraints: usize,
) -> Self
pub fn new( constraints: Box<dyn Fn(&ArrayView1<'_, f64>) -> Array1<f64>>, constraint_jacobian: Box<dyn Fn(&ArrayView1<'_, f64>) -> Array2<f64>>, dim: usize, n_constraints: usize, ) -> Self
Create a new constrained integrator
Sourcepub fn shake_step(
&self,
q: &ArrayView1<'_, f64>,
p: &ArrayView1<'_, f64>,
dt: f64,
force: &Array1<f64>,
) -> IntegrateResult<(Array1<f64>, Array1<f64>)>
pub fn shake_step( &self, q: &ArrayView1<'_, f64>, p: &ArrayView1<'_, f64>, dt: f64, force: &Array1<f64>, ) -> IntegrateResult<(Array1<f64>, Array1<f64>)>
SHAKE algorithm for position constraints
Auto Trait Implementations§
impl Freeze for ConstrainedIntegrator
impl !RefUnwindSafe for ConstrainedIntegrator
impl !Send for ConstrainedIntegrator
impl !Sync for ConstrainedIntegrator
impl Unpin for ConstrainedIntegrator
impl !UnwindSafe for ConstrainedIntegrator
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