mesh-generation
Plan and evaluate mesh generation for numerical simulations — estimate grid resolution from physics scales (interface width, boundary layers, wavelengths)…
Skill by HeshamFS
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/heshamfs-mesh-generation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mesh-generation
Tools it pre-approves 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Read,Write,Grep,Glob
What's inside
- Skill name
mesh-generation- Description
- Plan and evaluate mesh generation for numerical simulations — estimate grid resolution from physics scales (interface width, boundary layers, wavelengths), check aspect ratios and skewness against quality thresholds, choose between structured, unstructured, and adaptive mesh refinement strategies, and compute grid sizing for 1D/2D/3D domains. Use when setting up a new mesh, diagnosing poor solver convergence caused by mesh quality, deciding how many points to place across a phase-field interface or boundary layer, or preparing a mesh convergence study, even if the user only asks "what resolution do I need" or "why is my solver failing."
- License
- Apache-2.0
- Allowed tools
- Read,, Write,, Grep,, Glob
- Metadata
- author: HeshamFS · version: 1.2.2 · eval_cases: 4 · last_reviewed: 2026-06-23 · security_tier: medium · last_evaluated: 2026-06-24 · security_reviewed: true · agent_evaluation_status: not_revalidated · last_deterministic_eval: 2026-10-20
- Instructions
- 216 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (7)
- CHANGELOG.md
- SKILL.md
- evals.json · evals/
- mesh_types.md · references/
- quality_metrics.md · references/
- grid_sizing.py · scripts/
- mesh_quality.py · scripts/
SKILL.md (first lines)
# Mesh Generation ## Goal Provide a consistent workflow for selecting mesh resolution and checking mesh quality for PDE simulations. ## Requirements - Python 3.10+ - No external dependencies (uses stdlib) ## Inputs to Gather | Input | Description | Example | |-------|-------------|---------| | Domain size | Physical dimensions | `1.0 × 1.0 m` | | Feature size | Smallest feature to resolve | `0.01 m` | | Points per feature | Resolution requirement | `10 points` | | Aspect ratio limit | Maximum dx/dy ratio | `5:1` | | Quality threshold | Skewness limit | `< 0.8` | ## Decision Guidance ### Resolution Selection ``` What is the smallest feature size? ├── Interface width → dx ≤ width / 5 ├── Boundary layer → dx ≤ layer_thickness / 10 ├── Wave length → dx ≤ lambda / 20 └── Diffusion length → dx ≤ sqrt(D × dt) / 2 ``` ### Mesh Type Selection | Problem | Recommended Mesh | |---------|------------------| | Simple geometry, uniform | Structured Cartesian | | Complex geometry | Unstructured triangular/tetrahedral | | Boundary layers | Hybrid (structured near walls) | | Adaptive refinement | Quadtree/Octree or AMR | ## Script Outputs (JSON Fields) All scripts emit a top-level object with `inputs` (the echoed CLI values) and `results` (the computed fields below). Index as `result["results"]["..."]`. | Script | `results` Fields | |--------|------------------| | `scripts/grid_sizing.py` | `dx`, `counts` (list of per-dimension cell counts, length == `dims`), `notes` | | `scripts/mesh_quality.py` | `aspect_ratio`, `skewness`, `size_anisotropy`, `quality_flags`, `dims`, `notes` | `mesh_quality.py` describes axis-aligned (orthogonal Cartesian) cells defined purely by edge spacings. For such cells every interior angle is 90°, so the true angular `skewness` is always `0.0` and `high_skewness` is never flagged. Cell elongation is reported separately via `aspect_ratio` and the redundant convenience field `size_anisotropy` (= `1 - 1/aspect_ratio`). ## Workflow 1. **Estimate resolution** - From physics scales 2. **Compute grid sizing** - Run `scripts/grid_sizing.py` 3. **Check quality metrics** - Run `scripts/mesh_quality.py` 4. **Adjust if needed** - Fix aspect ratios, reduce skewness 5. **Validate** - Mesh convergence study ## Conversational Workflow Example **User**: I need to mesh a 1mm × 1mm domain for a phase-field simulation with interface width of 10 μm. **Agent workflow**: 1. Compute grid sizing: ```bash python3 scripts/grid_sizing.py --length 0.001 --resolution 200 --json ``` 2. Verify interface is resolved: dx = 5 μm, interface width = 10 μm → 2 points per interface width. 3. Recommend: Increase to 500 points (dx = 2 μm) for 5 points across interface. ## Pre-Mesh Checklist - [ ] Define target resolution per feature/interface - [ ] Ensure dx meets stability constraints (see numerical-stability) - [ ] Check aspect ratio < limit (typically 5:1) - [ ] Check skewness < threshold (typically 0.8) - [ ] Validate mesh convergence with refinement study ## CLI Examples ```bash # Compute grid sizing for 1D domain python3 scripts/grid_sizing.py --length 1.0 --resolution 200 --json # Check mesh quality (3D cell) python3 scripts/mesh_quality.py --dx 1.0 --dy 0.5 --dz 0.5 --json # High aspect ratio check (2D cell; --dz omitted is treated as 2D) python3 scripts/mesh_quality.py --dx 1.0 --dy 0.1 --json ``` ## Error Handling All validation errors are written to stderr and the script exits with code `2`. | Error message | Cause | Resolution | |---------------|-------|------------| | `length must be positive, got ...` | Non-positive domain size | Use a positive value | | `resolution must be positive, got ...` | Non-positive resolution (`resolution=1` is a valid single-cell mesh) | Use a positive integer | | `dims must be one of (1, 2, 3), got ...` | Unsupported dimension count | Use `1`, `2`, or `3` | | `<name> must be a finite positive number, got ...` | `dx`/`dy`/`dz` not finite or not positive | Use a finite positive value | | `<name> exceeds maximum (...), got ...` | Input above the resource-exhaustion bound | Use a smaller value | ## Interpretation Guidance ### Aspect Ratio | Aspect Ratio | Quality | Impact | |--------------|---------|--------| | 1:1 | Excellent | Optimal accuracy | | 1:1 - 3:1 | Good | Acceptable |
From HeshamFS/materials-simulation-skills, Apache-2.0.
More from HeshamFS/materials-simulation-skills
- 0.676score
benchmark-and-mms-planner
HeshamFS
Plan verification and validation campaigns for simulation codes using manufactured solutions, canonical benchmark problems, grid/time refinement, uncertainty…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
differentiation-schemes
HeshamFS
Select and apply numerical differentiation schemes for PDE and ODE discretization — generate finite-difference stencils at arbitrary order and accuracy…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
linear-solvers
HeshamFS
Select and configure linear solvers for Ax=b systems arising in numerical simulations — choose between direct (LU, Cholesky) and iterative (CG, GMRES…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
nonlinear-solvers
HeshamFS
Select and configure nonlinear solvers for root-finding f(x)=0, optimization min F(x), and least-squares problems — choose among Newton, Newton-Krylov…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
numerical-integration
HeshamFS
Select and configure time integration methods for ODE and PDE simulations — choose among explicit Runge-Kutta, BDF, Rosenbrock, and Adams families, set…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
numerical-stability
HeshamFS
Analyze numerical stability for time-dependent PDE simulations — check CFL and Fourier criteria, perform von Neumann stability analysis, detect stiffness…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
time-stepping
HeshamFS
Plan and control time-step policies for transient simulations — couple CFL and physics-based stability limits with adaptive stepping, ramp initial transients…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
fair-simulation-packager
HeshamFS
Create FAIR-minded reproducibility bundles for materials simulations by collecting input/output file inventories, hashes, units, engine versions, structure…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
hpc-runtime-doctor
HeshamFS
Diagnose HPC runtime and scheduler problems for materials simulations, including MPI/OpenMP/GPU layout, modules, CUDA/Kokkos hints, scratch paths, walltime…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
slurm-job-script-generator
HeshamFS
Generate correct, copy-pasteable SLURM sbatch job scripts and sanity-check HPC resource requests — configure nodes, MPI tasks, OpenMP threads, memory…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
skill-evaluator
HeshamFS
Rigorously evaluate an Agent Skill end-to-end across ANY coding-agent CLI — verify its scripts emit the documented numbers (deterministic checks), test…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
ontology-explorer
HeshamFS
Parse, navigate, and query materials science ontology structures — browse class hierarchies, inspect individual classes and their properties, look up object…
SkillAFreshness: A★ 83Claude Code +9
Signals
- Stars
- 83
- Forks
- 6
- Open issues
- 0
- Last commit (this folder)
- Oct 21, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.2.2
- License
- Apache-2.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from HeshamFS
- 0.676score
numerical-stability
HeshamFS
Analyze numerical stability for time-dependent PDE simulations — check CFL and Fourier criteria, perform von Neumann stability analysis, detect stiffness…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
differentiation-schemes
HeshamFS
Select and apply numerical differentiation schemes for PDE and ODE discretization — generate finite-difference stencils at arbitrary order and accuracy…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
linear-solvers
HeshamFS
Select and configure linear solvers for Ax=b systems arising in numerical simulations — choose between direct (LU, Cholesky) and iterative (CG, GMRES…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
nonlinear-solvers
HeshamFS
Select and configure nonlinear solvers for root-finding f(x)=0, optimization min F(x), and least-squares problems — choose among Newton, Newton-Krylov…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
numerical-integration
HeshamFS
Select and configure time integration methods for ODE and PDE simulations — choose among explicit Runge-Kutta, BDF, Rosenbrock, and Adams families, set…
SkillAFreshness: A★ 83Claude Code +9 - 0.676score
time-stepping
HeshamFS
Plan and control time-step policies for transient simulations — couple CFL and physics-based stability limits with adaptive stepping, ramp initial transients…
SkillAFreshness: A★ 83Claude Code +9
Cite this page
mesh-generation skill. Agent Mart. https://agentmart.dev/skills/heshamfs-mesh-generation (last updated 2026-10-24)