//! # Entropyk Solver
//!
//! System topology and solver engine for thermodynamic simulation.
//!
//! This crate provides the graph-based representation of thermodynamic systems,
//! where components are nodes and flow connections are edges. Edges index into
//! the solver's state vector (P and h per edge).

pub mod coupling;
pub mod criteria;
pub mod dof;
pub mod error;
pub mod graph;
pub mod initializer;
pub mod inverse;
pub mod jacobian;
pub mod macro_component;
pub mod metadata;
pub mod scaling;
pub mod snapshot;
pub mod snapshot_params;
pub mod solver;
pub mod strategies;
pub mod system;
pub mod topology;

pub use coupling::{
    compute_coupling_heat, coupling_groups, has_circular_dependencies, ThermalCoupling,
};
pub use dof::{
    align_roles, unspecified_roles, ComponentEquationBlock, DofReport, EquationRole,
    SystemDofBalance, SystemDofError, UnknownKind,
};
pub use criteria::{CircuitConvergence, ConvergenceCriteria, ConvergenceReport};
pub use entropyk_components::ConnectionError;
pub use entropyk_core::CircuitId;
pub use error::{AddEdgeError, ThermoError, TopologyError};
pub use initializer::{
    antoine_pressure, AntoineCoefficients, InitializationDiagnostics, InitializationRegime,
    InitializationSeed, InitializerConfig, InitializerError, SmartInitializer, StartValues,
};
pub use inverse::{ComponentOutput, Constraint, ConstraintError, ConstraintId};
pub use jacobian::JacobianMatrix;
pub use macro_component::{MacroComponent, MacroComponentSnapshot, PortMapping};
pub use metadata::SimulationMetadata;
pub use scaling::{equilibrate, unscale_dx};
pub use snapshot::{
    BoundedVariableSnapshot, ConstraintSnapshot, EdgeSnapshot, FluidBackendInfo,
    SolverConfigSnapshot, SystemSnapshot, TopologySnapshot,
};
pub use solver::{
    dominant_residual, ConvergedState, ConvergenceDiagnostics, ConvergenceStatus,
    IterationDiagnostics, JacobianFreezingConfig, Solver, SolverError, SolverSwitchEvent,
    SolverType, SwitchReason, TimeoutConfig, VerboseConfig, VerboseOutputFormat,
};
pub use strategies::{
    FallbackConfig, FallbackSolver, HomotopyConfig, NewtonConfig, PicardConfig, SolverStrategy,
};
pub use system::{CyclePerformance, FlowEdge, System, MAX_CIRCUIT_ID};
