//! # 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).

// Pre-existing lint debt accumulated before CI was introduced. Allowed so the
// new CI skeleton can enforce warnings-as-errors on new code. Cleanup is tracked
// in deferred-work.md.
#![allow(clippy::redundant_field_names)]
#![allow(clippy::let_and_return)]
#![allow(clippy::unnecessary_fallible_conversions)]
#![allow(clippy::while_let_loop)]
#![allow(clippy::needless_range_loop)]
#![allow(clippy::len_zero)]
#![allow(clippy::useless_conversion)]
#![allow(clippy::unnecessary_cast)]
#![allow(clippy::derivable_impls)]
#![allow(clippy::ptr_arg)]
#![allow(clippy::manual_map)]
#![allow(clippy::map_flatten)]
#![allow(clippy::unnecessary_map_or)]
#![allow(clippy::useless_asref)]
#![allow(clippy::too_many_arguments)]

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 linear;
pub mod linear_faer;
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 criteria::{CircuitConvergence, ConvergenceCriteria, ConvergenceReport};
pub use dof::{
    align_roles, unspecified_roles, ComponentEquationBlock, DofReport, EquationRole,
    SystemDofBalance, SystemDofError, UnknownKind,
};
pub use entropyk_components::ConnectionError;
pub use entropyk_core::CircuitId;
pub use entropyk_solver_core::{
    ConvergenceReason, DomainViolation, LinearSolver, SolveOutcome, SolverCoreError,
};
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 linear::{make_linear_backend, set_linear_backend_override, DenseLu, NalgebraLuSolver};
pub use linear_faer::FaerLuSolver;
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};
