vc_surface_integral: Integrate area, scalar density or flux on a parameterized...

View source: R/surface_integral.R

vc_surface_integralR Documentation

Integrate area, scalar density or flux on a parameterized surface

Description

Integrate area, scalar density or flux on a parameterized surface

Usage

vc_surface_integral(
  surface,
  u_range,
  v_range,
  f = NULL,
  type = c("scalar", "flux"),
  jacobian = NULL,
  orientation = c("forward", "reverse"),
  h = NULL,
  method = c("simpson", "trapezoid"),
  n_outer = 8L,
  n_inner = 8L,
  abs_tol = 1e-08,
  rel_tol = 1e-08
)

Arguments

surface

Function of one vector c(u,v) returning a finite Cartesian three-vector.

u_range, v_range

Two finite endpoints for each parameter. Integration uses increasing bounds. Equal bounds give zero without surface evaluations.

f

NULL for area, a scalar density for scalar integration, or a three-component vector field for flux. Functions accept one Cartesian vector.

type

Scalar integration or oriented flux.

jacobian

Optional function of c(u,v) returning a finite real 3 by 2 matrix, with surface derivatives as columns. Defaults to vc_jacobian().

orientation

Forward uses the u derivative crossed with the v derivative. Reverse negates flux. It has no effect on scalar integration.

h

Optional numerical Jacobian step or two coordinate steps.

method

Simpson or trapezoid rule.

n_outer, n_inner

Initial cell counts, refined at both levels.

abs_tol, rel_tol

Nonnegative diagnostic tolerances, one positive.

Details

Scalar integration uses the norm of the cross product and counts parameterization multiplicity. Flux uses the oriented, unnormalized cross product. A zero cross product contributes zero without requiring a unit normal. Numerical stencils can leave the parameter domain. The quadrature diagnostics omit derivative error. Samples do not establish smoothness, regularity, injectivity or a globally consistent orientation.

Value

List with estimate, full nested quadrature diagnostics, sample parameters, positions, area factors, signed integrands and numerical derivative sensitivity. Supplied derivatives have NA sensitivity.

Examples

vc_surface_integral(function(p)c(p[1],p[2],p[1]+p[2]),c(0,1),c(0,1),
  n_outer=2,n_inner=2)$estimate

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