pub enum MeshError {
ArrayLengthMismatch {
array: &'static str,
expected: usize,
got: usize,
},
PatchStartMismatch {
name: String,
expected: usize,
got: usize,
},
PatchCoverageMismatch {
covered: usize,
n_faces: usize,
},
NonPositiveCellCount {
got: i64,
},
CyclicPairMismatch {
name: String,
reason: &'static str,
},
AmiCouplingInvalid {
target_face: usize,
reason: &'static str,
},
}Expand description
Errors produced by the mesh layer (mesh construction and validation).
Variants§
ArrayLengthMismatch
An array field in the mesh has the wrong length.
For example, owner must have length n_faces; neighbour must have
length n_internal_faces; cell_volumes must have length n_cells.
Fields
PatchStartMismatch
A boundary patch does not start immediately after the previous one, leaving a gap or overlap in face coverage.
PatchCoverageMismatch
The sum of all patch sizes does not equal the number of boundary faces.
Fields
NonPositiveCellCount
number_of_cells was zero or negative when building a 1-D mesh.
CyclicPairMismatch
A PatchKind::Cyclic patch pair is
inconsistent — e.g. the partner index is out of range, the partner does
not name this patch back, or the two halves have different face counts.
Fields
AmiCouplingInvalid
A PatchKind::CyclicAmi
(non-conformal periodic) coupling is inconsistent — e.g. a target/source
cell or face index is out of range, or a target face has no overlapping
source faces.
Trait Implementations§
Source§impl Error for MeshError
impl Error for MeshError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()