Skip to content

feat(formdsl): add convection-diffusion DG step simulations#60

Open
xywei wants to merge 1 commit intomainfrom
feature/formdsl-step-convdiff-plots
Open

feat(formdsl): add convection-diffusion DG step simulations#60
xywei wants to merge 1 commit intomainfrom
feature/formdsl-step-convdiff-plots

Conversation

@xywei
Copy link
Copy Markdown
Owner

@xywei xywei commented Apr 8, 2026

Summary

  • add FormDSL step scripts and solve_form end-to-end helper, including a real CUTKIT trimmed-overlay workflow for step-003 DG
  • upgrade step-003 from Poisson prototype to convection-diffusion by adding DG convection capability/lowering support and non-symmetric solve handling (bicgstab with deterministic cgne fallback)
  • refresh default SVG diagnostics/figure styling and make step scripts emit plot artifacts by default with --artifact-dir / --skip-plots

Validation

  • make dev
  • uv run pytest -q tests/formdsl/test_formdsl_assembly.py tests/formdsl/test_formdsl_solver.py tests/test_script_wrappers.py
  • uv run --extra dgsem python scripts/run_formdsl_step_003_dgsem_poisson.py --resolution 8 --skip-plots (local prerequisite path)
  • ipa: scripts/run_formdsl_step_003_dgsem_poisson.py --resolution 8|16|24 and flux sweep (sipg, central, upwind) with passing residual checks

Upgrade the FormDSL step workflow to include end-to-end solver entrypoints and make step-003 a real trimmed-overlay convection-diffusion DG run, so tutorials exercise CUTKIT geometry and grudge runtime instead of placeholder paths.

Add deterministic DG convection lowering plus non-symmetric solver handling (BiCGStab with CGNE fallback), refresh SVG artifact generation for all steps, and pin dgsem runtime dependencies to a tested compatibility set.

Testing: make dev; uv run pytest -q tests/formdsl/test_formdsl_assembly.py tests/formdsl/test_formdsl_solver.py tests/test_script_wrappers.py; ipa step-003 runs at resolutions 8/16/24 and convection flux sweep (sipg/central/upwind).
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90b875535c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +292 to +293
if boundary == "all" or boundary.startswith("marker:"):
return tuple(range(count))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve marker/all selectors when choosing boundary DOFs

This branch makes every marker:* boundary act on every DOF (tuple(range(count))), so marker-based Dirichlet/Neumann conditions are applied globally instead of only on the mapped boundary segment. That breaks the documented marker-selector behavior and can over-constrain or over-load the system whenever forms use marker-tagged boundaries.

Useful? React with 👍 / 👎.

Comment on lines +482 to +484
index / (dof_count - 1) if dof_count > 1 else 0.5,
0.5,
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Derive boundary points from the DG mesh, not a fixed y-line

All synthetic DOF points are created with y=0.5, which collapses vertical extent and causes boundary classification for top/bottom to match essentially all DOFs. As a result, any top/bottom boundary condition (including the new step-003 Neumann top term) is distributed across the whole system instead of only the intended boundary subset.

Useful? React with 👍 / 👎.

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.

1 participant