The problem: accuracy costs time
Finite element analysis represents a continuous structural problem with a finite mesh. A coarse mesh is fast but can miss important gradients; a uniformly fine mesh is expensive. Adaptive finite element analysis addresses this trade-off by refining elements where the numerical solution needs more resolution.
The difficult step is not only generating a new mesh. After refinement, displacement, gradients, and internal variables must be transferred from the old mesh to the new one without losing useful information. In large models, these transfer operators can dominate runtime.

What I designed and implemented
PyAdMesh combines adaptive meshing, point-in-element searches, shape-function evaluation, state-variable transfer, and Super-convergent Patch Recovery (SPR) error estimation in one reproducible workflow.
- Calculates field information at points using serial CPU, parallel CPU, and GPU paths.
- Transfers displacement and gradient information between non-matching triangular meshes.
- Builds nodal patches and recovers smoother fields using least-squares fitting.
- Estimates error contours and generates a new mesh from the displacement-gradient field.
- Repeats the refine–transfer–estimate cycle to concentrate elements around high-gradient regions.

How the computation is accelerated
Python provides the research iteration speed, while NumPy handles array-based numerical work, CuPy maps compatible operations to the GPU, and Numba compiles performance-critical kernels. This lets the same scientific workflow be compared across serial CPU, parallel CPU, and GPGPU execution.
In the published study, parallel execution reduced transfer time substantially for larger meshes. The article reports a speed-up of up to 14× for a 2,626-element scenario; the broader PyAdMesh project reports benchmark-dependent gains reaching 30× on GPU and 8× on CPU.
Results you can inspect
The figures below show the adaptive mesh concentrating elements around the high-gradient region, followed by the corresponding strain and displacement fields. They are included to make the numerical behavior visible rather than presenting performance claims without evidence.





