Learn PyMHM by method
Start with the feature and API overview, then choose a method. Every lesson follows meshes → local problem → global problem → assembly → solve → fields and errors, with the mathematical formulation next to its code. Ready-made physical solvers appear only as optional conveniences after the definition.
A final convergence study identifies the physical observable, refinement variable, approximation spaces and hypotheses of its cited estimate. A polynomial patch checks the implementation; the refinement studies use solutions outside the chosen local spaces and several terminal intervals to examine the asymptotic regime.
Convergence plots
Each refinement figure preserves the coarse levels. Dashed curves show the cited target powers anchored to the finest measured error. The successive-rate panel uses the actual refinement ratios, and a third panel shows the error amplitude divided by the target power:
Stable consecutive rates near \(q\), together with a plateau in \(A_i\), distinguish the asymptotic regime from a single favorable slope. The shaded window always contains the last four measured levels. The accompanying table reports its three successive orders and the variation of its normalized amplitude. Each page identifies whether its target comes from an error estimate or a published numerical observation. Spatial studies refine the macro or trace scale under the stated hypotheses; time studies keep spatial resolution fixed. The convergence notebook recomputes these diagnostics from the stored records.
Local and global formulations
| Method | Unknowns |
|---|---|
| Primal MHM | pressure and normal Darcy flux |
| MHM with mixed H(div) locals | Darcy flux, pressure and boundary pressure |
| Robin multiscale hybrid method | pressure and Robin multiplier |
| MH²M: pressure, conormal and trace | pressure, private conormal and continuous pressure trace |
| MsHHO: cell and face moments | cell/face pressure moments and energy reconstruction |
| Petrov–Galerkin MHM | base and enriched pressure with normal flux |
| MHM-USFEM | scalar values, coarse moments and normal multiplier |
| Unfitted MHM traces | pressure and independently segmented normal-flux traces |
| Stokes–Brinkman MHM | velocity, pressure and pseudo-traction |
| Oseen MHM | velocity, pressure and half-advection pseudo-traction |
| Primal elasticity MHM | displacement and physical traction |
| Displacement–pressure GaLS MHM | displacement, pressure and negative physical Cauchy traction |
| Mixed H(div) stress MHM | stress rows, displacement and weak rotation |
| Transient transport MHM | time-dependent scalar and interface multiplier |
| Elastodynamic MHM | displacement, velocity, acceleration and traction |
| Helmholtz MHM | complex pressure and normal multiplier |
| Maxwell MHM | electric, magnetic and tangential trace fields |
Reconstruction, indicators and refinement
| Strategy | What you will verify |
|---|---|
| Flux and potential reconstruction | recovered-field convergence, normal continuity, projected divergence and continuous-test equilibrium |
| Error indicators | physical residuals, estimator effectivity and recovery contributions |
| Adaptive spaces | error decrease against work with independent scale controls |
| Recursive MHM | equivalent nested condensation, inherited boundary and gauge |
Explore physical problems in the Gallery or select an execution environment. All cited publications are collected in the Bibliography.