Skip to content

feat: add explicit pin selection to AngleBasedLSCM (A5)#43

Merged
csparker247 merged 1 commit intodevelopfrom
feat/a5-lscm-explicit-pins
Mar 16, 2026
Merged

feat: add explicit pin selection to AngleBasedLSCM (A5)#43
csparker247 merged 1 commit intodevelopfrom
feat/a5-lscm-explicit-pins

Conversation

@csparker247
Copy link
Copy Markdown
Member

Summary

  • Extracts the core solver into private ComputeImpl(mesh, p0, p1) — no logic duplication
  • Adds Compute(mesh, pin0Idx, pin1Idx) static overload for explicit pin selection
  • Adds setPinnedVertices(pin0Idx, pin1Idx) + stateful pinnedVertices_ for the instance API
  • Default Compute(mesh) is unchanged: auto-selects first boundary vertex + neighbor

API

// Default (unchanged behavior)
AngleBasedLSCM<float>::Compute(mesh);

// Static explicit pins
AngleBasedLSCM<float>::Compute(mesh, 0, 3);

// Instance explicit pins
AngleBasedLSCM<float> lscm;
lscm.setPinnedVertices(0, 3);
lscm.compute(mesh);

Test plan

  • AngleBasedLSCM_ExplicitPinsCompute(mesh, 0, 1) produces bit-identical result to default
  • AngleBasedLSCM_ExplicitPins_ReversedCompute(mesh, 1, 0) places the correct vertex at the origin and p1 on the Y axis
  • AngleBasedLSCM_SetPinnedVertices — instance API matches static explicit-pin overload
  • All 72 existing tests pass

Closes #2

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@csparker247 csparker247 merged commit c93951f into develop Mar 16, 2026
7 checks passed
@csparker247 csparker247 deleted the feat/a5-lscm-explicit-pins branch March 16, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(AngleBasedLSCM) Improve pinned edge selection and placement

1 participant