This function is auxiliary to polyCub.iso.
The (analytical) integral of \(r f_r(r)\) from 0 to \(R\) is checked
against a numeric approximation using integrate for various
values of the upper bound \(R\). A warning is issued if inconsistencies
are found.
checkintrfr(intrfr, f, ..., center, control = list(), rs = numeric(0L),
tolerance = control$rel.tol)analytical antiderivative of \(r f_r(r)\) from 0 to R
(first argument, not necessarily named "R", must be vectorized).
If missing, intrfr is approximated numerically using
integrate configured with control.
a two-dimensional real function. As its first argument it must take a coordinate matrix, i.e., a numeric matrix with two columns, and it must return a numeric vector of length the number of coordinates.
further arguments for f or intrfr.
numeric vector of length 2, the center of isotropy.
list of arguments passed to integrate, the
quadrature rule used for the line integral along the polygon boundary.
numeric vector of upper bounds for which to check the validity of
intrfr. If it has length 0, no checks are performed.
of all.equal.numeric when comparing
intrfr results with numerical integration. Defaults to the
relative tolerance used for integrate.
The intrfr function. If it was not supplied, its quadrature
version using integrate is returned.