HierarchicalLSCM::solveLSCMLevel duplicates approximately 150 lines of AngleBasedLSCM::ComputeImpl. The duplicated logic includes:
- Pin placement and boundary handling
- Free-vertex index table construction
- LSCM sparse system (A matrix, b vector) assembly
- UV extraction from the solver solution
A bug fix in one implementation must be manually applied to the other, and the two have already diverged slightly (e.g. pin-axis selection, index table type).
Proposed fix
Extract the shared system-building logic into a detail utility — e.g., detail::lscm::buildSystem(levelMesh, pin0, pin1, freeIdxTable) returning the (A, b) pair — and have both AngleBasedLSCM::ComputeImpl and HierarchicalLSCM::solveLSCMLevel call it.
Dependencies
- Depends on F1 (HLSCM) being merged first
- Related to A6 (closed — prior matrix construction refactor provides useful context)
HierarchicalLSCM::solveLSCMLevelduplicates approximately 150 lines ofAngleBasedLSCM::ComputeImpl. The duplicated logic includes:A bug fix in one implementation must be manually applied to the other, and the two have already diverged slightly (e.g. pin-axis selection, index table type).
Proposed fix
Extract the shared system-building logic into a
detailutility — e.g.,detail::lscm::buildSystem(levelMesh, pin0, pin1, freeIdxTable)returning the(A, b)pair — and have bothAngleBasedLSCM::ComputeImplandHierarchicalLSCM::solveLSCMLevelcall it.Dependencies