1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// ~/volterra/volterra-solver/src/defects_3d.rs
//! 3-D disclination detection and event tracking.
//!
//! Wraps the three-layer pipeline exposed by `cartan_geo::disclination`:
//!
//! | Layer | Function |
//! |-------|----------|
//! | 1: segment scan | [`scan_disclination_lines_3d`]: holonomy per grid edge |
//! | 2: line assembly | [`connect_disclination_lines`]: BFS connected components |
//! | 3: event tracking | [`track_disclination_events`]: creation/annihilation/reconnection |
use QField3D;
use ;
/// Scan a 3D Q-tensor field for disclination lines.
///
/// Runs the full Layer-1 + Layer-2 pipeline from `cartan_geo::disclination`:
///
/// 1. `scan_disclination_lines_3d` detects individual pierced edges via
/// dual-loop holonomy.
/// 2. `connect_disclination_lines` assembles the edge segments into ordered
/// lines with Frenet-Serret geometry.
///
/// Returns an empty `Vec` when no defects are present (e.g. a uniform or
/// weakly-perturbed ordered field).
///
/// # Parameters
///
/// - `q`: reference to the 3D Q-tensor field on a regular Cartesian grid.
///
/// # Returns
///
/// `Vec<DisclinationLine>`, one entry per connected disclination line.
/// Track topology-changing events between two consecutive frames of
/// disclination lines.
///
/// Wraps `cartan_geo::disclination` Layer 3 (`track_disclination_events`).
/// Events detected include creation, annihilation, and reconnection of
/// disclination lines.
///
/// # Parameters
///
/// - `lines_a`: disclination lines at the earlier frame.
/// - `lines_b`: disclination lines at the later frame.
/// - `frame`: index of the later frame (used in returned `DisclinationEvent`s).
/// - `proximity_threshold`: distance below which two line endpoints are
/// considered the same point for event classification (in grid units).
///
/// # Returns
///
/// `Vec<DisclinationEvent>`, one entry per detected topological event.
// ─────────────────────────────────────────────────────────────────────────────
// Tests
// ─────────────────────────────────────────────────────────────────────────────