Struct FirstOrderProgram
pub struct FirstOrderProgram { /* private fields */ }Description
Canonical continuous Relation proven to have first-order form
M y_dot = f(t,y).
State order follows first occurrence of current-value or derivative Field symbols in scalar Operator IR. A full constant monomial derivative Jacobian is normalized to an explicit ODE. Every other non-zero-rank constant matrix remains a full or rank-deficient mass matrix. State-dependent and derivative-nonlinear systems fail closed; equation class is never inferred from sample evaluations or a floating-point rank threshold.
Implementations§
§impl FirstOrderProgram
impl FirstOrderProgram
pub fn lower(
program: &CpuProgram,
relation: Id<Relation>,
) -> Result<FirstOrderProgram, Diagnostic>
pub fn lower( program: &CpuProgram, relation: Id<Relation>, ) -> Result<FirstOrderProgram, Diagnostic>
Lower one continuously activated Relation from an already lowered CPU program and prove an admitted first-order equation class.
§Errors
Returns EQ0705 if activation, symbols, initial values, shapes, or
derivative structure cannot enter the first-order seam. Existing
Operator IR diagnostics are retained when scalar evaluation fails.
pub const fn relation(&self) -> Id<Relation>
pub const fn relation(&self) -> Id<Relation>
Canonical Relation represented by this projection.
pub fn state_fields(&self) -> &[Id<Field>]
pub fn state_fields(&self) -> &[Id<Field>]
Deterministic state coordinate order.
pub fn initial_state(&self) -> &[f64]
pub fn initial_state(&self) -> &[f64]
Revision-captured initial state or consistency-solve guess.
pub fn parameter_fields(&self) -> &[Id<Parameter>]
pub fn parameter_fields(&self) -> &[Id<Parameter>]
Deterministic first-occurrence order of bound Parameter symbols.
pub fn parameters(&self) -> &[f64]
pub fn parameters(&self) -> &[f64]
Revision-captured Parameter values in Self::parameter_fields order.
pub const fn lowering_proof(&self) -> &TimeLoweringProof
pub const fn lowering_proof(&self) -> &TimeLoweringProof
Exact Operator-IR witness behind equation-class admission.
pub const fn equation_class(&self) -> TimeEquationClass
pub const fn equation_class(&self) -> TimeEquationClass
Structurally proven equation class.
pub const fn initial_condition_policy(&self) -> InitialConditionPolicy
pub const fn initial_condition_policy(&self) -> InitialConditionPolicy
Initial-condition meaning required by the proven equation class.
pub fn time_problem(&self) -> Result<TimeProblem<'_>, Diagnostic>
pub fn time_problem(&self) -> Result<TimeProblem<'_>, Diagnostic>
Construct the sole backend-neutral time problem from this projection.
§Errors
Retains TimeProblem validation diagnostics if its invariants change.
pub fn forward_sensitivity_problem(
&self,
) -> Result<ForwardSensitivityProblem<'_>, Diagnostic>
pub fn forward_sensitivity_problem( &self, ) -> Result<ForwardSensitivityProblem<'_>, Diagnostic>
Construct the parameter-JVP problem from the same proven projection.
§Errors
Retains ForwardSensitivityProblem validation diagnostics when the
Relation has no Parameter symbols or its invariants change.
Trait Implementations§
§impl Clone for FirstOrderProgram
impl Clone for FirstOrderProgram
§impl Debug for FirstOrderProgram
impl Debug for FirstOrderProgram
§impl ParametricTimeSystem for FirstOrderProgram
impl ParametricTimeSystem for FirstOrderProgram
§fn parameter_dimension(&self) -> usize
fn parameter_dimension(&self) -> usize
§fn parameters(&self) -> &[f64]
fn parameters(&self) -> &[f64]
§fn mass_parameter_dependence(&self) -> MassParameterDependence
fn mass_parameter_dependence(&self) -> MassParameterDependence
§fn rhs_parameter_jvp(
&self,
time: f64,
state: &[f64],
parameter_direction: &[f64],
output: &mut [f64],
) -> Result<(), Diagnostic>
fn rhs_parameter_jvp( &self, time: f64, state: &[f64], parameter_direction: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>
f_p(t, y) parameter_direction. Read more§fn initial_parameter_jvp(
&self,
time: f64,
parameter_direction: &[f64],
output: &mut [f64],
) -> Result<(), Diagnostic>
fn initial_parameter_jvp( &self, time: f64, parameter_direction: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>
y0_p parameter_direction. Read more§impl PartialEq for FirstOrderProgram
impl PartialEq for FirstOrderProgram
§fn eq(&self, other: &FirstOrderProgram) -> bool
fn eq(&self, other: &FirstOrderProgram) -> bool
self and other values to be equal, and is used by ==.§impl TimeSystem for FirstOrderProgram
impl TimeSystem for FirstOrderProgram
§fn rhs(
&self,
time: f64,
state: &[f64],
output: &mut [f64],
) -> Result<(), Diagnostic>
fn rhs( &self, time: f64, state: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>
f(t, y). Read more§fn rhs_jvp(
&self,
time: f64,
state: &[f64],
direction: &[f64],
output: &mut [f64],
) -> Result<(), Diagnostic>
fn rhs_jvp( &self, time: f64, state: &[f64], direction: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>
f_y(t, y) direction. Read more§fn mass_action(
&self,
time: f64,
direction: &[f64],
output: &mut [f64],
) -> Result<(), Diagnostic>
fn mass_action( &self, time: f64, direction: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>
M(t) direction for a mass-matrix system. Read moreimpl StructuralPartialEq for FirstOrderProgram
Auto Trait Implementations§
impl Freeze for FirstOrderProgram
impl RefUnwindSafe for FirstOrderProgram
impl Send for FirstOrderProgram
impl Sync for FirstOrderProgram
impl Unpin for FirstOrderProgram
impl UnsafeUnpin for FirstOrderProgram
impl UnwindSafe for FirstOrderProgram
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
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>
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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.