tpt_sci_grid/error.rs
1use thiserror::Error;
2
3/// Errors raised while constructing grids or assembling operators.
4#[derive(Debug, Error)]
5pub enum GridError {
6 /// A grid needs at least this many points.
7 #[error("grid needs at least {0} points, got {1}")]
8 TooFewPoints(usize, usize),
9
10 /// The domain endpoints were not strictly ordered.
11 #[error("invalid domain: x0 ({0}) >= x1 ({1})")]
12 InvalidDomain(f64, f64),
13}