View source: R/surface_integral.R
| vc_surface_graph_integral | R Documentation |
Integrate a scalar density or oriented flux on a graph
vc_surface_graph_integral(
graph,
x_range,
y_range,
f = NULL,
type = c("scalar", "flux"),
gradient = NULL,
orientation = c("up", "down"),
h = NULL,
method = c("simpson", "trapezoid"),
n_outer = 8L,
n_inner = 8L,
abs_tol = 1e-08,
rel_tol = 1e-08
)
graph |
Function of one vector c(x,y) returning the scalar height. |
x_range, y_range |
Finite endpoint pairs for the Cartesian base rectangle. |
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. |
gradient |
Optional function of c(x,y) returning the two height partials. |
orientation |
Up uses the normal with positive z component. Down negates flux. Scalar integration is unchanged. |
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. |
The vc_surface_integral() result with up/down orientation.
vc_surface_graph_integral(function(p)sum(p),c(0,1),c(0,1),
f=function(p)c(0,0,1),type="flux",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.