pub struct EnergyMomentumIntegrator { /* private fields */ }Expand description
Energy-momentum conserving integrator for nonlinear elastodynamics
Implementations§
Source§impl EnergyMomentumIntegrator
impl EnergyMomentumIntegrator
Sourcepub fn new(
mass: Array1<f64>,
stiffness: Box<dyn Fn(&ArrayView1<'_, f64>) -> Array1<f64>>,
) -> Self
pub fn new( mass: Array1<f64>, stiffness: Box<dyn Fn(&ArrayView1<'_, f64>) -> Array1<f64>>, ) -> Self
Create a new energy-momentum integrator
Sourcepub fn step(
&self,
u: &ArrayView1<'_, f64>,
v: &ArrayView1<'_, f64>,
dt: f64,
) -> IntegrateResult<(Array1<f64>, Array1<f64>)>
pub fn step( &self, u: &ArrayView1<'_, f64>, v: &ArrayView1<'_, f64>, dt: f64, ) -> IntegrateResult<(Array1<f64>, Array1<f64>)>
Integrate one step with energy-momentum conservation
Auto Trait Implementations§
impl Freeze for EnergyMomentumIntegrator
impl !RefUnwindSafe for EnergyMomentumIntegrator
impl !Send for EnergyMomentumIntegrator
impl !Sync for EnergyMomentumIntegrator
impl Unpin for EnergyMomentumIntegrator
impl !UnwindSafe for EnergyMomentumIntegrator
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