From 384b6c674391c0c098b89e809844fcd9e7b29588 Mon Sep 17 00:00:00 2001 From: Bas Nijholt <basnijholt@gmail.com> Date: Wed, 25 Sep 2019 13:15:23 +0200 Subject: [PATCH] write about CQUAD --- paper.bib | 11 +++++++++++ paper.md | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/paper.bib b/paper.bib index 21ed999..e1c2f32 100755 --- a/paper.bib +++ b/paper.bib @@ -227,3 +227,14 @@ year={1990}, publisher={Oxford University Press} } + +@article{clenshaw1960method, + title={A method for numerical integration on an automatic computer}, + author={Clenshaw, Charles W and Curtis, Alan R}, + journal={Numerische Mathematik}, + volume={2}, + number={1}, + pages={197--205}, + year={1960}, + publisher={Springer} +} diff --git a/paper.md b/paper.md index 3bfcfc5..e6eaad6 100755 --- a/paper.md +++ b/paper.md @@ -80,7 +80,7 @@ It provides auxiliary functionality such as live-plotting, inspecting the data a The raw data and source code that produces all plots in this paper is available at [@papercode]. -# Review of adaptive sampling +# Review of adaptive sampling{#sec:review} Optimal sampling and planning based on data is a mature field with different communities providing their own context, restrictions, and algorithms to solve their problems. To explain the relation of our approach with prior work, we discuss several existing contexts. @@ -231,6 +231,13 @@ Here, we see that for homogeneous sampling to get the same error as sampling wit ## A parallelizable adaptive integration algorithm based on cquad #### The `cquad` algorithm belongs to a class that is parallelizable. +In Sec. @sec:review we mentioned the doubly-adaptive integration algorithm `CQUAD`.[@gonnet2010increasing] +This algorithm uses a Clenshaw-Curtis quadrature rules [@clenshaw1960method] of increasing degree $d$ in each interval. +The error estimate is $\sqrt{\int{\left(f_0(x) - f_1(x)\right)^2}}$, where $f_0$ and $f_1$ are two successive interpolations of the integrand. +To reach the desired total error, intervals with the maximum absolute error are improved. +Either (1) the degree of the rule is increased or (2) the interval is split if either the function does not appear to be smooth or a rule of maximum degree ($d=4$) has been reached. +All points inside the intervals can be trivially calculated in parallel; however, when there are more resources available than points, Adaptive needs to guess whether an (1) interval's should degree of the rule should be increased or (2) or the interval is split. +Here, we choose to always increase until $d=4$, after which the interval is split. ## isoline and isosurface sampling We can find isolines or isosurfaces using a loss function that prioritizes intervals that are closer to the function values that we are interested in. -- GitLab