43 lines
997 B
Rust
43 lines
997 B
Rust
//! Error types for PINN source localization.
|
|
|
|
use thiserror::Error;
|
|
|
|
/// PINN error types
|
|
#[derive(Debug, Error)]
|
|
pub enum PinnError {
|
|
/// Invalid configuration
|
|
#[error("Invalid configuration: {0}")]
|
|
InvalidConfig(String),
|
|
|
|
/// Dimension mismatch
|
|
#[error("Dimension mismatch: {0}")]
|
|
DimensionMismatch(String),
|
|
|
|
/// Training error
|
|
#[error("Training error: {0}")]
|
|
TrainingError(String),
|
|
|
|
/// Convergence failure
|
|
#[error("Failed to converge: {0}")]
|
|
ConvergenceError(String),
|
|
|
|
/// Invalid head model
|
|
#[error("Invalid head model: {0}")]
|
|
InvalidHeadModel(String),
|
|
|
|
/// Sensor configuration error
|
|
#[error("Sensor error: {0}")]
|
|
SensorError(String),
|
|
|
|
/// Physics constraint violation
|
|
#[error("Physics violation: {0}")]
|
|
PhysicsViolation(String),
|
|
|
|
/// Numerical error
|
|
#[error("Numerical error: {0}")]
|
|
NumericalError(String),
|
|
}
|
|
|
|
/// Result type for PINN operations
|
|
pub type PinnResult<T> = Result<T, PinnError>;
|