View source: R/surface_integral.R
| vc_surface_integral | R Documentation |
Integrate area, scalar density or flux on a parameterized surface
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
)
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. |
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.
List with estimate, full nested quadrature diagnostics, sample parameters, positions, area factors, signed integrands and numerical derivative sensitivity. Supplied derivatives have NA sensitivity.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.