Function to return a bivariate normal momentum distribution
bvtnorm_setup(n, center, covariance, A, Z, name)
| n |
|
|---|---|
| center |
|
| covariance |
|
| A |
|
| Z |
|
| name |
|
list with momentum distribution setup
#' @title bvtnorm_grad
#'
#' @description function to calculate the gradient of a a bivariate normal
#' momentum distribution with respect to parallel and perpencicular momentum
#'
#' @param p_perp numeric value of perpendicular momentum component
#' @param p_par numeric value of parallel momentum component
#' @param n numeric particle density.
#' @param center numeric center of distribution (2d vector)
#' @param covariance numeric covariance of distribution (2 by 2 matrix)
#'
#' @return list
#'
bvtnorm_grad <- deriv(
expr = bvtnorm_expr,
namevec = c("p_perp","p_par"),
function.arg = c("p_perp", "p_par", "n", "center", "covariance")
)