Product / PolyMesh FEA

The mesh and the solver should be allowed to talk.

PolyMesh is an adaptive hybrid polyhedral mesher and the linear-elastostatics solver it was co-designed with. Geometry, element choice, solution error, and refinement stay inside one loop instead of crossing a file boundary and forgetting what the other side learned.

  • Hybrid FE and VEM assembly in one global system
  • Error-driven hp-adaptivity with a stated ZZ indicator
  • C++20 · OpenCASCADE · Eigen · BSD-3-Clause

One mechanical system

Different cells. One assembly. One answer.

Tetrahedra, hexahedra, prisms, pyramids, and arbitrary polyhedra can meet in the same volume. Their contributions scatter into the same stiffness matrix and proceed through the same solve.

Tet, hex, prism, pyramid, and polyhedral cells enter one shared FE and VEM stiffness assembly, then one linear solve produces displacement, stress, and an error estimate.STANDARD ELEMENTS AND GENERAL POLYHEDRA SHARE THE SAME GLOBAL SYSTEMTET / HEXFEPRISM / PYRAMIDFEPOLYHEDRONVEMASSEMBLE_STIFFNESSone global KSOLVEonceFIELDu, σERRORZZ ηNO SECOND SOLVE · NO MORTAR COUPLINGCONSTANT-STRAIN PATCH TEST u = Gx: EXACT TO 1e-9 m ACROSS FE / VEM INTERFACES
One assembly path for standard finite elements and the Virtual Element Method.

Why co-design matters

A mesh is not finished when the solver first sees it.

Most FEA toolchains split meshing from solving. The mesher emits elements, the solver takes what it gets, and neither side can tell the other what it needs. The costly regions are discovered only after the irreversible handoff.

PolyMesh closes the loop: classify geometry by criticality, choose element shape, size, and polynomial order per region, solve, estimate the error, refine, and iterate toward a target accuracy at minimum cost. Because the solver consumes general polyhedra, an awkward cell does not have to be shattered into slivers merely to satisfy the solver.

One interface, measured

Standard tet4, tet10, hex8, hex20, prism, and pyramid elements and VEM cells for arbitrary polyhedra all scatter into the same assemble_stiffness path.

There is no second solve and no mortar coupling. The constant-strain patch test u = Gx is exact to 1e-9 m across FE/VEM interfaces.

The closed loop

Geometry demand goes in. Measured solution error comes back.

The first mesh is a proposal. Zienkiewicz–Zhu recovery compares the solved stress field with its recovered field, then hp-adaptivity spends the next pass where that indicator says it matters.

STEP and B-rep geometry is classified, a DOF-budget-gated advisor scores mesh actions, a hybrid mesher builds cells, FE and VEM assemble one system, the solver produces a field, and a Zienkiewicz-Zhu error estimate drives hp refinement until the target or resource budget is reached.ONE ADAPTIVE PASS · THE EXIT CONDITION IS REPORTED, NOT IMPLIEDCLASSIFYADVISEMESHASSEMBLECAD criticalityDOF-gatedhybrid cellsFE + VEMSOLVERECOVERESTIMATElinear elasticstress fieldZZ ηREFINEh and pRESULTη ≤ TARGET OR BUDGET REACHEDTHE RESULT CARRIES THE ACHIEVED INDICATOR, EVEN WHEN IT MISSES THE TARGET
Classify, choose, mesh, solve, recover, estimate, and refine — one feedback loop.

The learned mesh advisor is a deployed ONNX graph. It scores candidate combinations of mesher, element size, adaptivity, and polynomial order under a degree-of-freedom budget. A gate can refuse the choice; it does not manufacture a prediction when the case falls outside its calibrated envelope.

The desktop studio and self-hosted web app can show the network's actual input, hidden-layer, and output activations from the same forward passes that produced the decision. The animation is an inspection surface for the real graph, not a second model built for presentation.

Error, not confidence

The global ZZ value is a recovery-based discretization-error indicator. It is not a probability that the answer is correct, and PolyMesh does not relabel it as one.

When a pass stops above its target, the achieved value remains the headline fact.

Published showcase run

A wishbone, a real solve, and 29.77% stated plainly.

