• Api Documentation

Intersecting Quadrature

A package that offers methods to create quadrature rules for domains defined by one or two intersecting level sets. It is used in the discontinuous Galerkin framework BoSSS developed by the chair of fluid dynamics, Technical University of Darmstadt. A detailed description of the method can be found on arXiv.

Quick Start

Create a .dotNet project and simply include the NuGet package in your .Net project through nuget.org.

Place this code in program.cs and run it :

using IntersectingQuadrature;
using IntersectingQuadrature.Tensor;

namespace Example {

  class Program {
    
    static void Main(string[] args) {
      IScalarFunction alpha = new LinearPolynomial(0, Tensor1.Vector(1, 0, 0));
      IScalarFunction beta = new LinearPolynomial(0, Tensor1.Vector(0, 1, 0));

      IQuadrater Q = IntersectingQuadrature.Methods.Create();
      HyperRectangle cell = HyperRectangle.UnitCube(3);
      QuadratureRule rule = Q.FindRule(alpha, Symbol.Minus, beta, Symbol.Minus, cell, 3);
    }
  }
}

This simple example creates a quadrature rule over the volume of a 3-dimensional domain with flat surfaces.

Usage

You have two options to use this package. You can include it as a libary in your project as a NuGet package, or add IntersectingQuadrature.csproj to your project.

To construct a QuadratureRule rule :

  • Implement level sets IScalarFunction Alpha and IScalarFunction Beta.
  • Create IHyperRectangle K of dimension d which confines the domain of integration.
  • Determine the domain of integration by selecting Symbol signAlpha and Symbol signBeta from {0, -, +} for Alpha and Beta respectively. You will receive a quadrature rule for the set {x ∈ K | sign(Alpha(x)) = signAlpha ∧ sign(Beta(x)) = signBeta}.
  • Set int n to define the number nd of quadrature nodes.
  • Select a number int subdivions of subdivisions.

You can construct a quadrature rule by creating a IQuadrater Q and calling Q.FindRule(...) :

IQuadrater Q = IntersectingQuadrature.Methods.Create();
QuadratureRule rule = Q.FindRule(alpha, signAlpha, beta, signBeta, K, n, subdivisions);

If required, an adaptive IQuadrater Q can be created.

double tau = 0.001;
IQuadrater Q = IntersectingQuadrature.Methods.Adaptive(tau);
QuadratureRule rule = Q.FindRule(alpha, signAlpha, beta, signBeta, K, n, subdivisions);

It creates a quadrature rule, which is refined adaptively according to the relative error threshold tau.

Examples

To see examples, compile Example/Example.csproj and run the examples in program.cs by uncommenting them.

Related publications

  • High-Order Numerical Integration on Domains Bounded by Intersecting Level Sets We present a high-order method that provides numerical integration on volumes, surfaces, and lines defined implicitly by two smooth intersecting level sets. To approximate the integrals, the method maps quadrature rules defined on hypercubes to the curved domains of the integrals. This enables the numerical integration of a wide range of integrands since integration on hypercubes is a well known problem. The mappings are constructed by treating the isocontours of the level sets as graphs of height functions. Numerical experiments with smooth integrands indicate a high-order of convergence for transformed Gauss quadrature rules on domains defined by polynomial, rational, and trigonometric level sets. We show that the approach we have used can be combined readily with adaptive quadrature methods. Moreover, we apply the approach to numerically integrate on difficult geometries without requiring a low-order fallback method.
  • Edit this page
In this article
Back to top Generated by DocFX