Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Plan and evaluate mesh generation for numerical simulations. Use when choosing grid resolution, checking aspect ratios/skewness, estimating mesh quality constraints, or planning adaptive mesh refinement for PDE discretization.
.claude/skills/mesh-generation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✗→✓ | ▲ Improved | — | — |
| case-14 | ✗→✓ | ▲ Improved | — | — |
| case-20 | ✗→✓ | ▲ Improved | — | — |
Provide a consistent workflow for selecting mesh resolution and checking mesh quality for PDE simulations.
| 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 |
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| 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 | Key Outputs | |--------|-------------| | scripts/grid_sizing.py | dx, nx, ny, nz, notes | | scripts/mesh_quality.py | aspect_ratio, skewness, quality_flags |
scripts/grid_sizing.pyscripts/mesh_quality.pyUser: I need to mesh a 1mm × 1mm domain for a phase-field simulation with interface width of 10 μm.
Agent workflow:
bash python3 scripts/grid_sizing.py --length 0.001 --resolution 200 --json
bash# Compute grid sizing for 1D domain python3 scripts/grid_sizing.py --length 1.0 --resolution 200 --json # Check mesh quality python3 scripts/mesh_quality.py --dx 1.0 --dy 0.5 --dz 0.5 --json # High aspect ratio check python3 scripts/mesh_quality.py --dx 1.0 --dy 0.1 --json
| Error | Cause | Resolution | |-------|-------|------------| | length must be positive | Invalid domain size | Use positive value | | resolution must be > 1 | Insufficient points | Use at least 2 | | dx, dy must be positive | Invalid spacing | Use positive values |
| Aspect Ratio | Quality | Impact | |--------------|---------|--------| | 1:1 | Excellent | Optimal accuracy | | 1:1 - 3:1 | Good | Acceptable | | 3:1 - 5:1 | Fair | May affect accuracy | | > 5:1 | Poor | Solver issues likely |
| Skewness | Quality | Impact | |----------|---------|--------| | 0 - 0.25 | Excellent | Optimal | | 0.25 - 0.50 | Good | Acceptable | | 0.50 - 0.80 | Fair | May affect accuracy | | > 0.80 | Poor | Likely problems |
| Application | Points per Feature | |-------------|-------------------| | Phase-field interface | 5-10 | | Boundary layer | 10-20 | | Shock | 3-5 (with capturing) | | Wave propagation | 10-20 per wavelength | | Smooth gradients | 5-10 |
references/mesh_types.md - Structured vs unstructuredreferences/quality_metrics.md - Aspect ratio/skewness thresholds| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +50 percentage points is the difference between those two pass rates over the 21 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.