pub struct ProjectionMethod<F: Float + FromPrimitive + Debug + ScalarOperand + AddAssign + SubAssign + MulAssign + DivAssign + Display + LowerExp + Sum + IntegrateFloat> {
pub structure: DAEStructure<F>,
pub project_after_step: bool,
pub consistent_initialization: bool,
pub constraint_tol: F,
}Expand description
Projection method for index reduction and constraint satisfaction
This method combines index reduction with projection-based stabilization to maintain constraint satisfaction during integration.
Fields§
§structure: DAEStructure<F>DAE structure information
project_after_step: boolWhether to project after each step
consistent_initialization: boolWhether to use consistent initialization
constraint_tol: FTolerance for constraint satisfaction
Implementations§
Source§impl<F: Float + FromPrimitive + Debug + ScalarOperand + AddAssign + SubAssign + MulAssign + DivAssign + Display + LowerExp + Sum + IntegrateFloat> ProjectionMethod<F>
impl<F: Float + FromPrimitive + Debug + ScalarOperand + AddAssign + SubAssign + MulAssign + DivAssign + Display + LowerExp + Sum + IntegrateFloat> ProjectionMethod<F>
Sourcepub fn new(structure: DAEStructure<F>) -> Self
pub fn new(structure: DAEStructure<F>) -> Self
Create a new projection method for constraint satisfaction
Sourcepub fn project_solution<GFunc>(
&self,
t: F,
x: &mut Array1<F>,
y: &mut Array1<F>,
g: &GFunc,
) -> IntegrateResult<()>
pub fn project_solution<GFunc>( &self, t: F, x: &mut Array1<F>, y: &mut Array1<F>, g: &GFunc, ) -> IntegrateResult<()>
Project the solution onto the constraint manifold
This ensures that the solution satisfies the constraints exactly.
Sourcepub fn make_consistent<GFunc>(
&self,
t: F,
x: &mut Array1<F>,
y: &mut Array1<F>,
g: &GFunc,
) -> IntegrateResult<()>
pub fn make_consistent<GFunc>( &self, t: F, x: &mut Array1<F>, y: &mut Array1<F>, g: &GFunc, ) -> IntegrateResult<()>
Make the initial conditions consistent with the constraints
This projects the initial state onto the constraint manifold.
Auto Trait Implementations§
impl<F> Freeze for ProjectionMethod<F>where
F: Freeze,
impl<F> RefUnwindSafe for ProjectionMethod<F>where
F: RefUnwindSafe,
impl<F> Send for ProjectionMethod<F>where
F: Send,
impl<F> Sync for ProjectionMethod<F>where
F: Sync,
impl<F> Unpin for ProjectionMethod<F>where
F: Unpin,
impl<F> UnwindSafe for ProjectionMethod<F>where
F: UnwindSafe + RefUnwindSafe,
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