Skip to content

Fix varlist index range for manifold dimension - #102

Merged
lwJi merged 1 commit into
mainfrom
codex/review-codebase-for-improvements
Jan 15, 2026
Merged

Fix varlist index range for manifold dimension#102
lwJi merged 1 commit into
mainfrom
codex/review-codebase-for-improvements

Conversation

@lwJi

@lwJi lwJi commented Jan 15, 2026

Copy link
Copy Markdown
Owner

Motivation

  • ParseVarlist previously assumed a 4D coordinate range (hard-coded 0..3) which is incorrect for other manifold dimensions.
  • This could produce incorrect index loops for non-4D manifolds and repeated calls to GetDim[].

Description

  • Compute the manifold dimension once with dim = GetDim[] and use it for logging.
  • Derive iMin and iMax from dim instead of hard-coding iMax = 3 so index ranges match the manifold dimension.
  • Introduced local dim variable and adjusted the Module locals in ParseVarlist accordingly (in src/Varlist.wl).

Testing

  • No automated tests were run as part of this change.

Codex Task

@lwJi
lwJi merged commit 4685000 into main Jan 15, 2026
1 check passed
@lwJi
lwJi deleted the codex/review-codebase-for-improvements branch January 15, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant