Alvise Sommariva
Software
» Kansa MQ (March 2, 2025):
Matlab files for Kansa collocation for elliptic equations by MultiQuadrics
The main demo "demo_driver.m" performs battery of experiments in the paper:
"Unisolvence of randomized MultiQuadric Kansa collocation for convection-diffusion with mixed boundary conditions" by M. Mohammadi, A. Sommariva and M. Vianello.
The demo "demo_driver_02.m" makes a battery of tests for discussing the relationship between separation distance, fill distance, conditioning and quality of the method.
The demo "demo_tests.m" performs single experiments for the demo above in the paper:
"Unisolvence of randomized MultiQuadric Kansa collocation for convection-diffusion with mixed boundary conditions" by M. Mohammadi, A. Sommariva and M. Vianello.
It consists in defining a mixed Dirichlet-Neumann problem on the square [0,1] x [0,1] of which the solution "sol" is known, and approximate numerically "sol" at collocation points "pts_coll" via linear combination of RBF centered at "pts_centers".
The differential problem has the form
lapl(u)+<grad(u),b>=f in (0,1) x (0,1),
u=g on the vertical sides, incl. vertices
grad(u)*out_normal=g on the horiz. sides (no vertices).
The collocation points are defined as tensor product of "N" equispacedpoints in [0,1].
The RBF centers are choosen randomly, one for each collocation point P, n the disk B(P,delta).
The RBF are
1. TPS of the form "r^k*log(r)",
2. Radial Powers of the form "r^k",
3. Multiquadrics of the form "sqrt(1+(ep*r)^2)".
The paper above is focussed on Multiquadrics, but all the codes may work with other RBF as TPS.
Papers :
M. Mohammadi, A. Sommariva and M. Vianello, Unisolvence of randomized MultiQuadric Kansa collocation for convection-diffusion with mixed boundary conditions,
Codes:
Last versions:
» MATLAB: Kansa_MQ.zip (.zip file).
Presentations:
-
>> First update: August 12, 2024.
>> Last update: March 02, 2025.
» CheapQ (February 4, 2025):
Matlab codes for cheap and stable tetrahedra-free quadrature on polyhedra.
Usage notes:
a) The zip file contains 4 demos.
The files demo_01 and demo_02 illustrate the numerical examples performed in the section "Implementation and examples" of the paper "Cheap and stable quadrature on polyhedral elements" by Alvise Sommariva, Marco Vianello.
The files demo_03 and demo_04 show how to use the software on integrating functions and to perform comparisons between the available methods, also using cubature compression
b) The cheap main routines are
cubature_polyhedron_cheap.m
cheap_startup.m
Subroutines used are
cubature_triangle.m
dCHEBVAND.m
mono_next_grlex.m
polygauss_2013 / polygauss_2018 .m
tenscheb_norm2sq.m
Papers:
A. Sommariva and M. Vianello, Cheap and stable quadrature on polyhedral elements
Codes:
CheapQ (at github),
CheapQ.zip (.zip file).
Presentations:
» Last update: February 5, 2025.
» Optimal Meshes on Algebraic Sets (January 25, 2025):
Matlab codes for determining Admissible Meshes on certain Algebraic Sets.
The zip file contains Matlab codes for performing the examples in the numerical section of the paper "Polynomial meshes on algebraic sets". The latter can be run by selecting proper parameters in demo_driver.m.
Papers :
L. Bialas-Ciez, A. Kowalska, A. Sommariva, Polynomial meshes on algebraic sets
Codes:
Last versions:
» MATLAB: , MeshAlgebraicSets.zip (.zip file).
Presentations:
-
>> Last update: January 25, 2025.
» Kansa TPS (August 12, 2024):
Matlab files for Kansa collocation for elliptic equations by polyharmonic splines.
This demo performs battery of experiments named as "test 1" and "test 2" in the paper: "Unisolvence of Kansa collocation for elliptic equations by polyharmonic splines with random fictitious centers", by M. Mohammadi, A. Sommariva and M. Vianello.
............................... Test 1 .................................
It consists in defining a Dirichlet problem on the square [0,1] x [0,1] of which the solution "sol" is known, and approximate numerically "sol" at collocation points "pts_coll" via linear combination of RBF centered at "pts_centers".
The differential problem has the form
lapl(u)=f in (0,1) x (0,1),
u=g at the boundary of [0,1] x [0,1]
The collocation points are defined as tensor product of "N" equispaced points in [0,1]. The RBF centers are choosen randomly, one for each collocation point P, in the disk B(P,delta). The RBF are TPS of the form "r^k*log(r)" or Radial Powers of the form "r^k". In output we provides the RMSE (vector whose i-th component is the RMS for the i-th test).
............................... Test 2 .................................
It consists in defining a mixed Dirichlet-Neumann problem on the square [0,1] x [0,1] of which the solution "sol" is known, and approximate numerically "sol" at collocation points "pts_coll" via linear combination of RBF centered at "pts_centers".
The differential problem has the form
lapl(u)+<grad(u),b>=f in (0,1) x (0,1),
u=g on the vertical sides, incl. vertices
grad(u)*out_normal=g on the horiz. sides (no vertices).
The collocation points are defined as tensor product of "N" equispaced points in [0,1]. The RBF centers are choosen randomly, one for each collocation point P in the disk B(P,delta). The RBF are TPS of the form "r^k*log(r)" or Radial Powers of the form "r^k".
Note: a more general code can be found in Kansa_MQ.zip where RBF can be more general. The usage is the same. In particular in the demo "demo_driver_02.m" makes a battery of tests for discussing the relationship between separation distance, fill distance, conditioning and quality of the method.
Papers :
M. Mohammadi, A. Sommariva and M. Vianello, Unisolvence of Kansa collocation for elliptic equations by polyharmonic splines with random fictitious centers,
Codes:
Last versions:
» MATLAB: Kansa_TPS.zip (.zip file).
» MATLAB: Kansa_MQ.zip (.zip file).
Presentations:
-
>> First update: August 12, 2024.
>> Last update: February 18, 2025.
» CPOLYMESH (June 28, 2024):
Matlab codes for determining Admissible Meshes and a certified approximation of Lebesgue constants on complex regions.
Usage notes:
Matlab version of CPOLYMESH The Matlab package includes two demos, that we briefly comment.
demo_cdes_1: by this routine we show
how to define the complex domain (several ways),
compute an admissible mesh (AM) of a fixed degree,
extract extremal sets,
compute a certified Lebesgue constant.
demo_cdes_2: by this routine we perform all batteries of numerical tests that are described above. In particular, varying the degrees, we
compute an admissible mesh (AM) of a fixed degree;
extract the AFP, DLP, PLP extremal sets;
for each of them we compute a certified Lebesgue constant;
plot Lebesgue contants, domain and extremal points.
Note: Changing the value of the variable domain_type, from 1 to 22, one can test our routines also on other complex geometries, as hypocycloids, epicycloids, epitrochoids, limacons, rhodoneas, eggs, bifoliums, Talbot curves, tricuspoids, torpedos, ellipses and heart-shaped domain.
Observe that there is also a Python version whose author is Dimitri J. Kenne.
» Sources:
Papers:
Dimitri J. Kenne, Alvise Sommariva and Marco Vianello, CPOLYMESH: Matlab and Python codes for complex polynomial approximation by Chebyshev admissible meshes.
Leokadia Bialas-Ciez, Dimitri Jordan Kenne, Alvise Sommariva, Marco Vianello, Chebyshev admissible meshes and Lebesgue constants of complex polynomial projections.
Codes:
Last versions:
» MATLAB: CPOLYMESH at Github, CPOLYMESH (.zip file).
Presentations:
» First update: June 28, 2024. Last update: June 28, 2024.
» Matlab codes for quadrature and hyperinterpolation on spherical polygons (March 22, 2024)
Matlab codes for determining quadrature rules and hyperinterpolation on spherical polygons.
» Object: Near-algebraic quadrature rules on spherical polygons.
Construction of rules thar have (numerically) fixed algebraic degree of precision "n".
Tchakaloff formulas, with a cardinality at most "(n+1)^2" can be extracted by means of a new implementation of Lawson-Hanson algorithm.
Polynomial hyperinterpolation at degree "n" is determined by means of the rules above of degree "2n" and discrete orthogonal polynomials.
The suite is subdivided in two folders, EASY and NUMERICAL_EXPERIMENTS.
In EASY there are two subfolders CUB and HYP in which we provide the codes for cubature and hyperinterpolation (respectively).
In CUB there is the demo demo_cub_sphpgon that shows how to use the main routine cub_sphpgon and a basic adaptive code adaptive_cub_sphpgon.
In HYP there is the demo demo_hyp_sphpgon that shows how to compute hyperinterpolants on spherical polygons.
In NUMERICAL_EXPERIMENTS there are three subfolders CUB01 and HYP01, HYP02 in which we provide the codes used for experiments about cubature and hyperinterpolation and its variants (respectively).
» Sources:
Papers:
Last version: [MATLAB CODES (zip file)]
» Last update: March 22, 2024.
» LEBEVAL (November 23, 2023):
Matlab codes for Lebesgue constant evaluation on interval, square, disk, cube, simplex and ball.
Usage notes:
The main folder contains several subfolders that lead to the wanted domain. In particular we examine the Lebesgue constants for some interpolation sets in the
interval,
simplex,
square,
disk,
cube,
ball,
as well as we analyse the Lebesgue constant for Least-Squares on
square,
disk.
Each folder contains:
demo_basic.m that is a basic demo for understanding how the Lebesgue costant estimator lebconst_eval_*.m works;
demo_leb_*.m makes all the experiments cited in the paper L. Bialas-Ciez, D. Kenne, A. Sommariva and M. Vianello, Evaluating Lebesgue constants by Chebyshev polynomial meshes on cube, simplex and ball.
The folder _DATA contains the plots of the papers, a file "numerical_experiments.txt" with the statistics of the experiments, and if it is useful, the files set_AFP_disk, set_DLP_disk containing respectively Approximate Fekete Points and Discrete Leja Points for mild degrees.
» Sources:
Papers:Leokadia Bialas-Ciez, Dimitri Jordan Kenne, Alvise Sommariva, Marco Vianello, Evaluating Lebesgue constants by Chebyshev polynomial meshes on cube, simplex and ball.
Codes:Last versions:
» MATLAB: LEBEVAL at Github, LEBEVAL (.zip file).
Presentations:-
» First update: November 23, 2023. Last update: November 23, 2023.
» SCATTCUB: scattered data cubature on general regions. (July 7, 2023)
Matlab codes for scattered data cubature on general regions.
Usage notes:
The main Matlab code used in our numerical tests, can be found in the folder "General" and is named "demo_scattcub_driver_01.m". There You can change the domain, the algebraic degrees of exactness of the rule, cardinali- ty and type of the scattered data.
For a simple usage of the algorithm, we have added the routine "demo_scattcub", where one can use one of the algorithms to compute the wanted integrals. It makes comparisons with the algebraic rule used in the integral evaluation knowing the function evaluations at the nodes.
IMPORTANT: The directory "EXTERNAL_ROUTINES" contains methods and cubature rules used in the paper.
» Sources:
Papers:
R. Cavoretto, F. Dell'Accio, A. De Rossi, F. Di Tommaso, N. Siar, A. Sommariva, and M. Vianello, Numerical cubature on scattered data by adaptive interpolation.
Codes:
SCATTCUB (.zip file).
Presentations:-
» First update: July 07, 2023. Last update: July 07, 2023.
» Hyper23: hybrid hyperinterpolation on general regions (August 27, 2023)
Hybrid hyperinterpolation on general regions.
Papers:
Congpei An, Jia-Shu Ran, Alvise Sommariva, Hybrid hyperinterpolation over general regions.
Codes:
Presentations:-
» First update: June 02, 2023. Last update: August 27, 2023.
» Qsurf: a software package for compressed QMC integration on parametric surfaces (April 17, 2023)
Compression of QMC rules on surfaces that admit an analytic parametrization.
» Description
The main folder contains the following files:
demo_CQMC_sphpoly: In this demo we compute a cubature rule over spherical polygons via QMC rules. Once the domain is available, we compute a full rule QMC and a compressed one, say CQMC, sharing the same integrals for polynomials up to a total degree.
demo_CQMC_torus: same as above on a subdomain of a toroidal surface;
demo_CQMC_franke: same as above on a subdomain of a surface given by Franke's function.
pts_domain: corresponds to items (i) and (ii) of Algorithm Qsurf (see attached paper);
cqmc_v2: corresponds to items (iii) and (vi) of Algorithm Qsurf (see attached paper);
dCHEBVAND_v2: basis selection in item (iii) of Algorithm Qsurf (see attached paper);
lawsonhanson, LHDM: NNLS implementation;
dCATCH, implements Caratheodory-like compression via NNLS.
» Sources:
Papers:
G. Elefante, A. Sommariva and M. Vianello, PDF Qsurf: compressed QMC integration on parametric surfaces, (submitted),
Codes:
Presentations:
» First update: April 13, 2023. Last update: September 5, 2023.
» qBubble: a software package compressed QMC volume and surface integration on union of balls (March 2, 2023);
compression of a QMC rule, over domains that are given by union of balls as well as the surfaces given by their boundaries.
» Object:
The main folder contains the following files:
demo_CQMC: In this demo we compute a cubature rule on a union of balls or on its surface via QMC rules. Once the domain is available, we compute a full rule QMC and a compressed one, say CQMC, sharing the same integrals for polynomials up to a total degree.
demo_CQMC_battery: numerical cubature over volumes/surfaces defined by union of balls/spheres. The routine tests the quality of quadrature rules with degree of precision "deg" over polynomials of the form f=@(x,y,z) (a1+b1*x+c1*y+d1*z).^deg; where "a1", "b1", "c1", "d1" are random numbers. Finally it plots, if requires, the relative errors of each test, for some "deg" and logarithmic averages.
cqmc_v2: the routine computes a Compressed Quasi-Monte Carlo formula from a large low-discrepancy sequence on a low-dimensional compact set preserving the QMC polynomial moments up to a given degree, via Tchakaloff sets and NNLS moment-matching.
» Sources:
Papers:
G. Elefante, A. Sommariva and M. Vianello, Compressed QMC volume and surface integration on union of balls, (submitted),
Codes:
Presentations:
Constructive approximation of functions 3 (Krakow, Poland, 22-24 February 2023)
» [PDF] ,
» First update: November 29, 2022. Last update: November 29, 2022.
» TetraFreeQ: a software package for Tchakaloff-like quadrature on polyhedral elements, without tetrahedralization (November 29, 2022).
» Object: TetraFreeQ: a software package for Tchakaloff-like quadrature on polyhedral elements.
we provide a tetrahedra-free algorithm to compute low-cardinality quadrature rules with a given degree of polynomial exactness, positive weights and interior nodes on a polyhedral element with arbitrary shape;
if a tetrahedralization is available, we also provide an algorithm to compute low-cardinality quadrature rules with a given degree of polynomial exactness, positive weights and interior nodes on a polyhedral element with arbitrary shape;
The main folder contains the following files:
demo_01: battery of tests will be performed, on different polyhedra, for the methods working with or without triangulation; the software compares the performance of the method, on random polynomials of total degree "ade".
demo_02: single cubature test over polyhedra (convex or concave, even with odd shapes); the demo expains the subroutines usage.
cubature_polyhedron_free: cubature over polyhedral elements without tetrahedralization;
cubature_polyhedron_tri: cubature over polyhedral elements via tetrahedralization;
» Sources:
Papers:
A. Sommariva and M. Vianello, TetraFreeQ: Tetrahedra-free quadrature on polyhedral elements.
Codes:
Presentations:
FAATNA 20-> 22 (Matera, Italy, July 5-8, 2022)
» [PDF] ,
» First update: November 29, 2022. Last update: November 29, 2022.
» UNIONOFDISKS: a software package for determining cubature rules over union of disks (October 2022).
» Object: UNIONOFDISKS: a software package for determining cubature rules over union of disks.
detects the connected components of the union;
detects the outer and possible inner boundaries of each connected component (i.e. detects also the possible holes providing their boundary);
constructs nodes and weights of a PI-formula exact for polynomials of a given total-degree, with cardinality increasing proportionally to the overall number of disks times the degree squared;
allows then to compute immediately at machine precision some relevant features in applications, such as the area of the union and its first and second monomial moments (i.e. its ``center of mass'' and ``moment of inertia'' for a constant density);
finally, provides a compressed PI-formula with cardinality not exceeding the dimension of the exactness polynomial space, irrespectively of the overall number of disks.
The main folder contains the following compressed folders:
COMPARISONS, contains all the subroutines used for our numerical experiments (including previous software that is compared with the new approach); the main demo is the file demo make experiments that performs the numerical experiments presented in the paper Cubature rules with positive weights on union of disks, comparing the new rules determined by cub_uniondisks, including the compressed version, and the old routine achieved by gqmultibubble;
demo_make_experiments: it performs the experiments presented in the paper;
demo_cubature_uniondisk: it compares the results of new rules (including the compresse one) on integrating some functions on certain test domains;
ROUTINES, contains all the routines necessary for cubature over disks; the main routines are
cub_uniondiscs: implements the algorithm for determining a cubature formula on the union of disks, including the Tchakaloff rules (i.e. their compressed version);
demo_cub_uniondiscs: demo explaining how to use the subroutines and comparing the new rules on some domains.
» Sources:
Papers:
A. Sommariva and M. Vianello, Cubature rules with positive weights on union of disks.
Codes:
» First update: October 18, 2022. Last update: October 18, 2022.
» Matlab codes for determining cubature rules over intersection of disks (October 2022).
» Matlab codes for determining cubature rules over intersection of disks (October 2022).
computation of algebraic cubature rules over the intersection of disks (formula with positive weights and internal nodes).
finally, provides a compressed PI-formula with cardinality not exceeding the dimension of the exactness polynomial space, irrespectively of the overall number of disks.
» Object: INTERSECTIONOFDISKS: a software package for determining cubature rules over intersection of disks (2017-2022).
The main routine for computing the intersection of disks is gqintdisk.m that requires additional routines saved in the folder;
the demo to test the performance of the previous routine is demo_intersection.m.
Papers:[1] A. Sommariva and M. Vianello, Numerical quadrature on the intersection of planar disks, FILOMAT 31:13 (2017), 4105--4115 (open access).
Codes:Last versions:
» INTERSECTIONOFDISKS_2022.zip [MATLAB CODES],
» First update: October 24, 2022. Last update: October 24, 2022.
» CQMC: a software package for low-dimensional Compressed Quasi-MonteCarlo cubature (August 2022).
» Object:
Improved version of Compressed Quasi-MonteCarlo cubature (CQMC) on large low-discrepancy samples is implemented, on 2D and 3D regions with complex shape. The algorithms rests on the concept of Tchakaloff set and on NNLS solution of a sequence of small moment-matching systems.
The main folder contains the following compressed folders:
ROUTINES_2D.zip, that include many routines for computation of integrals via QMC/CQMC methods on domains obtained by set operation from two bivariate domains whose boundary is defined by piecewise NURBS;
ROUTINES_3D.zip, that include many routines for computation of integrals via QMC/CQMC methods on domains obtained by set operation from a trivariate polyhedron and a sphere;
README_FIRST.txt, that explains how to replicate the tests in the paper.
In both cases, the main routines are:
make_rule, that defines a QMC rule over the domain and then extracts the CQMC rule via cqmc_01;
cqmc_01, routine that from a sufficiently dense QMC rule computes a low cardinality CQMC rule that matches the QMC moments up to a certain total polynomial degree.
» Sources:
Papers:
G. Elefante, A. Sommariva and M. Vianello, CQMC: an improved code for low-dimensional Compressed Quasi-MonteCarlo cubature, (submitted),
Codes:
Presentation:
Presentation at York (January 2023): [PDF]
» Last update: January 05, 2022.
» IN_RS: Matlab routine for points indomain on NURBS-shaped planar domains (2022)
A new indomain routine suitable to establish what points in a bivariate set are inside NURBS-shaped domains (as well as with boundaries that are composite Bezier spline or defined by parametric splines).
» Object:
The main folder IN_RS contains:
» inRS.m, a new routine for indomain over NURBS-shaped domains;
» inRS_21.m, an old routine for indomain over NURBS-shaped domains;
» inRSpoly2.m, a routine for indomain over NURBS-shaped domains (based on approximating the domain with a polygon, it requires inpoly2 by D. Engwirda);
» demo_nurbs_indomain_01.m, demo_nurbs_indomain_02.m, demo_nurbs_indomain_03.m are demos, useful to define the domains and to understand how to use the indomain routine.
» demo_nurbs_indomain_04.m, evaluates the performance of our two indomain routines for NURBS presented in [1] and [2], comparing them to one in which the NURBS boundary is approximated by a polygon, finally using inpoly2 by D. Engwirda. To make that comparison, please download the routine inpoly2 and save it in the IN_RS folder.
» the routine demo_nurbs_indomain_05.m shows how to define the problem when only some vertices of the curved polygon are available;
» the routine demo_nurbs_indomain_06.m considers the case of a domain whose boundary is defined only by a point cloud of possibly inexact data; this routine requires spcsp.m (cubic smoothing periodic spline), by M. Zanetti, available at the Matlab Central File Exchange;
» the routine demo_nurbs_indomain_07.m shows how to define the problem when the whole domain is defined via point cloud and NURBS use the vertices, provided by alphashape polygonal approximation of the boundary, as control points;
» the routine demo_nurbs_indomain_08.m shows how to define the problem when the whole domain is defined via point cloud and parametric cubic smoothing periodic spline are used on the data provided by alphashape polygonal approximation of the boundary; this routine requires spcsp.m, by M. Zanetti, available at the Matlab Central File Exchange;
» Sources:
Papers:
A. Sommariva and M. Vianello, Low-cardinality Positive Interior cubature on NURBS-shaped domains, [PDF]
A. Sommariva and M. Vianello, inRS: implementing the indicator function for NURBS-shaped planar domains [PDF].
Codes:
Presentation:
Presentation at SA 2022: [PDF (Beamer)]» First update: January 07, 2022.
>> Last update: February 22, 2022.
» CUB_RS: Matlab toolbox for algebraic cubature on NURBS-shaped domains (2021)
» Object:
Software for computing algebraic cubature rules of degree n on domains defined parametrically by rational splines. It is suitable for domains whose boundary are defined by arcs that are NURBS, Bezier curves as well as general parametric splines. These rules are of PI type, i.e. with nodes that are in the integration domain and positive weights. They do not require a triangulation of the domain and have cardinality at most equal to (n+1)(n+2)/2.
In this toolbox we also develop an indomain routine suitable to establish what points in a bivariate set are inside these domains.
The main folder CUB_RS contains:
PAPER_EXPERIMENTS that includes all the Matlab routines useful for reproducing the experiments described in the work [1] and [2] (see references below);
BEZIER_ROUTINES that includes all the Matlab routines useful for integration over domains whose boundary is defined by composite Bezier arcs;
NURBS_ROUTINES that includes all the Matlab routines useful for integration over domains whose boundary is defined by NURBS;
SPLINE_ROUTINES that includes all the Matlab routines useful for integration over domains whose boundary is defined by general parametric splines.
All these folders contain several demos, useful to define the domains, to understand how to use the indomain routine as well as the cubature routine. Some examples on hyperinterpolation are also available.
The main routines are:
inRS that implements a fast indomain algorithm for these instances; the last update presents a faster indomain algorithm inRS, presented in [2]; the older version introduced in [1] is present in the file inRS_21;
cubRS that determines an algebraic cubature formula of the desired degree of exactness, with low cardinality, internal nodes and positive weights.
» Sources:
Papers:
A. Sommariva and M. Vianello, Low-cardinality Positive Interior cubature on NURBS-shaped domains, [PDF];
A. Sommariva and M. Vianello, inRS: implementing the indicator function for NURBS-shaped planar domains.
Codes:
Last version: [MATLAB CODES (zip file)],
Presentation:
Presentation at SA 2022: [PDF (Beamer)]
» Last update: January 05, 2022.
» Matlab code for cubature over polygonal domain with a circular edge (2021)
Cubature on a domain defined by the union/difference of a circle with a polygon.
» Object:
The main routine ispolygcirc_2021.m that computes an algebraic cubature rule on a domain defined by the union/difference of a disk with a polygon.
The software includes the demo file:
demo_plot that tests the cubature results on some domains.
» Sources:
Paper:
E. Artioli, A. Sommariva and M. Vianello, Algebraic cubature on polygonal elements with a circular edge, [PDF],
Codes:
» Last update: December 02, 2021.
» Matlab adaptive code for cubature over polygonal regions (2021)
Matlab basic adaptive code for cubature of an integrand over polygonal regionsBasic adaptive code for cubature of an integrand over polygonal regions (it requires the polyshape Matlab environment)
Description:
The main routine is cub_polygon_adaptive.m that computes adaptive quadrature of an integrand over polygonal regions.
The software includes the demos file demo_adaptive_polygons.m that tests the cubature results on some domains and integrands.
Sources:
Codes:
Last version: [MATLAB CODES (zip file)],
» Last update: July 13, 2021.
» RBFCUB: Matlab package for near-optimal meshless cubature on general polygons (2021)
Description
Matlab codes for computing moments and cubature rules on polygonal regions (via triangulation or alternatively by Gauss-Green theorem in polar coordinates). The regions can be general, i.e. polygons that are not simply connected or even disconnected. It requires Matlab built-in environment polyshape. With respect to a previous version, depending on the values of the integrand at the centers, we optimize the shape parameter so to achieve better cubature results.
The main routines are:
RBF_cub_polygon_OPT.m that determines the RBF based cubature rule on the polygonal region;
RBF_moms_polar.m and RBF_moms_tri.m that determines the RBF moments on the polygonal region;
RBF_optimal_scale.m that chooses the optimal RBF scale parameter;
The software includes several demos:
demo_RBF_cub_OPT.m that performs a battery of tests, allowing different integrands, polygonal regions, RBF, number of centers and choices of the RBF shape parameter.
demo_RBF_cub_OPT_basic that performs a simple example, on a certain integrand, polygonal region, RBF, number of centers and with almost optimal RBF shape parameter (useful to adapt the code to user experiments).
For the demos of the previous version published in RBF moment computation and meshless cubature on general polygonal regions, see:
RBF_cub_polygon.m that determines the RBF based cubature rule on the polygonal region (not optimized shape parameter);
Source
Papers:
R. Cavoretto, A. De Rossi, A. Sommariva and M. Vianello, RBFCUB: a numerical package for near-optimal meshless cubature on general polygons;
A. Sommariva and M. Vianello, RBF moment computation and meshless cubature on general polygonal regions
Codes:
» Last update: July 9, 2021.
» Software package for polynomial interpolation on spherical triangles (2021)
Description.
Matlab codes for determining "norming meshes" and "good interpolation points" on spherical triangles.The meshes, if a numerically verified conjecture holds, are norming meshes and Approximate Fekete Points, useful for polynomial interpolation, can be determined for mild degrees.
The zip file contains three folders:
BASIC_USAGE: here we have introduced a demo demo_am_00.m on the norming mesh and its properties as well as the main routine am_sphtri.m for the determination of the norming mesh, depending on a spherical triangle contained in a certain hemisphere.
ADVANCED_USAGE: here there are two demos for the computation of norming meshes on spherical triangle T, as well as a set of Approximate Fekete Points, useful for polynomial interpolation.
demo_am_01.m demo on using "dPOLYFIT", "dPOLYVAL", "dLEB" for algebraic polynomial interpolation/least squares approximation on spherical triangle. The approximation points are taken from AMs on the spherical triangle; the new routine introduced here is "am_sphtri" that determines an Admissible Mesh over a spherical triangle.
demo_am_02.m this routine computes a AM on a spherical triangle and extracts AFEK pointset; next it determines its main features and plots AM and AFEK.
FIGURES: it contains all the Matlab files useful for determining the figures and their experiments, as cited in the reference paper Chebyshev-Dubiner norming grids and Fekete-like interpolation on spherical triangles.
Papers:
Codes:
» Last update: February 18, 2021.
» Matlab codes for quadrature and hyperinterpolation on spherical triangles (2021)
Matlab codes for determining quadrature rules and hyperinterpolation on spherical triangles.
Description:
The rules have (numerically) fixed algebraic degree of precision "n". Tchakaloff formulas, with a cardinality at most "(n+1)^2" can be extracted by means of a new implementation of Lawson-Hanson algorithm.
Polynomial hyperinterpolation at degree "n" is determined by means of the rules above of degree "2n" and discrete orthogonal polynomials.
The main routine iscub_sphtri.m that determines full and compressed quadrature rules with fixed (numerical) algebraic degree of precision on spherical triangles; it requires dCATCHsph.m, dCHEBVAND.m, gqcircsect.m, LHDM.m, trigauss.m.
The software includes the demos files:
demo_01.m that tests the cubature rules on spherical harmonics (it requires sphharmVAND.m and plot_s2.m),
demo_02.m that tests the cubature rules on a battery of tests functions.
demo_hyperinterpolation_01.m that tests the hyperinterpolants of several functions on some spherical triangles,
demo_hyperinterpolation_02.m that shows how to determine the hyperinterpolant on a single example.
demo_hyperinterpolation_03.m that shows estimates of the Lesbegue constant based on Christoffel function.
Papers:
Codes:
Last version: [MATLAB CODES (zip file)], [MATLAB CODES (zip file), at Github]
Older version: [MATLAB CODES (zip file)]
» Last update: March 22, 2021.
» RBF moment computation and meshless cubature on general polygonal regions (2020)
Matlab codes for computing moments and cubature rules on polygonal regions.
Description:
Matlab codes for computing moments and cubature rules on polygonal regions (via triangulation or alternatively by Gauss-Green theorem in polar coordinates). The regions can be general, i.e. polygons that are not simply connected or even disconnected. It requires Matlab built-in environment polyshape. See the codes in the work "RBFCUB: Matlab package for near-optimal meshless cubature on general polygons (2021)" for more accurate results with an almost optimal shape parameter.
The main routines are
RBF_moms_polar.m and RBF_moms_tri.m that determine the RBF moments on the polygonal region;
RBF_cub_polygon.m that determines the RBF based cubature rule on the polygonal region;
The software includes several demos that test moments as well as the cubature rules. In particular the tests in the paper can be obtained by means of demo_RBF_moms.m and demo_RBF_cub.m.
Sources:
Paper:
Codes:
» Last update: December 28, 2020.
» Cubature rules on spherical rectangles (2020)
Matlab codes for computing cubature rules on geographic subregions of the sphere (spherical rectangles of longitude-latitude type).
Description:
Matlab codes for computing cubature rules on geographic subregions of the sphere (spherical rectangles of longitude-latitude type). It includes cubature over spherical caps.
The main routine is cub_sphrect.m that computes rules with a fixed algebraic degree of precision on a spherical rectangle.
Another relevant function is cub_sphrect_adaptive_2020.m that is a basic adaptive code for cubature on a spherical rectangle.
The software includes two demos, on integration of a general function as well as test on the algebraic degree of precision of the rule.
Sources:
Papers:
Codes:
New version: [MATLAB CODES (zip file)]
Old version: [MATLAB CODES (zip file), interpolation], [MATLAB CODES (zip file), cubature]
» Last update: December 20, 2020.
» Incurvpolygon_cheb (2020)
An indomain routine on bivariate Jordan domains whose boundary is defined by chebfuns.
Description:
Incurvpolygon_cheb: indomain routine on bivariate Jordan domains whose boundary is defined by chebfuns. The files are stored in the compressed folder, that contains:
» incurvpolygon_cheb.m: it is an indomain routine on domains defined whose boundary is defined by chebfuns;
» in the folder there is a demo demo_incurvpolygon_cheb.m, that tests the provided software.
Sources:
Codes:
Last Version: [INCURVPOLYGON_CHEB_2020.zip]
» Last update: October 10, 2020.
» ChebfunGauss (2020)
A Matlab code for cubature on Jordan bivariate domains defined analytically and approximated by Chebfuns.
Description:
ChebfunGauss: a Matlab code for cubature on Jordan bivariate domains defined analytically and approximated by Chebfuns. The files are stored in the compressed folder, that contains:
» chebcub_2019.m: it is a more stable version of the previous software and quickly produces a rule with many points, of the choosen degree of precision;
» chebfuncub_compression.m: by this routine one can compress the previous rule to one with the same degree of precision but fewer nodes; first it tries to compute one with internal nodes and positive weights, then one with internal nodes and possible negative weights, then one with possible external nodes and positive weights and finally one with possible external nodes and possible negative weights;
» chebcub_2020.m: it is a version that produces a rule with few points, of the choosen degree of precision (the rule has internal nodes and usually positive weights);
» incurvpolygon_cheb.m: it is an indomain routine on bivariate Jordan domains defined whose boundary is defined by chebfuns;
» in the folder there are several demo,
demo_2019.m,
demo_2020.m,
demo_random_polynomials.m,
demo_19vs20.m,
demo_incurvpolygon_cheb.m,
that test the provided software.
Sources:
Codes:
New Version: [CHEBFUNGAUSS_2020.zip]
Old Version: [CHEBFUNGAUSS_2011.zip]
» Last update: October 10, 2020.
» InCurvPolygon (2020)
Matlab codes for computing if a point is inside or on the boundary of a spline-curvilinear polygon (in domain type routine).
Description:
In this software, we define a Matlab code for establishing numerically if a point is inside or on the boundary of a spline-curvilinear polygon (the so called "in domain" algorithms). The main routine is incurvpolygon.m. Several demos are available, that show how to use incurvpolygon.m.
Sources:
Papers:
Tchakaloff-like cubature rules on spline curvilinear polygons with M. Vianello.
Codes:
» First Version: April 2019, Last update: September 29, 2020.
» Splinegauss NO type and compression (2020)
Fast Matlab codes for computing algebraic cubature rules on spline-curvilinear polygons (rules with possible negative weights and nodes outside the domain)
Description:
Fast Matlab codes for computing algebraic cubature rules on spline-curvilinear polygons (rules with possible negative weights and nodes outside the domain). By compression with splinegauss_compression.m the code tries to achieve low cardinality rules with positive weights and nodes inside the domain.
The main routine is the m. file splinegauss_2020.m that performs cubature over domains with spline curvilinear boundaries. In case one wants to recover rules with less points (possibly with points in the domain and positive weights) one can try to achieve such rule by the routine splinegauss_compression.m.
Several demos are available, that show how to use splinegauss_2020.m and splinegauss_compression.m to produce cubature rules over spline-curvilinear polygons.
Sources:
Paper:
Gauss-Green cubature and moment computation over arbitrary geometries, with M. Vianello.
Codes:
» First Version: March 2009, Last update: September 20, 2020.
» Splinegauss PI type (2020)
Matlab codes for computing low cardinality algebraic cubature rules on spline-curvilinear polygons (rules with all positive weights and nodes inside the domain).
Description:
This software computes algebraic cubature rules with fixed degree of precision over spline-curvilinear polygons. It includes an in-domain routine incurvpolygon.m that determines if a point is inside one of such regions.
The cubature formula has all points inside the domain as well as positive weights.
Sources:
Paper:
Tchakaloff-like cubature rules on spline curvilinear polygons with M. Vianello.
Codes:
» First Version: May 2020, Last update: May 2020.
» Polygauss, Fast algebraic cubature over polygons (2019)
Fast Matlab codes for computing cubature rules over general polygons.
Description:
This software computes algebraic cubature rules with fixed degree of precision over general polygons (convex or not convex, connected or disconnected, simply or not simply connected). It needs Matlab-built in polyshape environment.
Sources:
Paper:
Codes:
» Last update: May 12, 2019.
» RBF and SRBF cubature on the unit sphere (2019)
Matlab codes for computing cubature rules from scattered data over the unit sphere by RBF and SRBF.
Description:
This software computes cubature rules over the sphere, via Radial Basis Functions and Spherical Radial Basis Functions. We point out that as described in demoRBFweights.m and demoSRBFweights.m , cubature weights are obtained, without the need of the RBF interpolant (though via moments and transpose of Vandermonde matrix).
Sources:
Paper:
Codes:
» First Version: May 2005, Last update: September 26, 2019.
» RBF and SRBF cubature on the unit disks and annular sectors (2019)
Matlab codes for computing cubature rules from scattered data over disks and annular sectors by TPS and Green's formula
Description:
This software computes cubature rules over disks and annular sectors, via Radial Basis Functions. We point out that as described in demoRBFweights.m, cubature weights are obtained, without the need of the RBF interpolant (though via moments and transpose of Vandermonde matrix).
Sources:
Paper:
Codes:
Old sources: [GreenDisk_v1_0.zip], [GreenDisk_v1_0a.zip]
» First Version: 2008, Last update: September 24, 2019.
» RBF cubature on the rectangles (2019)
Matlab codes for computing cubature rules over rectangles via RBF.
Description:
This software computes cubature rules over rectangles, via Radial Basis Functions. The first .zip file considers RBF with the same scale for all the centers, the second zip file manages the variable scale case. We point out that as described in demo_2019_weights.m, cubature weights can be obtained, without the need of the RBF interpolant.
Sources:
Paper:
Codes:
» First Version: May 2004, Last update: September 23, 2019.
» RBF cubature on the polygons (2019)
Matlab codes for computing cubature rules over polygons via Thin Plate Splines.
Description:
This software computes cubature rules over polygons (convex or not convex), via Radial Basis Functions (Thin Plate Splines)
Sources:
Paper:
Codes:
» First Version: May 2006, Last update: September 11, 2019.
» Gaussian Rules for Symmetric weight functions (2012)
Matlab codes for computing Gaussian Rules for Symmetric weight functions.
Description:
Matlab codes for computing Gaussian Rules for Symmetric weight functions.
Sources:
Paper:
Codes:
» Last update: July 27, 2012.
» Fejer and Clenshaw-Curtis rules for general weight functions (2012)
Matlab codes for computing Fejer and Clenshaw-Curtis rules for general weight functions.
Description:
Matlab codes for computing Fejer and Clenshaw-Curtis rules for general weight functions.
Sources:
Paper:
Codes:
» Last update: July 27, 2012 (Tested August 22, 2016)]
» Orthogonal polynomials and hyper interpolation over general regions (2016)
Matlab codes for computing Orthogonal polynomials and hyper interpolation over general regions.
Description:
Matlab codes for computing Orthogonal polynomials and hyper interpolation over general regions.
The MULTIVOP_220816.zip suite allows to compute hyperinterpolants over general regions. Here we show examples on some circular regions or polygons. The more important routine is multivop.m that allows the numerical computation of orthogonal polynomials over general regions.
Sources:
Paper:
Codes:
» Last update: August 25, 2016.
» Trigauss: quadrature rules for trigonometric polynomials (2016)
Trigonometric Gaussian rules with fixed degree of precision
Description:
Trigonometric Gaussian rules with fixed degree of precision
The routine trigauss.m computes a quadrature rule over an interval, exact for trigonometric polynomial degree N. Several versions, including the Gauss-Kronrod version (it is not known if they always exist!), are available.
Sources:
Paper:
Codes:
New version: [MATLAB CODES (zip file)]
Old version: [ZIP] [MATLAB CODES (zip file), cubature]
Last update:
September 13, 2016.
» HYPERTRIG and HYPERPOL suites (2016)
1D trigonometric hyperinterpolation and hyperinterpolation over spherical rectangles.
Description:
1D trigonometric hyperinterpolation and hyperinterpolation over spherical rectangles
Software for 1D trigonometric hyperinterpolation and hyperinterpolation over spherical rectangles. HYPERTRIG is based on trigonometric tensorial hyperinterpolation, while HYPERPOL consists in polynomial hyperinterpolation over spherical rectangles (of total degree).
Sources:
Paper:
G. Da Fies, A. Sommariva and M. Vianello, Subperiodic trigonometric hyperinterpolation.
Codes:
HYPERTRIG: [MATLAB CODES (zip file)]
HYPERPOL: [MATLAB CODES (zip file)]
Last update:
October 24, 2016.
» CATCH suite (2016)
Least squares on a 2D mesh and least squares on a compressed mesh
Description:
Least squares on a 2D mesh and least squares on a compressed mesh
Demo of least squares on a 2D mesh and least squares on a compressed mesh. Examples on union of disks and polygons.
Sources:
Paper:
F. Piazzon, A. Sommariva and M. Vianello, Caratheodory-Tchakaloff Subsampling.
Codes:
CATCH: [MATLAB CODES (zip file)]
Last update:
November 20, 2016.
» Optimal mesh suite (2017)
Computation of optimal meshes on sphere, ball and torus.
Description:
Computation of optimal meshes on sphere, ball and torus.
Sources:
Paper:
A. Sommariva and M. Vianello, Discrete norming inequalities on sections of sphere, ball and torus.
Codes:
Last update:
April 24, 2017.
» Sensors suite (2017)
Computation of nested cubature rules on polygons, from bivariate data.
Description:
Computation of nested cubature rules on polygons, from bivariate data.
Sources:
Paper:
A. Sommariva and M. Vianello, Nearly optimal nested sensors location for polynomial regression on complex geometries
Codes:
Last update:
May 23, 2017.
» Padua CC (2007)
Matlab code for algebraic cubature over the square by Padua points.
Description:
Matlab code for cubature over a square (using non tensorial Padua and Morrow-Patterson Xu points). The main routine is the m. file main.m that performs cubature over a square using different formulas. All numerical experiments have been tested on Intel Centrino Duo T2400, with Windows XP, Matlab 6.1.0.450 Release 12.1 and GNU Octave 2.1.73.
Sources:
Paper:
Codes:
Last update:
October 09, 2007]
» Padua 2DM (2011)
Software for interpolation and cubature via Padua points.
Description:
Software for interpolation and cubature via Padua points.
Sources:
Paper:
Codes:
Last update:
» WAM (2010):
Matlab code for WAM computation (good meshes over domains)
Description:
Matlab code for WAM computation (good meshes over domains).
Sources:
Paper:
Codes:
[WAM_2D_280210.zip]: a complete version that works on several bivariate domains, not easily adaptable to add own WAMs but right for experiments on general 2D domains.
[WAM_2De_010310.zip]: a simple version that does not work on many bivariate domains, but that is easily adaptable to add 2D WAMs.
[WAM_3D_010310.zip]: a simple version that does not work on many trivariate domains, but that is easily adaptable to add 3D WAMs.
Last update:
March 01, 2010
ChebfunGauss ,
Polygauss,
Splinegauss,
Polyging,
Lebfek,
Almost minimal rules over the square,
Gaussian Rules for Symmetric weight functions,
Fejer and Clenshaw-Curtis rules for general weight functions,
Trigauss,
Matlab codes for computing good interpolation points or quadrature rules on geographic subregions of the sphere
» ChebfunGauss (2017):
Matlab code for algebraic cubature over curvilinear domains (using Chebfun)
Description:
ChebfunGauss: a Matlab code for Gauss-Green cubature by the Chebfun package: Matlab code that uses a suitable version of Splinegauss for bivariate domains defined analytically and approximated by Chebfuns. The files are stored in the compressed folder [CHEBFUNGAUSS_2017.zip]. For a demo use the file demo.m, for plotting cubature points plot_pts.m.
Sources:
New Version: [CHEBFUNGAUSS_2017.zip]
Old Version: [CHEBFUNGAUSS_2011.zip]
» Last update: November 26, 2017.
» Polygauss (2016):
Matlab code for Gauss-like cubature over polygons
Description:
The polygauss.m routine allows the computation of cubature rules with a certain degree of exactness on a polygon (without self-intersections). The new routine works via quadrangles panelling or triangularization. Some new demos show its usage. We point out that these rules can be compressed, providing a rule with less nodes/weights but the same algebraic degree of exactness (see comprexcub.m).
Sources:
New version: [POLYGAUSS_230816.zip]
Old version: [POLYGAUSS_2013_300413.zip]
Last update:
August 25, 2016.
» Polygauss (2013):
Matlab code for Gauss-like cubature over polygons
Description:
Matlab code for Gauss-like cubature over polygons.
The main routine is the m. file polygauss.m. As demo, please use demo_gausscub.m. A different version, that uses less points but is more time expensive is polygaussj.m. We point out that the routines work in the GNU Octave version 2.1.73 (i686-pc-cygwin) environment. For some numerical experiments in Matlab/Octave see [readme_polygauss.pdf].April 30, 2013: Modification of polygauss.m outputs. For a numerical comparison, see the routine that calls "dblquad" [dblquad_polygons.zip].
Sources:
Codes:
Previous version: [GAUSSCUB_2013.zip].
Last update:
March 23, 2013.
» Splinegauss (2009):
Matlab code for algebraic cubature over spline-curvilinear polygons
Description:
Matlab code for Gauss-like cubature over spline curvilinear polygons . The main routine is the m. file splinegauss_2009b that performs cubature over domains with spline curvilinear boundaries.. As demo, please use demo.m for computing cubature over spline curvilinear polygons. In addition, try demo_splinegauss_moments.m for tests on computing moments w.r.t. some specific bases on such domains. All numerical experiments have been done on MAC Book, with MAC OS X, Matlab 7.6.0.324 Release 2008a. If you are interested in this software, see the more recent routine in SPLINEGAUSS_2020.zip.
Sources:
Codes:
Last update:
November 19, 2009.
» Polyging (2011):
Matlab code for extraction of good cubature/interpolation nodes over polygons
Description:
The suite contains several Matlab files for cubature/interpolation over polygons based on AFP (Approximate Fekete Points) and DLP (Discrete Leja Points). The zip file contains also Matlab routines for a minimal triangulation of a polygon and a quadrangulation of a polygon using few quadrangles and triangles.
Sources:
Codes:
Last update:
April 01, 2011
» Lebfek (2011):
Matlab codes for good set over simplex, square and disk.
Description:
Matlab codes and data sets for bivariate Lebesgue and Fekete interpolation.
In M. Briani, A. Sommariva, M. Vianello, Computing Fekete and Lebesgue points: simplex, square, disk we have described some algorithms for computing (quasi-)Lebesgue and (quasi-)Fekete points on the unit simplex, a square and on the unit disk. The respective codes and sets for these domains can be found in the links below:
Last update:
February 14, 2011.
» Almost minimal rules over the square (2011):
Matlab codes for almost minimal rules over the square.
Description:
Computation of (almost-)minimal rules on the square.
Sources:
Codes:
Last update:
December 11, 2011
» Gaussian Rules for Symmetric weight functions (2012):
Matlab codes for fast computation of Gaussian rules for symmetric weights.
Description:
Gaussian Rules for Symmetric weight functions.
Sources:
Codes:
Last update:
July 27, 2012.
» Fejer and Clenshaw-Curtis rules for general weight functions (2012):
Matlab codes for Fejer and Clenshaw-Curtis rules for general weight functions.
Sources:
Codes:
Last update:
July 27, 2012
» Trigauss (2013):
Matlab codes for computing trigonometric quadrature rules.
Description:
Matlab codes for computing trigonometric quadrature rules. A comparison.
Sources:
Codes:
Last update:
February 27, 2013.
» Matlab codes for computing good interpolation points or quadrature rules on geographic subregions of the sphere
Sources:
Codes:
Last update:
November 20, 2013