feat(formdsl): add convection-diffusion DG step simulations#60
feat(formdsl): add convection-diffusion DG step simulations#60
Conversation
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).
There was a problem hiding this comment.
💡 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".
| if boundary == "all" or boundary.startswith("marker:"): | ||
| return tuple(range(count)) |
There was a problem hiding this comment.
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 👍 / 👎.
| index / (dof_count - 1) if dof_count > 1 else 0.5, | ||
| 0.5, | ||
| ) |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
solve_formend-to-end helper, including a real CUTKIT trimmed-overlay workflow for step-003 DGconvectioncapability/lowering support and non-symmetric solve handling (bicgstabwith deterministiccgnefallback)--artifact-dir/--skip-plotsValidation
make devuv run pytest -q tests/formdsl/test_formdsl_assembly.py tests/formdsl/test_formdsl_solver.py tests/test_script_wrappers.pyuv 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|24and flux sweep (sipg,central,upwind) with passing residual checks