chore: sync project state and current artifacts

This commit is contained in:
Sepehr
2026-02-22 23:27:31 +01:00
parent 1b6415776e
commit dd77089b22
232 changed files with 37056 additions and 4296 deletions

View File

@@ -43,7 +43,7 @@
use crate::system::System;
use entropyk_components::{
Component, ComponentError, ConnectedPort, JacobianBuilder, ResidualVector, SystemState,
Component, ComponentError, ConnectedPort, JacobianBuilder, ResidualVector, StateSlice,
};
use std::collections::HashMap;
@@ -268,7 +268,7 @@ impl MacroComponent {
/// than expected.
pub fn to_snapshot(
&self,
global_state: &SystemState,
global_state: &StateSlice,
label: Option<String>,
) -> Option<MacroComponentSnapshot> {
let start = self.global_state_offset;
@@ -312,7 +312,7 @@ impl Component for MacroComponent {
fn compute_residuals(
&self,
state: &SystemState,
state: &StateSlice,
residuals: &mut ResidualVector,
) -> Result<(), ComponentError> {
let n_internal_vars = self.internal_state_len();
@@ -338,7 +338,7 @@ impl Component for MacroComponent {
}
// --- 1. Delegate internal residuals ----------------------------------
let internal_state: SystemState = state[start..end].to_vec();
let internal_state: Vec<f64> = state[start..end].to_vec();
let mut internal_residuals = vec![0.0; n_int_eqs];
self.internal
.compute_residuals(&internal_state, &mut internal_residuals)?;
@@ -373,7 +373,7 @@ impl Component for MacroComponent {
fn jacobian_entries(
&self,
state: &SystemState,
state: &StateSlice,
jacobian: &mut JacobianBuilder,
) -> Result<(), ComponentError> {
let n_internal_vars = self.internal_state_len();
@@ -390,7 +390,7 @@ impl Component for MacroComponent {
let n_int_eqs = self.n_internal_equations();
// --- 1. Internal Jacobian entries ------------------------------------
let internal_state: SystemState = state[start..end].to_vec();
let internal_state: Vec<f64> = state[start..end].to_vec();
let mut internal_jac = JacobianBuilder::new();
self.internal
@@ -455,7 +455,7 @@ mod tests {
impl Component for MockInternalComponent {
fn compute_residuals(
&self,
state: &SystemState,
state: &StateSlice,
residuals: &mut ResidualVector,
) -> Result<(), ComponentError> {
// Simple identity: residual[i] = state[i] (so zero when state is zero)
@@ -467,7 +467,7 @@ mod tests {
fn jacobian_entries(
&self,
_state: &SystemState,
_state: &StateSlice,
jacobian: &mut JacobianBuilder,
) -> Result<(), ComponentError> {
for i in 0..self.n_equations {