The recorded suspension-wishbone run carried a conserved 4.717 kN distributed load into a 40,170-cell tet4 mesh with 29,388 unknowns. It returned a 202.49 MPa peak von Mises stress and 1.198 mm peak displacement.

Its global Zienkiewicz–Zhu indicator was 29.77%. That is the number the project publishes. It is not laundered into a confidence score, hidden behind the stress picture, or omitted because it complicates the result. The run is useful precisely because the shortfall remains visible.

The advisor enumerated 108 candidates and made 109 forward passes. Candidate 29 won the score sweep; the wishbone lay outside the calibrated descriptor envelope, so the gate withheld that action and the configured baseline remained authoritative.

Suspension wishbone · published cinema manifest
Mesh40,170 tet4 cells
System29,388 unknowns
Distributed load4.717 kN
Peak von Mises202.49 MPa
Peak displacement1.198 mm
Global ZZ indicator29.77%
Advisor sweep108 candidates · 109 forward passes
Scored winnerCandidate 29; gated, not applied

Defining a run

Five steps, with the feedback path left intact.

The same headless pipeline serves the command line, desktop studio, and web app. Each surface starts from the same geometry and ends with the same mesh, fields, notes, and export.

  1. Load the exact part

    Import STEP or BRep geometry through OpenCASCADE. The CAD topology supplies the surfaces, curvature, thin-wall cues, and feature criticality that a faceted handoff would discard.

  2. State the mechanics

    Set the isotropic linear-elastic material, fixtures, loads, target element size, mesher, polynomial order, adaptive-pass budget, and ZZ target. Resource ceilings are explicit inputs to the run rather than an operating-system surprise.

  3. Choose and build the mesh

    The advisor can score measured candidate actions under the DOF budget, while geometry and boundary conditions drive the sizing field. The mesher emits the element mix the region calls for; the desktop and web surfaces can reveal those real cells as they arrive.

  4. Assemble once and solve

    Standard FE cells and arbitrary polyhedral VEM cells scatter into one global stiffness system. Linear elastostatics produces displacement, reactions, von Mises stress, and the fields used by recovery.

  5. Estimate, refine, and report

    ZZ recovery marks where the discretization needs work; hp-adaptivity changes local size or order and runs the loop again. The result reports the achieved indicator and termination reason, then exports its available fields to VTU.

Interfaces and implementation

One pipeline, shipped three ways.

The polymesh CLI exposes check, mesh, solve, diag, render, and calibrate. polymesh-gui is the local desktop studio. The self-hosted web app keeps model loading, meshing, solving, live progress, advisor activations, and result export in the browser while the C++ server runs the same pipeline.

PolyMesh is C++20. OpenCASCADE supplies CAD exchange and topology, Eigen supplies the algebra, and the project is released under BSD-3-Clause.

PolyMesh product surface
CAD kernelOpenCASCADE · STEP / BRep
Element familytet4, tet10, hex8, hex20, prism, pyramid, arbitrary polyhedron
AssemblyStandard FE and VEM in one assemble_stiffness
PhysicsLinear elastostatics · isotropic linear elasticity
AdaptivityError-driven h and p · Zienkiewicz–Zhu recovery indicator
AdvisorDeployed ONNX graph · DOF-budget-gated candidate scoring
Applicationspolymesh CLI · polymesh-gui · self-hosted web app
ImplementationC++20 · OpenCASCADE · Eigen
LicenseBSD-3-Clause

Where the line is

The limitations travel with the product.

These are current engineering boundaries, not footnotes that disappear after the first run.

Current limitations — permanent

PolyMesh solves linear elastostatics only, with an isotropic linear-elastic material only.

The CAD commands accept STEP/BRep. STL is internal and legacy, not a product CAD input; the solve path also accepts an already-generated Gmsh .msh volume mesh.

VTU result export currently carries displacement, von Mises stress, ZZ η, and element quality, but not the full stress tensor or reactions.

The default resource ceilings are 589,824 elements and 1,769,472 degrees of freedom. They are enforced rather than advisory.

At the extreme graded setting h=0.005 on a cylinder, the mesher can produce a closed, non-inverted mesh containing a sliver chain that the current CG policy cannot solve.

Next

Inspect the loop, then inspect its answer.

Run PolyMesh from the CLI, desktop studio, or self-hosted web app — and keep the achieved error indicator beside the field it qualifies.