{"slug": "fortran-cubatures-and-fortran-shapefuncs-fe-quadrature-and-shape-functions-of", "title": "Fortran_cubatures and fortran_shapefuncs: FE quadrature and shape functions of any order", "summary": "Will Klausler released two companion Fortran Package Manager (fpm) packages, fortran_cubatures and fortran_shapefuncs, providing finite element quadrature and shape functions of arbitrary element order, with shapefuncs at tag v0.2.0 pulling in cubatures as a dependency. Klausler wrote the modules for FEAP research and used Claude Code extensively to generalize them to arbitrary order, add serendipity elements, expand tests, and prepare the GitHub release, noting the code has not been independently reviewed. Each repository includes an AGENTS.md for coding agents and an llms.txt containing the full API in one plain-text file that also serves as the user manual.", "body_md": "Greetings,\n\nI’d like to share two companion fpm packages for writing finite element codes:\n\n```\nuse cubatures\nuse shapefuncs\ntype(cubature)  :: q\ntype(shapefunc) :: s\n\nq = cubature(CUB_HEX, 4)                     ! integration points\ns = shapefunc(q, 2)                          ! 27-node hexahedron at those points\nprint *, s%nnodes, sum(s%func(:,1))          ! 27  1.0\ns = shapefunc(q, 2, family=SHP_SERENDIPITY)  ! 20 nodes\n```\n\n**Packages’ contents**\n\nAs far as I could find, nothing else in Fortran covers this: stdlib and quadpack are one-dimensional, triasymq is FORTRAN 77 without line or wedge rules, and solvers like Elmer keep their shape functions internal. Corrections are welcome if I missed something.\n\n**How they were made**\n\nI originally wrote these modules for use in `FEAP` for my research. For this release, I used Claude Code extensively to generalize both modules to arbitrary element order, add serendipity elements, expand the tests, and polish them for GitHub release. I’ve started verifying the packages with an FE modal analysis project, also on my page. The code hasn’t been independently reviewed, so I’d especially welcome eyes on the higher order elements.\n\nEach repo also has an AGENTS.md with instructions for coding agents working on the package, and an llms.txt with the whole API in one plain-text file (it’s also the source of the user manual).\n\n**Install** (shapefuncs pulls in cubatures):\n\n```\n[dependencies]\nfortran_shapefuncs = { git = \"https://github.com/willklausler/fortran_shapefuncs\", tag = \"v0.2.0\" }\n```\n\nDocs: [cubatures](https://willklausler.github.io/fortran_cubatures/) · [shapefuncs](https://willklausler.github.io/fortran_shapefuncs/)\n\nDOI: [10.5281/zenodo.23300827](https://doi.org/10.5281/zenodo.23300827) · [10.5281/zenodo.23301496](https://doi.org/10.5281/zenodo.23301496)\n\n**Question:** would hierarchical bases, or node numberings that match Gmsh or VTK, be useful to you?", "url": "https://wpnews.pro/news/fortran-cubatures-and-fortran-shapefuncs-fe-quadrature-and-shape-functions-of", "canonical_source": "https://fortran-lang.discourse.group/t/fortran-cubatures-and-fortran-shapefuncs-fe-quadrature-and-shape-functions-of-any-order/11174#post_1", "published_at": "2026-10-14 14:59:17+00:00", "updated_at": "2026-10-15 00:20:57.266007+00:00", "lang": "en", "topics": ["developer-tools", "agent-protocols"], "entities": ["Will Klausler", "fortran_cubatures", "fortran_shapefuncs", "Fortran Package Manager", "Claude Code", "FEAP", "GitHub", "Zenodo"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/fortran-cubatures-and-fortran-shapefuncs-fe-quadrature-and-shape-functions-of", "markdown": "https://wpnews.pro/news/fortran-cubatures-and-fortran-shapefuncs-fe-quadrature-and-shape-functions-of.md", "text": "https://wpnews.pro/news/fortran-cubatures-and-fortran-shapefuncs-fe-quadrature-and-shape-functions-of.txt", "jsonld": "https://wpnews.pro/news/fortran-cubatures-and-fortran-shapefuncs-fe-quadrature-and-shape-functions-of.jsonld"}}