forked from 1b-agent/fieldcraft-upstream
Verification oracle: tests/oracle cases, cargo xtask oracle, fixtures, docs/oracle.md, CI job
The oracle binary (modelcraft-testkit) runs each case's recipe through the command engine, measures its quantities by JSON pointers into step outputs or commands, compares them with the cited references and the frozen fixtures, and writes docs/oracle.md. 20 theory cases (patch tests of every solid element, Timoshenko cantilevers, Lame, Kirsch, beam frequencies, torsion and bending through couplings, explicit waves and impact, CDT invariants), 8 published benchmarks (MacNeal-Harder patch, straight and curved cantilevers, thick cylinder, Scordelis-Lo with solids, NAFEMS LE1, LE10, FV32) and 10 pending cases with citations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
a3cb6d749b
commit
6d9452ad84
144 files changed
+5162
-74
No files matched your search
@@ -0,0 +1,5 @@
|
||||
# Constrained Delaunay mesh of a stepped block: exact volume, valid elements
|
||||
|
||||
The corpus part `stepped-block` (three boxes, a pocket cut through), built with SolidCraft from
|
||||
`design.json`, tetrahedralized by `mesh.tet.generate`. Every boundary face is planar, so the
|
||||
tessellation is exact and the mesh's volume must equal 47000 to rounding.
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"corner": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"length": 60,
|
||||
"width": 40,
|
||||
"height": 10,
|
||||
"body_name": "Steps"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"corner": [
|
||||
0,
|
||||
0,
|
||||
10
|
||||
],
|
||||
"length": 40,
|
||||
"width": 40,
|
||||
"height": 10,
|
||||
"operation": "join",
|
||||
"targets": [
|
||||
"Steps"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"corner": [
|
||||
0,
|
||||
0,
|
||||
20
|
||||
],
|
||||
"length": 20,
|
||||
"width": 40,
|
||||
"height": 10,
|
||||
"operation": "join",
|
||||
"targets": [
|
||||
"Steps"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"corner": [
|
||||
45,
|
||||
15,
|
||||
0
|
||||
],
|
||||
"length": 10,
|
||||
"width": 10,
|
||||
"height": 10,
|
||||
"operation": "cut",
|
||||
"targets": [
|
||||
"Steps"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"title": "Constrained Delaunay mesh of a stepped block: exact volume, valid elements",
|
||||
"kind": "theory",
|
||||
"source": "mesh invariants: a tetrahedralization of a polyhedron fills its volume exactly (Si, TetGen paper ACM TOMS 41(2) 2015 for the definition of a CDT; Diazzi et al., ACM TOG 42(6) 2023); the volume is 60·40·10 + 40·40·10 + 20·40·10 − 10·10·10",
|
||||
"quantities": [
|
||||
{
|
||||
"id": "volume",
|
||||
"quantity": "volume of the tetrahedra",
|
||||
"measure": {
|
||||
"from": "tet",
|
||||
"pointer": "/volume"
|
||||
},
|
||||
"value": 47000.0,
|
||||
"tolerance": {
|
||||
"relative": 1e-12
|
||||
},
|
||||
"reason": "a planar boundary is tessellated exactly and the constrained Delaunay mesh fills it exactly: only rounding"
|
||||
},
|
||||
{
|
||||
"id": "invalid",
|
||||
"quantity": "elements that fail the certified Jacobian check",
|
||||
"measure": {
|
||||
"command": "mesh.quality",
|
||||
"pointer": "/invalid/count"
|
||||
},
|
||||
"value": 0.0,
|
||||
"tolerance": {
|
||||
"exact": true
|
||||
},
|
||||
"reason": "every element of a valid mesh has positive volume"
|
||||
},
|
||||
{
|
||||
"id": "undetermined",
|
||||
"quantity": "elements the Jacobian check could not decide",
|
||||
"measure": {
|
||||
"command": "mesh.quality",
|
||||
"pointer": "/undetermined/count"
|
||||
},
|
||||
"value": 0.0,
|
||||
"tolerance": {
|
||||
"exact": true
|
||||
},
|
||||
"reason": "a linear tetrahedron's sign is exact"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"note": "ModelCraft's accepted results for this case, written by `cargo xtask oracle --bless`. A result outside its band fails CI.",
|
||||
"values": {
|
||||
"invalid": {
|
||||
"band": 0.0,
|
||||
"value": 0.0
|
||||
},
|
||||
"undetermined": {
|
||||
"band": 0.0,
|
||||
"value": 0.0
|
||||
},
|
||||
"volume": {
|
||||
"band": 0.000047000000000000004,
|
||||
"value": 47000.0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
[
|
||||
{"command": "mesh.tet.generate", "params": {"body": "Steps", "tolerance": 0.05}, "id": "tet"}
|
||||
]
|
||||
Reference in new issue
Block a user