View source: R/triple_integrate.R
| vc_triple_integrate | R Documentation |
Integrate over a nested Cartesian solid
vc_triple_integrate(
f,
interval,
middle_lower,
middle_upper,
inner_lower,
inner_upper,
order = c("zyx", "zxy", "yzx", "yxz", "xzy", "xyz"),
method = c("simpson", "trapezoid"),
n_outer = 8L,
n_middle = 8L,
n_inner = 8L,
abs_tol = 1e-08,
rel_tol = 1e-08
)
f |
Scalar field accepting one vector in physical x,y,z order. |
interval |
Finite outer bounds, reversed or equal allowed. |
middle_lower, middle_upper |
Functions of the outer coordinate giving ordered middle bounds. |
inner_lower, inner_upper |
Functions accepting a two-vector in outer,middle order, giving ordered inner bounds. |
order |
Integration order from inner to outer; a permutation of xyz. |
method |
Simpson or trapezoid fixed quadrature. |
n_outer, n_middle, n_inner |
Initial cell counts, each refined internally. |
abs_tol, rel_tol |
Nonnegative diagnostic tolerances, one positive. |
Reuses unchanged scalar and double quadrature engines. Absolute finest outer weights propagate each double-slice error indicator; this sum plus outer refinement error is heuristic, not a certified bound. All slice flags also gate tolerance_met. Finite sampling does not prove Fubini hypotheses, integrability or ordering between sampled sections. Caller supplies a justified nested region and splits known singularities. Reversed outer bounds change sign; reversed sampled middle/inner bounds are rejected. Equal widths skip deeper functions. Signed integrals need not be geometric volumes. Storage and evaluations grow cubically with resolution. No cylindrical/spherical transformation or adaptive rule.
List containing estimate, error_estimate, tolerance_met, outer (full vc_integrate result), slices (cached full vc_double_integrate results), outer_nodes, projection, order and interval.
(function(v)1) |> vc_triple_integrate(c(0,1),function(x)0,function(x)1-x,
function(v)0,function(v)1-sum(v),n_outer=2,n_middle=2,n_inner=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.