hpc-fenics
Build, review, and debug FEniCS or DOLFINx PDE scripts for finite-element workflows. Use when translating PDEs into UFL, selecting function spaces, applying boundary conditions, choosing between classic FEniCS and DOLFINx, or fixing FEM runtime errors.
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- hpc-fenics
- risk
- low
- domain
- high-performance-computing
- source
- { "commit": "4ea8069188", "license": "MIT", "repository": "SciMate-AI/HPC-Skills", "imported_at": "2026-09-20" }
- license
- MIT
- version
- 1.0.0
- category
- high-performance-computing
- platforms
- [ "claude-code", "cursor", "codex", "gemini", "antigravity", "copilot" ]
- subdomain
- general
- description
- Build, review, and debug FEniCS or DOLFINx PDE scripts for finite-element workflows. Use when translating PDEs into UFL, selecting function spaces, applying boundary conditions, choosing between classic FEniCS and DOLFINx, or fixing FEM runtime errors.
02 资源文件 17
- 脚本assets/templates/fenics-dolfinx-slurm.sh494 B
- 脚本assets/templates/poisson_dolfinx.py733 B
- 脚本assets/templates/transient_diffusion_dolfinx.py1.0 KB
- 参考文档references/boundary-io-and-errors.md1.7 KB
- 参考文档references/cluster-execution-playbook.md3.0 KB
- 参考文档references/dolfinx-boundary-workflow.md2.2 KB
- 参考文档references/gmsh-meshtags-and-refinement.md2.1 KB
- 参考文档references/implementation-skeletons.md1.9 KB
- 参考文档references/io-visualization-and-writers.md1.8 KB
- 参考文档references/mixed-problems-and-output.md2.4 KB
- 参考文档references/parallel-and-mpi-caveats.md1.5 KB
- 参考文档references/pde-template-cookbook.md2.4 KB
- 参考文档references/petsc-solver-playbook.md2.9 KB
- 参考文档references/runtime-selection.md1.3 KB
- 参考文档references/space-boundary-output-matrix.md1.5 KB
- 参考文档references/time-dependent-and-nonlinear-patterns.md1.8 KB
- 参考文档references/ufl-and-solver-patterns.md1.6 KB
03 SKILL.md 正文
HPC FEniCS
Treat FEniCS as a family with two main stacks: classic FEniCS and DOLFINx.
Start
- Read
references/runtime-selection.mdfirst. - Read
references/dolfinx-boundary-workflow.mdwhen targeting DOLFINx boundary conditions. - Read
references/ufl-and-solver-patterns.mdwhen translating PDEs, choosing spaces, or building forms. - Read
references/pde-template-cookbook.mdwhen mapping common PDE classes to known formulation patterns. - Read
references/time-dependent-and-nonlinear-patterns.mdwhen building transient or nonlinear solvers. - Read
references/implementation-skeletons.mdwhen you need a concrete script shape for classic FEniCS or DOLFINx. - Read
references/petsc-solver-playbook.mdwhen choosing linear, nonlinear, or block solver settings. - Read
references/mixed-problems-and-output.mdwhen working with mixed spaces, XDMF, or post-processing. - Read
references/cluster-execution-playbook.mdwhen staging a FEniCS or DOLFINx script for scheduler-backed cluster execution. - Read
references/boundary-io-and-errors.mdwhen repairing runtime failures or resolving IO issues.
Work sequence
- Choose one stack and stay consistent:
- classic FEniCS:
fenicsordolfin - modern stack:
dolfinx
- classic FEniCS:
- Translate the PDE into the correct weak form before writing code.
- Match unknown type and space:
- scalar field -> scalar space
- vector field -> vector space
- mixed formulation -> mixed space with explicit subspace handling
- For linear problems, use
TrialFunctionandTestFunction. - For nonlinear problems, use a
Functionfor the unknown and solve a residual form. - Write outputs in a format the expected post-processor can open, usually XDMF for mesh-coupled fields.
Guardrails
- Do not mix classic FEniCS imports with DOLFINx APIs in one script.
- Do not use
TrialFunctionfor a nonlinear unknown. - Do not guess a boundary condition if the PDE is under-constrained; say what is missing.
- Do not ignore shape and rank mismatches in UFL expressions.
Additional References
Load these on demand:
references/gmsh-meshtags-and-refinement.mdfor imported meshes, physical groups, markers, and refinement transferreferences/io-visualization-and-writers.mdfor XDMF, VTK, VTX, and visualization-safe outputreferences/parallel-and-mpi-caveats.mdfor ownership, boundary marking, and parallel consistencyreferences/space-boundary-output-matrix.mdfor function-space, boundary-condition, and writer-selection matricesreferences/cluster-execution-playbook.mdfor MPI launch, environment pinning, and cluster-side IO planning
Reusable Templates
Use assets/templates/ when a concrete script scaffold is needed, especially:
poisson_dolfinx.pytransient_diffusion_dolfinx.pyfenics-dolfinx-slurm.sh
Outputs
Report:
- chosen stack and version family if known
- PDE form and space selection
- boundary conditions applied
- expected output files
- the exact failure class if the script is being repaired
04 同仓库更多 Skills
dei-assessment
Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.
dei-action-plan
Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.
culture-fit-assessment
Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.
cowork-to-code-bridge
Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.
counter-offer-response
Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.
continuous-feedback-system
Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.