This repository contains the code related to the experimental results shown in the manuscript: T. Teijeiro, P. Behnoudfar, J.M. Taylor, D. Pardo, V.M. Calo, Efficient Numerical Integration for Finite Element Trunk Spaces in 2D and 3D using Machine Learning: A new Optimisation Paradigm to Construct Application-Specific Quadrature Rules (https://arxiv.org/abs/2506.23741).
quadrature_rule_discovery.ipynb
: Main code, presented as an interactive Jupyter Notebook that can create exact quadrature rules for different 2D and 3D polynomial spaces built from Trunk Spaces.trunk_spaces.py
: Auxiliary module with the functionality required to create 1D, 2D and 3D polynomial Trunk spaces using hierarchic shape functions.gauss_quadrature.py
: Auxiliary module containing functionality to calculate exact integrals using Gaussian quadrature rules.2D_rules.json, 3D_rules.json
: Pre-computed exact quadrature rules for 2D and 3D spaces. Each rule has thep
attribute determining the maximum degree supporting exact integration, and then thex
,y
, andw
attributes, which are lists with the quadrature points. In 3D, the additionalz
attribute is present for each rule.
There's no installation required, as all the relevant methods are implemented in a single module. Still, there are some dependencies required that may be installed with the following command:
$ pip install -r requirements.txt
This software is licensed under the GPL-v3 license.