vc_cylindrical_integrate: Integrate a Cartesian field over a cylindrical-coordinate...

View source: R/cylindrical_integrate.R

vc_cylindrical_integrateR Documentation

Integrate a Cartesian field over a cylindrical-coordinate solid

Description

Integrate a Cartesian field over a cylindrical-coordinate solid

Usage

vc_cylindrical_integrate(
  f,
  interval,
  radial_lower,
  radial_upper,
  height_lower,
  height_upper,
  method = c("simpson", "trapezoid"),
  n_outer = 8L,
  n_middle = 8L,
  n_inner = 8L,
  abs_tol = 1e-08,
  rel_tol = 1e-08
)

Arguments

f

Scalar field accepting one vector in physical x,y,z order.

interval

Angular bounds in radians, reversed/equal allowed; span at most 2*pi to avoid repeated angular coverage.

radial_lower, radial_upper

Nonnegative ordered radius functions of theta.

height_lower, height_upper

Functions of one vector in theta,r order, returning ordered finite vertical bounds.

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.

Details

Uses x=rcos(theta), y=rsin(theta), z=z and Jacobian r, then reuses vc_triple_integrate unchanged. All nested diagnostics survive. Error indicators remain heuristic; caller justifies change-of-variables, integrability and bounds between samples. Negative sampled radii and spans exceeding one turn are rejected. Sampled fields must be finite, including at the axis; no automatic removable-singularity extension. Angular reversal changes sign. No spherical or adaptive nested rule.

Value

Full nested triple result with type cylindrical_integral; stored engine coordinates are theta,r,z, while f receives physical x,y,z.

Examples

(function(v)1) |> vc_cylindrical_integrate(c(0,2*pi),function(t)0,function(t)1,
  function(v)0,function(v)2,n_outer=2,n_middle=2,n_inner=2)

vectorialcalculus documentation built on Nov. 17, 2026, 1:09 a.m.