Implementation details for HierarchicalLSCM.
More...
|
| template<typename T , class MeshPtr > |
| auto | BuildHierarchy (const MeshPtr &mesh, const std::vector< std::size_t > &pinIndices, std::size_t levelRatio, std::size_t minCoarseVerts) -> std::pair< std::vector< HierarchyLevel< T > >, std::vector< std::vector< CollapseRecord< T > > > > |
| | Build a mesh hierarchy by greedy QEM decimation.
|
| |
|
template<typename T > |
| auto | BuildLevelMesh (const HierarchyLevel< T > &level) -> typename HalfEdgeMesh< T >::Pointer |
| | Build a HalfEdgeMesh from a hierarchy level.
|
| |
| template<typename T > |
| auto | ProlongateUVs (UVVector< T > uvs, const std::vector< CollapseRecord< T > > &collapses) -> UVVector< T > |
| | Prolongate UV coordinates from a coarser level to a finer level.
|
| |
| template<typename T , class SolverType > |
| auto | SolveLSCMLevel (const typename HalfEdgeMesh< T >::Pointer &levelMesh, const detail::hlscm::HierarchyLevel< T > &level, const detail::lscm::PinMap< T > &origPins, std::size_t origVertCount, const UVVector< T > *initialGuess) -> UVVector< T > |
| | Solve the LSCM system at one hierarchy level.
|
| |
Implementation details for HierarchicalLSCM.
◆ UVVector
UV vector indexed by original (finest-level) vertex idx. Slots for vertices not yet solved/prolongated hold std::nullopt.
◆ BuildHierarchy()
| auto OpenABF::detail::hlscm::BuildHierarchy |
( |
const MeshPtr & |
mesh, |
|
|
const std::vector< std::size_t > & |
pinIndices, |
|
|
std::size_t |
levelRatio, |
|
|
std::size_t |
minCoarseVerts |
|
) |
| -> std::pair<std::vector<HierarchyLevel<T>>, std::vector<std::vector<CollapseRecord<T>>>>
|
|
private |
Build a mesh hierarchy by greedy QEM decimation.
Returns a vector of HierarchyLevel from finest to coarsest, plus the collapse records needed for prolongation (ordered from finest to coarsest).
◆ ProlongateUVs()
Prolongate UV coordinates from a coarser level to a finer level.
Surviving vertices keep their existing UVs; vertices that were removed by a collapse get UVs via barycentric interpolation in their containing post-collapse triangle.
- Parameters
-
| uvs | UV coordinates indexed by original vertex index. Unset slots are std::nullopt. Mutated in place: every vertex removed in collapses is filled in. Returned by move. |
| collapses | Collapse records for this level transition. |
◆ SolveLSCMLevel()
Solve the LSCM system at one hierarchy level.
Builds the Lévy et al. Eq. 10 LSCM system on the given level mesh with the given pin vertices. If an initial guess is provided, uses solveWithGuess.
- Parameters
-
| origVertCount | Original (finest-level) vertex count; sizes the output UV vector so it can be indexed by original vertex idx. |
- Returns
- UV coordinates indexed by original vertex index. Slots for vertices not present at this level remain
std::nullopt.