Skip to content

Fix inverse periodic affine transforms in the parser and FEM - #2966

Draft
rois1995 wants to merge 1 commit into
su2code:developfrom
rois1995:fix_periodic_transforms
Draft

rois1995 wants to merge 1 commit into
su2code:developfrom
rois1995:fix_periodic_transforms

Conversation

@rois1995

@rois1995 rois1995 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

Periodic affine maps use an incorrect inverse when rotations and translations are combined. This PR corrects the parser inverse and the FEM caller.

A combined Euler rotation cannot be inverted by simply negating its three angles, and an affine translation must be reversed as -R^T t. The parser now stores the actual inverse rotation/translation, including gimbal cases. The FEM caller uses the same rotation helper and inverse affine offset.

Parser round trips cover translation, one/multiple angles and a gimbal layout. A tiny BOX DG regression expresses the same rotation once with an affine translation and once with a shifted center. Develop rejects the affine map at face matching; the fixed cases both complete with identical printed histories. The generated BOX mesh needs no external data. Identity/single-axis arithmetic is preserved where applicable.

Validation of the combined periodic source passes serial, partitioned MPI2, OpenMP2 and MPI2×OpenMP2 (10 cases / 3175 serial assertions). Individual branch CI and complete regression/reference checks are pending. Test configurations, meshes, logs and before/after values are in the testcase comment. New regression references are local x86 values and need CI confirmation.

Related Work

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (complete branch CI pending).
  • My contribution is commented and consistent with SU2 style.
  • I ran the repository pre-commit checks on the changed files.
  • I have added tests that demonstrate the contribution.
  • I have updated appropriate documentation, if necessary.

@rois1995

rois1995 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Test cases

Reproducers, configurations, numeric logs and scripts: transforms. Develop = 6db10127d1; BOX fixtures generate their meshes. The original B–D evidence above was recorded before the expanded follow-ups.

Check develop fixed
Affine parser round trips 4/5 fail; errors 0.8660254, 1.7259958 and 4 passes
Equivalent affine vs centered BOX DG map affine stops at face matching, centered completes both complete; identical printed histories

The two complete configurations and histories are in the evidence folder. Iteration-1 monitored values are 2.083795225, 4.631729184, 4.386282333, 3.676591706, 7.559937938 for both fixed inputs. The new periodic_affine serial regression uses a generated BOX mesh.

Combined release checks: serial and OpenMP2 pass 10 cases / 3175 assertions; partitioned MPI2 and MPI2×OpenMP2 pass on both ranks (2334 / 2238 assertions). These are combined-source checks, not standalone builds of every branch. Complete branch CI and full regression/reference checks remain pending.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant